[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2.1 26/28] configure: add Linux libnuma detection
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 2.1 26/28] configure: add Linux libnuma detection |
Date: |
Tue, 4 Mar 2014 15:00:54 +0100 |
From: Wanlong Gao <address@hidden>
Add detection of libnuma (mostly contained in the numactl package)
to the configure script. Can be enabled or disabled on the command
line, default is use if available.
Signed-off-by: Andre Przywara <address@hidden>
Signed-off-by: Wanlong Gao <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
configure | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/configure b/configure
index 8ad03ea..585b40c 100755
--- a/configure
+++ b/configure
@@ -303,6 +303,7 @@ tpm="no"
libssh2=""
vhdx=""
quorum="no"
+numa=""
# parse CC options first
for opt do
@@ -1051,6 +1052,10 @@ for opt do
;;
--enable-quorum) quorum="yes"
;;
+ --disable-numa) numa="no"
+ ;;
+ --enable-numa) numa="yes"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -1310,6 +1315,8 @@ Advanced options (experts only):
--enable-vhdx enable support for the Microsoft VHDX image format
--disable-quorum disable quorum block filter support
--enable-quorum enable quorum block filter support
+ --disable-numa disable libnuma support
+ --enable-numa enable libnuma support
NOTE: The object files are built at the place where configure is launched
EOF
@@ -2983,6 +2990,27 @@ if compile_prog "" "" ; then
fi
##########################################
+# libnuma probe
+
+if test "$numa" != "no" ; then
+ numa=no
+ cat > $TMPC << EOF
+#include <numa.h>
+int main(void) { return numa_available(); }
+EOF
+
+ if compile_prog "" "-lnuma" ; then
+ numa=yes
+ libs_softmmu="-lnuma $libs_softmmu"
+ else
+ if test "$numa" = "yes" ; then
+ feature_not_found "linux NUMA (install numactl?)"
+ fi
+ numa=no
+ fi
+fi
+
+##########################################
# signalfd probe
signalfd="no"
cat > $TMPC << EOF
@@ -4045,6 +4073,7 @@ echo "TPM passthrough $tpm_passthrough"
echo "QOM debugging $qom_cast_debug"
echo "vhdx $vhdx"
echo "Quorum $quorum"
+echo "NUMA host support $numa"
if test "$sdl_too_old" = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -4983,6 +5012,10 @@ if [ "$dtc_internal" = "yes" ]; then
echo "config-host.h: subdir-dtc" >> $config_host_mak
fi
+if test "$numa" = "yes"; then
+ echo "CONFIG_NUMA=y" >> $config_host_mak
+fi
+
# build tree in object directory in case the source is not in the current
directory
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos
tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests"
DIRS="$DIRS fsdev"
--
1.8.5.3
- [Qemu-devel] [PATCH 2.1 18/28] memory: add error propagation to file-based RAM allocation, (continued)
- [Qemu-devel] [PATCH 2.1 18/28] memory: add error propagation to file-based RAM allocation, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 19/28] memory: move preallocation code out of exec.c, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 20/28] memory: move RAM_PREALLOC_MASK to exec.c, rename, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 21/28] hostmem: add file-based HostMemoryBackend, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 22/28] hostmem: separate allocation from UserCreatable complete method, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 23/28] hostmem: add merge and dump properties, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 26/28] configure: add Linux libnuma detection,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 2.1 24/28] hostmem: allow preallocation of any memory region, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 27/28] hostmem: add properties for NUMA memory policy, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 25/28] hostmem: add property to map memory with MAP_SHARED, Paolo Bonzini, 2014/03/04
- [Qemu-devel] [PATCH 2.1 28/28] qmp: add query-memdev, Paolo Bonzini, 2014/03/04
- Re: [Qemu-devel] [PATCH 2.1 28/28] qmp: add query-memdev, Hu Tao, 2014/03/04
Re: [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements, Andreas Färber, 2014/03/05