summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorŁukasz Stolarczuk <lukasz.stolarczuk@intel.com>2020-07-17 15:14:55 +0200
committerŁukasz Stolarczuk <lukasz.stolarczuk@intel.com>2020-08-21 14:14:34 +0200
commit67719e138e1cd3fd54bfe36e111e3643e2e26d7d (patch)
tree9f8d003ccdea4de3f3963a379141b6c0e0c73650 /configure
parente711df54082b5d2d739e9ee3e46a2bc23b1b3c7c (diff)
downloadfio-67719e138e1cd3fd54bfe36e111e3643e2e26d7d.tar.gz
fio-67719e138e1cd3fd54bfe36e111e3643e2e26d7d.tar.bz2
engines/libpmem: adjust for PMDK >=1.5 usage
- libpmem engine adjusted to take full advantage of new PMDK versions, - code redundancy cleaned (some code was copy-pasted from PMDK), - libpmem example adjusted. Behavior of direct and sync parameters changed: - sync=1 means that pmem_drain() is executed for each 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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure30
1 files changed, 27 insertions, 3 deletions
diff --git a/configure b/configure
index d3997b5f..6d672fe5 100755
--- a/configure
+++ b/configure
@@ -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
@@ -2130,6 +2131,27 @@ 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
if test "$libpmemblk" != "yes" ; then
@@ -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