From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: Re: [PATCH 1/3] KVM-userspace: introduce -nodes command line option Date: Fri, 28 Nov 2008 10:15:15 +0000 Message-ID: <20081128101513.GA26647@redhat.com> References: <492F1E48.4000500@amd.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org To: Andre Przywara Return-path: Received: from mx1.redhat.com ([66.187.233.31]:45381 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102AbYK1KPT (ORCPT ); Fri, 28 Nov 2008 05:15:19 -0500 Content-Disposition: inline In-Reply-To: <492F1E48.4000500@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Nov 27, 2008 at 11:25:12PM +0100, Andre Przywara wrote: > The attached patch parses a list of host nodes given on the command line > and passes it on to lower levels (namely qemu-kvm.c) > diff --git a/qemu/sysemu.h b/qemu/sysemu.h > index 5abda5c..07acaf4 100644 > --- a/qemu/sysemu.h > +++ b/qemu/sysemu.h > @@ -99,6 +99,11 @@ extern int win2k_install_hack; > extern int alt_grab; > extern int usb_enabled; > extern int smp_cpus; > + > +#define MAX_NODES 64 > +extern int numnumanodes; > +extern int hostnodes[MAX_NODES]; This is rather less than Linux / libnuma seems to allow for max nodes. In numa.h there is #if defined(__x86_64__) || defined(__i386__) #define NUMA_NUM_NODES 128 #else #define NUMA_NUM_NODES 2048 #endif Should we just use that NUMA_NUM_NODES constant directly from numa.h when numa is compiled in, so we're guarenteed to match. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|