From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkAYd-0000sx-Sl for qemu-devel@nongnu.org; Wed, 05 Jun 2013 06:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkAYa-0007oF-Ep for qemu-devel@nongnu.org; Wed, 05 Jun 2013 06:03:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52328 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkAYa-0007nq-5R for qemu-devel@nongnu.org; Wed, 05 Jun 2013 06:03:04 -0400 Message-ID: <51AF0CD2.80602@suse.de> Date: Wed, 05 Jun 2013 12:02:58 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1370404705-4620-1-git-send-email-gaowanlong@cn.fujitsu.com> In-Reply-To: <1370404705-4620-1-git-send-email-gaowanlong@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] Add Linux libnuma detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wanlong Gao Cc: andre.przywara@amd.com, aliguori@us.ibm.com, pbonzini@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com Am 05.06.2013 05:58, schrieb Wanlong Gao: > Add detection of libnuma (mostly contained in the numactl package) > to the configure script. Currently this is Linux only, but can be > extended later should the need for other interfaces come up. > Can be enabled or disabled on the command line, default is use if > available. >=20 > Original-signed-off-by: Andre Przywara This should be just Signed-off-by, the difference between From and Sob already indicates you changed his code. > Signed-off-by: Wanlong Gao > --- > configure | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) >=20 > diff --git a/configure b/configure > index 1654413..d897f98 100755 > --- a/configure > +++ b/configure > @@ -242,6 +242,7 @@ gtk=3D"" > gtkabi=3D"2.0" > tpm=3D"no" > libssh2=3D"" > +numa=3D"yes" This should be "" by default - it is not needed by linux-user and when --enable-numa is used we should error out if it's not there. > =20 > # parse CC options first > for opt do > @@ -937,6 +938,10 @@ for opt do > ;; > --enable-libssh2) libssh2=3D"yes" > ;; > + --disable-numa) numa=3D"no" > + ;; > + --enable-numa) numa=3D"yes" > + ;; > *) echo "ERROR: unknown option $opt"; show_help=3D"yes" > ;; > esac > @@ -1151,6 +1156,8 @@ echo " --gcov=3DGCOV 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 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 > @@ -2382,6 +2389,27 @@ EOF > fi > =20 > ########################################## > +# libnuma probe > + > +if test "$numa" =3D "yes" ; then Requires to check for !=3D "no" here. > + numa=3Dno > + cat > $TMPC << EOF > +#include > +int main(void) { return numa_available(); } > +EOF > + > + if compile_prog "" "-lnuma" ; then > + numa=3Dyes > + libs_softmmu=3D"-lnuma $libs_softmmu" > + else > + if test "$numa" =3D "yes" ; then > + feature_not_found "linux NUMA (install numactl?)" > + fi > + numa=3Dno > + fi > +fi > + > +########################################## > # linux-aio probe > =20 > if test "$linux_aio" !=3D "no" ; then > @@ -3550,6 +3578,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" > =20 > if test "$sdl_too_old" =3D "yes"; then > echo "-> Your SDL version is too old - please upgrade to have SDL supp= ort" > @@ -3584,6 +3613,9 @@ echo "extra_cflags=3D$EXTRA_CFLAGS" >> $config_ho= st_mak > echo "extra_ldflags=3D$EXTRA_LDFLAGS" >> $config_host_mak > echo "qemu_localedir=3D$qemu_localedir" >> $config_host_mak > echo "libs_softmmu=3D$libs_softmmu" >> $config_host_mak > +if test "$numa" =3D "yes"; then > + echo "CONFIG_NUMA=3Dy" >> $config_host_mak > +fi > =20 > echo "ARCH=3D$ARCH" >> $config_host_mak > =20 >=20 Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg