[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V5 05/12] NUMA: Add Linux libnuma detection
From: |
Wanlong Gao |
Subject: |
[Qemu-devel] [PATCH V5 05/12] NUMA: Add Linux libnuma detection |
Date: |
Wed, 17 Jul 2013 17:29:26 +0800 |
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>
---
configure | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/configure b/configure
index cb0f870..7fb14aa 100755
--- a/configure
+++ b/configure
@@ -242,6 +242,7 @@ gtk=""
gtkabi="2.0"
tpm="no"
libssh2=""
+numa=""
# parse CC options first
for opt do
@@ -944,6 +945,10 @@ for opt do
;;
--enable-libssh2) libssh2="yes"
;;
+ --disable-numa) numa="no"
+ ;;
+ --enable-numa) numa="yes"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -1158,6 +1163,8 @@ echo " --gcov=GCOV use specified gcov
[$gcov_tool]"
echo " --enable-tpm enable TPM support"
echo " --disable-libssh2 disable ssh block device support"
echo " --enable-libssh2 enable ssh block device support"
+echo " --disable-numa disable libnuma support"
+echo " --enable-numa enable libnuma support"
echo ""
echo "NOTE: The object files are built at the place where configure is
launched"
exit 1
@@ -2389,6 +2396,27 @@ EOF
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
+
+##########################################
# linux-aio probe
if test "$linux_aio" != "no" ; then
@@ -3587,6 +3615,7 @@ echo "TPM support $tpm"
echo "libssh2 support $libssh2"
echo "TPM passthrough $tpm_passthrough"
echo "QOM debugging $qom_cast_debug"
+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"
@@ -3620,6 +3649,9 @@ echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak
echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
+if test "$numa" = "yes"; then
+ echo "CONFIG_NUMA=y" >> $config_host_mak
+fi
echo "ARCH=$ARCH" >> $config_host_mak
--
1.8.3.2.634.g7a3187e
- [Qemu-devel] [PATCH V5 00/12] Add support for binding guest numa nodes to host numa nodes, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 03/12] NUMA: move numa related code to numa.c, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 05/12] NUMA: Add Linux libnuma detection,
Wanlong Gao <=
- [Qemu-devel] [PATCH V5 07/12] NUMA: split out the common range parser, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 02/12] NUMA: split -numa option, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 06/12] NUMA: parse guest numa nodes memory policy, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 04/12] NUMA: Add numa_info structure to contain numa nodes info, Wanlong Gao, 2013/07/17
- [Qemu-devel] [PATCH V5 08/12] NUMA: set guest numa nodes memory policy, Wanlong Gao, 2013/07/17