Make prefetch more aggressive
Former-commit-id: 25a5cfefcf7fa3451e92500f5d310290c4b6bbde
This commit is contained in:
parent
5793bb0c34
commit
2c8540c4fd
@ -3021,8 +3021,13 @@ void redisDbPersistentData::prefetchKeysAsync(client *c, parsed_command &command
|
||||
auto hT = h & c->db->m_pdict->ht[iht].sizemask;
|
||||
dictEntry **table;
|
||||
__atomic_load(&c->db->m_pdict->ht[iht].table, &table, __ATOMIC_RELAXED);
|
||||
if (table != nullptr)
|
||||
_mm_prefetch(table[hT], _MM_HINT_T2);
|
||||
if (table != nullptr) {
|
||||
dictEntry *de = table[hT];
|
||||
while (de != nullptr) {
|
||||
_mm_prefetch(dictGetKey(de), _MM_HINT_T2);
|
||||
de = de->next;
|
||||
}
|
||||
}
|
||||
if (!dictIsRehashing(c->db->m_pdict))
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user