Skip to content

NVSL/snapshot-public

Repository files navigation

CXLBUF

Dependencies

  • Boost.Interprocess (included)
  • Boost.Config (included)
  • Boost.Move (included)
  • nvsl.cpp-common (included)
  • libvulkan-dev
  • libisal-dev
  • LLVM-13

Build

Optionally, change options in make.config to modify the build.

To build the project:

make -j$(nproc)

To build the release (optimized) version:

make -j$(nproc) release

Enabling verbose mode for debugging compiler flags:

V=1 make # or V=1 make release

Building the docker image

  1. Get the github personal access token using instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
  2. Build the image
docker build --build-arg tok="<personal-access-token>" .

Tests

To run tests:

make release -j$(nproc)
make tests

Configure Linux

sudo sysctl -w vm.max_map_count=$((262144*1024))
echo 0 | sudo tee /proc/sys/kernel/kptr_restrict > /dev/null
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
echo 1 | sudo tee /proc/sys/vm/unprivileged_userfaultfd
echo 0 | sudo tee /proc/sys/kernel/perf_event_paranoid

Experimentation notes:

  • /mnt/pmem0p3 is normal (non-dax) ext4
  • /mnt/pmem0p2 is a data=journal mounted ext4

Example environment for compilation

export LLVM_DIR=/usr/lib/llvm-13/ DCLANG_LIBS_DIR="/home/smahar/git/cxlbuf-emul/lib" NVSL_LOG_LEVEL=4 LD_LIBS_DIR=/home/smahar/git/cxlbuf/lib/

Enivronment variables

Configuration

Environment variablePossible valuesComments
PMEM_START_ADDRaddrMarks the start of the tracking region, files on pmem will mount starting at this address.
PMEM_END_ADDRaddrMarks the end of the tracking region
CXLBUF_MSYNC_IS_NOP{1,0,-}Disables persistency of msync and converts it into a NOP
CXLBUF_MSYNC_SLEEP_NS{val,-}Add a fixed sleep to msync to simulate crash consistency behavior
CXLBUF_USE_HUGEPAGE{1,0,-}Use huge pages for page cache mapping

Debugging

Environment variablePossible valuesComments
NVSL_NO_STACKTRACE{1,0,-}Disables stack trace in res_t and mres_t
NVSL_LOG_LEVEL[0-4]Controls the volume of debug logging, 0 -> no log output, 4 -> most verbose output
NVSL_LOG_WILDCARD{“”, wildcard pattern}Unless empty, applies filter on log using their caller’s function name

Crash Consistency

Environment variablePossible valuesComments
CXLBUF_CRASH_ON_COMMIT{1,0,-}Crash right before committing the transaction
NVSL_FORCE_MSYNC{1,0,-}Uses msync for persisting data
NVSL_FORCE_CLWB{1,0,-}Uses clwb (if supported) for persisting data
NVSL_FORCE_CLFLUSH_OPT{1,0,-}Uses clflushopt (if supported) for persisting data
NVSL_FORCE_NO_PERSIST{1,0,-}All persistent operations (flush/drain) are disabled

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published