Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Aug 22, 2020

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit e711df54082b5d2d739e9ee3e46a2bc23b1b3c7c:

file: provider fio_file_free() helper (2020-08-19 13:02:42 -0600)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to d836624b3a7eb3433bdf8f7193b44daacd5ba6d1:

engines/io_uring: don't attempt to set RLIMITs (2020-08-21 16:22:43 -0600)

----------------------------------------------------------------
Jens Axboe (2):
Merge branch 'adjusting-libpmem' of https://github.com/lukaszstolarczuk/fio into master engines/io_uring: don't attempt to set RLIMITs

��ukasz Stolarczuk (1):
engines/libpmem: adjust for PMDK >=1.5 usage

 configure            |  30 ++-
 engines/io_uring.c   |   8 -
 engines/libpmem.c    | 501 +++++++++------------------------------------------
 examples/libpmem.fio |  17 +-
 4 files changed, 127 insertions(+), 429 deletions(-)

---

Diff of recent changes:

configure +27 -3
index d3997b5f..6d672fe5 100755
@@ -2117,10 +2117,11 @@ if test "$libpmem" != "yes" ; then
 fi
 cat > $TMPC << EOF
 #include <libpmem.h>
+#include <stdlib.h>
 int main(int argc, char **argv)
 {
   int rc;
-  rc = pmem_is_pmem(0, 0);
+  rc = pmem_is_pmem(NULL, NULL);
   return 0;
 }
 EOF
@@ -2129,6 +2130,27 @@ if compile_prog "" "-lpmem" "libpmem"; then
 fi
 print_config "libpmem" "$libpmem"
 
+##########################################
+# Check whether libpmem's version >= 1.5
+if test "$libpmem1_5" != "yes" ; then
+  libpmem1_5="no"
+fi
+if test "$libpmem" = "yes"; then
+  cat > $TMPC << EOF
+#include <libpmem.h>
+#include <stdlib.h>
+int main(int argc, char **argv)
+{
+  pmem_memcpy(NULL, NULL, NULL, NULL);
+  return 0;
+}
+EOF
+  if compile_prog "" "-lpmem" "libpmem1_5"; then
+    libpmem1_5="yes"
+  fi
+fi
+print_config "libpmem1_5" "$libpmem1_5"
+
 ##########################################
 # Check whether we have libpmemblk
 # libpmem is a prerequisite
@@ -2151,10 +2173,12 @@ EOF
 fi
 print_config "libpmemblk" "$libpmemblk"
 
-# Choose the ioengines
+# Choose libpmem-based ioengines
 if test "$libpmem" = "yes" && test "$disable_pmem" = "no"; then
-  pmem="yes"
   devdax="yes"
+  if test "$libpmem1_5" = "yes"; then
+    pmem="yes"
+  fi
   if test "$libpmemblk" = "yes"; then
     pmemblk="yes"
   fi
engines/io_uring.c +0 -8
index 57925594..2b1b1357 100644
@@ -574,14 +574,6 @@ static int fio_ioring_queue_init(struct thread_data *td)
 	ld->ring_fd = ret;
 
 	if (o->fixedbufs) {
-		struct rlimit rlim = {
-			.rlim_cur = RLIM_INFINITY,
-			.rlim_max = RLIM_INFINITY,
-		};
-
-		if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0)
-			return -1;
-
 		ret = syscall(__NR_io_uring_register, ld->ring_fd,
 				IORING_REGISTER_BUFFERS, ld->iovecs, depth);
 		if (ret < 0)
engines/libpmem.c +89 -412

640 lines not on this page · raw message

examples/libpmem.fio +11 -6
index d44fcfa7..65b1d687 100644
@@ -15,6 +15,7 @@ iodepth=1
 iodepth_batch=1
 thread=1
 numjobs=1
+runtime=300
 
 #
 # In case of 'scramble_buffers=1', the source buffer
@@ -27,13 +28,17 @@ numjobs=1
 scramble_buffers=0
 
 #
-# direct=0:
-#   Using pmem_memcpy_nodrain() for write operation
+# depends on direct option, flags are set for pmem_memcpy() call:
+# direct=1 - PMEM_F_MEM_NONTEMPORAL,
+# direct=0 - PMEM_F_MEM_TEMPORAL.
 #
-# direct=1:
-#   Using pmem_memcpy_persist() for write operation
+direct=1
+
+#
+# sync=1 means that pmem_drain() is executed for each write operation.
 #
-direct=0
+sync=1
+
 
 #
 # Setting for fio process's CPU Node and Memory Node
@@ -47,7 +52,7 @@ numa_mem_policy=bind:0
 cpus_allowed_policy=split
 
 #
-# The pmemblk engine does IO to files in a DAX-mounted filesystem.
+# The libpmem engine does IO to files in a DAX-mounted filesystem.
 # The filesystem should be created on an NVDIMM (e.g /dev/pmem0)
 # and then mounted with the '-o dax' option.  Note that the engine
 # accesses the underlying NVDIMM directly, bypassing the kernel block