-
Notifications
You must be signed in to change notification settings - Fork 13
Changed CompressedPtr to 32 bits in size and reduced the max slab index value to 15 bits #87
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
Conversation
It's implementation is mostly based on PosixShmSegment. Also, extend ShmManager and ShmSegmentOpts to support this new segment type.
After introducing file segment type, nameToKey_ does not provide enough information to recover/remove segments on restart. This commit fixes that by replacing nameToKey_ with nameToOpts_. Previously, the Key from nameToKey_ map was only used in a single DCHECK().
* New class MemoryTierCacheConfig allows to configure a memory tier. Setting tier size and location of a file for file-backed memory are supported in this initial implementation; * New member, vector of memory tiers, is added to class CacheAllocatorConfig. * New test suite, chelib/allocator/tests/MemoryTiersTest.cpp, demonstrates the usage of and tests extended config API.
to allow using new configureMemoryTiers() API with legacy behavior. Move validation code for memory tiers to validate() method and convert ratios to sizes lazily (on get)..
It wrongly assumed that the only possible segment type is PosixSysV segment.
… handling when NVM cache state is not enabled
Now it's size is 8 bytes intead of 4. Original CompressedPtr stored only some offset with a memory Allocator. For multi-tier implementation, this is not enough. We must also store tierId and when uncompressing, select a proper allocator. An alternative could be to just resign from CompressedPtr but they are leveraged to allow the cache to be mapped to different addresses on shared memory. Changing CompressedPtr impacted CacheItem size - it increased from 32 to 44 bytes.
Without this fix removeCb called even in case when Item is moved between tiers.
It fails because CentOS is EOL. We might want to consider using CentOS Streams but for now, just remove it. Right now, we rely on build-cachelib-centos workflow anyway.
Disabled test suite allocator-test-AllocatorTypeTest to skip sporadically failing tests.
…m#43) Compensation results in ratios being different than originially specified.
9492096
to
0c3df03
Compare
4936efd
to
a875c4b
Compare
c8421a3
to
df1a2a9
Compare
df1a2a9
to
6fb2e74
Compare
@guptask please resolve conflicts |
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.
Reviewable status: 0 of 11 files reviewed, 4 unresolved discussions (waiting on @guptask)
cachelib/allocator/memory/CompressedPtr.h
line 40 at r4 (raw file):
// specialize a type for all of the STL containers. namespace IsContainerImpl {
Why do you add all those traits and so many new includes? I don;t think listing all possible containers is a good idea... What if some new ones are added in the future?
You can just set isContainer based on whether allocators_ has compress/uncompress methods taking a compressed ptr or not: https://stackoverflow.com/questions/87372/check-if-a-class-has-a-member-function-of-a-given-signature
Or even simpler, you can probably just make a partial specialization for AllocatorT == CacheAllocator<..> and for the generic case, treat AllocatorT as a container.
instead of always inserting to topmost tier
instead of always inserting to topmost tier
instead of always inserting to topmost tier
instead of always inserting to topmost tier
instead of always inserting to topmost tier
instead of always inserting to topmost tier
instead of always inserting to topmost tier
Part 2. ---------------------------- This patch introduces tryEvictToNextMemoryTier (the actual data movement), multi-tier stats and some additional multi-tier tests. Additional features: - Add option to insert items to first free tier (pmem#87)
This change is