[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3.2 24/31] configure: add Linux libnuma detection
From: |
Hu Tao |
Subject: |
[Qemu-devel] [PATCH v3.2 24/31] configure: add Linux libnuma detection |
Date: |
Wed, 14 May 2014 17:43:28 +0800 |
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>
Signed-off-by: Hu Tao <address@hidden>
---
configure | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/configure b/configure
index 6adfa72..ee4aed5 100755
--- a/configure
+++ b/configure
@@ -323,6 +323,7 @@ tpm="no"
libssh2=""
vhdx=""
quorum="no"
+numa=""
# parse CC options first
for opt do
@@ -1092,6 +1093,10 @@ for opt do
;;
--enable-quorum) quorum="yes"
;;
+ --disable-numa) numa="no"
+ ;;
+ --enable-numa) numa="yes"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
@@ -1358,6 +1363,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
@@ -3117,6 +3124,26 @@ if compile_prog "" "" ; then
fi
##########################################
+# libnuma probe
+
+if test "$numa" != "no" ; then
+ 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 "numa" "install numactl devel"
+ fi
+ numa=no
+ fi
+fi
+
+##########################################
# signalfd probe
signalfd="no"
cat > $TMPC << EOF
@@ -4187,6 +4214,7 @@ echo "vhdx $vhdx"
echo "Quorum $quorum"
echo "lzo support $lzo"
echo "snappy support $snappy"
+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"
@@ -5158,6 +5186,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.2.229.g4448466
- [Qemu-devel] [PATCH v3.2 12/31] add memdev backend infrastructure, (continued)
- [Qemu-devel] [PATCH v3.2 12/31] add memdev backend infrastructure, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 14/31] memory: reorganize file-based allocation, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 17/31] memory: move preallocation code out of exec.c, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 13/31] numa: add -numa node, memdev= option, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 18/31] memory: move RAM_PREALLOC_MASK to exec.c, rename, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 16/31] memory: add error propagation to file-based RAM allocation, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 19/31] hostmem: add file-based HostMemoryBackend, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 20/31] hostmem: separate allocation from UserCreatable complete method, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 22/31] hostmem: allow preallocation of any memory region, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 21/31] hostmem: add merge and dump properties, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 24/31] configure: add Linux libnuma detection,
Hu Tao <=
- [Qemu-devel] [PATCH v3.2 25/31] hostmem: add properties for NUMA memory policy, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 23/31] hostmem: add property to map memory with MAP_SHARED, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 27/31] qapi: make string input visitor parse int list, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 26/31] Introduce signed range., Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 29/31] qom: introduce object_property_get_enum and object_property_get_uint16List, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 30/31] qmp: add query-memdev, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 28/31] qapi: make string output visitor parse int list, Hu Tao, 2014/05/14
- [Qemu-devel] [PATCH v3.2 31/31] hmp: add info memdev, Hu Tao, 2014/05/14