From patchwork Wed Jun 23 21:09:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 107685 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5NLBVGg014742 for ; Wed, 23 Jun 2010 21:11:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752532Ab0FWVLQ (ORCPT ); Wed, 23 Jun 2010 17:11:16 -0400 Received: from va3ehsobe003.messaging.microsoft.com ([216.32.180.13]:25930 "EHLO VA3EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752188Ab0FWVLK (ORCPT ); Wed, 23 Jun 2010 17:11:10 -0400 Received: from mail188-va3-R.bigfish.com (10.7.14.235) by VA3EHSOBE003.bigfish.com (10.7.40.23) with Microsoft SMTP Server id 8.1.340.0; Wed, 23 Jun 2010 21:11:09 +0000 Received: from mail188-va3 (localhost.localdomain [127.0.0.1]) by mail188-va3-R.bigfish.com (Postfix) with ESMTP id A7B2216100AF; Wed, 23 Jun 2010 21:11:08 +0000 (UTC) X-SpamScore: -1 X-BigFish: VPS-1(zz936eM853kzz1202hzzz32i2a8h43h61h) X-Spam-TCS-SCL: 0:0 Received: from mail188-va3 (localhost.localdomain [127.0.0.1]) by mail188-va3 (MessageSwitch) id 1277327457310493_20303; Wed, 23 Jun 2010 21:10:57 +0000 (UTC) Received: from VA3EHSMHS011.bigfish.com (unknown [10.7.14.249]) by mail188-va3.bigfish.com (Postfix) with ESMTP id B7A1EC4813B; Wed, 23 Jun 2010 21:10:45 +0000 (UTC) Received: from ausb3extmailp01.amd.com (163.181.251.8) by VA3EHSMHS011.bigfish.com (10.7.99.21) with Microsoft SMTP Server (TLS) id 14.0.482.44; Wed, 23 Jun 2010 21:10:37 +0000 Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o5NLEBhk012694; Wed, 23 Jun 2010 16:14:14 -0500 X-WSS-ID: 0L4HK5J-02-KI1-02 X-M-MSG: Received: from sausexhtp01.amd.com (sausexhtp01.amd.com [163.181.3.165]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 2B62BC8873; Wed, 23 Jun 2010 16:10:30 -0500 (CDT) Received: from storexhtp01.amd.com (172.24.4.3) by sausexhtp01.amd.com (163.181.3.165) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 23 Jun 2010 16:10:32 -0500 Received: from gwo.osrc.amd.com (165.204.16.204) by storexhtp01.amd.com (172.24.4.3) with Microsoft SMTP Server id 8.2.254.0; Wed, 23 Jun 2010 17:10:31 -0400 Received: from localhost.localdomain (tronje.osrc.amd.com [165.204.15.48]) by gwo.osrc.amd.com (Postfix) with ESMTP id 1429349C174; Wed, 23 Jun 2010 22:10:31 +0100 (BST) From: Andre Przywara To: CC: , , Andre Przywara Subject: [PATCH 1/3] NUMA: add Linux libnuma detection Date: Wed, 23 Jun 2010 23:09:35 +0200 Message-ID: <1277327377-29629-2-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.4 In-Reply-To: <1277327377-29629-1-git-send-email-andre.przywara@amd.com> References: <1277327377-29629-1-git-send-email-andre.przywara@amd.com> MIME-Version: 1.0 X-Reverse-DNS: unknown Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 23 Jun 2010 21:11:31 +0000 (UTC) diff --git a/configure b/configure index 08883e7..3e2dc5b 100755 --- a/configure +++ b/configure @@ -281,6 +281,7 @@ vnc_sasl="" xen="" linux_aio="" vhost_net="" +numa="yes" gprof="no" debug_tcg="no" @@ -721,6 +722,10 @@ for opt do ;; --enable-vhost-net) vhost_net="yes" ;; + --disable-numa) numa="no" + ;; + --enable-numa) numa="yes" + ;; --*dir) ;; *) echo "ERROR: unknown option $opt"; show_help="yes" @@ -905,6 +910,8 @@ echo " --enable-docs enable documentation build" echo " --disable-docs disable documentation build" echo " --disable-vhost-net disable vhost-net acceleration support" echo " --enable-vhost-net enable vhost-net acceleration support" +echo " --disable-numa disable host Linux NUMA support" +echo " --enable-numa enable host Linux NUMA support" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -1962,6 +1969,28 @@ if compile_prog "" "" ; then signalfd=yes fi +########################################## +# libnuma probe + +if test "$numa" = "yes" ; then + numa=no + cat > $TMPC << EOF +#include +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 + + # check if eventfd is supported eventfd=no cat > $TMPC << EOF @@ -2245,6 +2274,7 @@ echo "preadv support $preadv" echo "fdatasync $fdatasync" echo "uuid support $uuid" echo "vhost-net support $vhost_net" +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" @@ -2468,6 +2498,9 @@ if test $cpu_emulation = "yes"; then else echo "CONFIG_NO_CPU_EMULATION=y" >> $config_host_mak fi +if test "$numa" = "yes"; then + echo "CONFIG_NUMA=y" >> $config_host_mak +fi # XXX: suppress that if [ "$bsd" = "yes" ] ; then