#include #include #include #include #include #include "nvml/libpmemlog.h" /* Additional info: * nvm/ is the mounting point of a tmpfs in numa node 0: * mount -t tmpfs -o size = 15g,mpol=bind:0 tmpfs nvm/ * The program is run in node 1: * PMEM_IS_PMEM_FORCE=1 numactl --membind=1 --cpunodebind=1 ./main * libpmem is using movnt for memmove() */ int main(int argc, char* argv[]) { const int ENTRY_SIZE = 512; const int OPERATIONS = 1e6; PMEMlogpool *plp; clock_t c0, c1; if((plp = pmemlog_create("nvm/log", 1e9, S_IWUSR | S_IRUSR)) == NULL) { if((plp = pmemlog_open("nvm/log")) == NULL) { perror("nvm/log"); exit(1); } } c0 = clock(); for(int i=0; i