-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of file-backed durable slab storage (#221)
* Datapool use wrappers from cc_mm module * Use datapool for slab engine To enable durable storage, provide a path to a file in "slab_datapool" config option. If no file is provided, the datapool falls back to shared memory. * Recreate slabs after graceful shutdown - USE_PMEM configuration allows to restore hashtable storage * Rebuild slab lruq after restart * Extend datapool API: set/get user_data - add datapool_set_user_data/datapool_get_user_data to save specific user data in datapool header * Datapool datapool_header extend - add user signature to distinguish different datapools * Extend datapool API: prefault - add prefault option to avoid page faults * Add slab unit test for USE_PMEM Co-authored-by: Tomasz Idczak <tomasz.idczak@intel.com> Co-authored-by: Katarzyna Wasiuta <katarzyna.wasiuta@intel.com> Co-authored-by: Pawel Karpinski <pawel.karpinski@intel.com>
- Loading branch information
1 parent
7e4ef09
commit e99419e
Showing
14 changed files
with
1,441 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#pragma once | ||
|
||
#include <stddef.h> | ||
|
||
#include <stdbool.h> | ||
struct datapool; | ||
|
||
struct datapool *datapool_open(const char *path, size_t size, | ||
int *fresh); | ||
struct datapool *datapool_open(const char *path, const char *user_signature, | ||
size_t size, int *fresh, bool prefault); | ||
void datapool_close(struct datapool *pool); | ||
|
||
void *datapool_addr(struct datapool *pool); | ||
size_t datapool_size(struct datapool *pool); | ||
void datapool_set_user_data(const struct datapool *pool, const void *user_data, size_t user_size); | ||
void datapool_get_user_data(const struct datapool *pool, void *user_data, size_t user_size); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ set(SOURCE | |
slab.c) | ||
|
||
add_library(slab ${SOURCE}) | ||
target_link_libraries(slab datapool) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.