-
Notifications
You must be signed in to change notification settings - Fork 46
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
Merge PMDK to Master #7
Conversation
Still some bugs to be hashed out: - Seg fault thrown when clht_gc_destroy is called - PM file unable to handle larger sizes for keys - Need to implement PM logic for buckets
Some bugs: - For larger sizes of n, still having pmemobj_alloc errors
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 we change README.md to explain how to use the pmdk branch please?
Could we also add a new pmdk.md to explain the porting effort at a high level?
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.
-
Need changes to properly use PMDK transactions or to employ non-transactional APIs instead only to resolve memory leak problems. There are two separate APIs provided by libpmemobj: non-transactional API and transactional. If you employ transactional API across the entire range of updates, we don't need to employ RECIPE conversions at all such as manually adding flushes after each atomic store. PMDK transaction would transparently handle everything to ensure the crash-consistent updates of data structures by using undo logging. Instead of employing transactional API, we may be able to use mini-transactional features provided in non-transactional APIs to handle memory leak problems. (Please check following these links: link1, link2, link3).
-
Another issue we need to address is the default PMDK pointer size (16 bytes). Different from traditional dynamic 8-byte pointers, libpmemobj uses 16-byte pointers consisting of uuid and offset, which indicate the universal identifier (8 bytes) of memory-mapped files and the offset (8 bytes) from the starting virtual address of the memory-mapped file respectively. If we simply replace 8-byte pointers with 16-byte PMDK pointers, we can lose the benefits of the cache-efficient layout of original RECIPE indexes. For example, in our current modification, we simply replace the "next" pointer in bucket_t structure with PMEMoid (16bytes) type variable. After this modification, the bucket size is changed from 64 bytes (cache line size) to 72 bytes, so this will lead bucket allocations unaligned by cache lines. uuid is used to distinguish different memory pools and should be employed for the specific applications allocating objects from multiple memory pools. However, as RECIPE indexes only need to use a single memory pool, we can initialize uuid globally at program startup and can store offsets only as pointers in the objects of data structures.
Hi @pyrito, I think I had a different pull request in mind, just talking about the existence of the PMDK branch in README + explaining how to setup and use PMDK with Recipe. The actual details of the implementation can stay within this branch, so regardless of the implementation, master's README.md should have a pointer to this branch. |
Hi @vijay03 , Was your intention to have another branch with README modifications instead? |
no, directly in master. So you would have to submit a different pull request. |
Edited the main README to refer to the PMDK branch in the "limitations" section. Created a PMDK README for P-CLHT.
1. Merge recent masstree modifications from master
1. Add system requirements: the huge performance drop in PMDK was observed in old kernel versions (v4.X). After changing the kernel to latest version (v5.3), it becomes performing well. 2. Change the instructions of installing pmdk to use latest-stable branch.
No need to merge the code. Branches are made to be separate. |
Reason for this PR
Wanted to integrate PMDK changes to the master branch to ensure recoverability of data structures allocated in persistent memory. Currently still working on P-CLHT. Transactions are included but are yet to be verified. See issue #5
How to enable PM?
Set pool_size and pool name in clht_lb_res.c. TODO: instructions to set up environment variables instead.
Make accordingly and run the example.
Checklist