-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add Dash::Prefetch function #4476
Conversation
It's not being used at this time.
const Bucket& target = bucket_[bidx]; | ||
|
||
// Prefetch the home bucket that might hold the key with high probability. | ||
__builtin_prefetch(&target, 0, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the bucket size? if the size of the bucket is more than the cache line maybe it will be better to load the whole bucket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bucket size is dependent on the key/value size but the bucket metadata is located at the beginning. we use the metadata/fingerprints to do the initial scan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify what metadata do you want to read, because to my mind it's more than 64 bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SlotBitmap<NUM_SLOTS> slotb_; // allocation bitmap + pointer bitmap + counter
/*only use the first 14 bytes, can be accelerated by
SSE instruction,0-13 for finger, 14-17 for overflowed*/
FpArray finger_arr_;
StashFpArray stash_arr_;
uint8_t stash_busy_ = 0; // kStashFpLen+1 bits are used
uint8_t stash_pos_ = 0; // 4x2 bits for pointing to stash bucket.
BucketBase<NUM_SLOTS, NUM_OVR>::CompareFP is the function that usually hits a cold memory
It's not being used at this time.