From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDrVT-00046F-9N for qemu-devel@nongnu.org; Mon, 26 Aug 2013 03:46:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDrVO-0000VP-Ru for qemu-devel@nongnu.org; Mon, 26 Aug 2013 03:46:35 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:43517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDrVO-0000VA-Jh for qemu-devel@nongnu.org; Mon, 26 Aug 2013 03:46:30 -0400 Date: Mon, 26 Aug 2013 03:46:21 -0400 (EDT) From: Andrew Jones Message-ID: <588686645.448144.1377503181634.JavaMail.root@redhat.com> In-Reply-To: <521AB2C1.40306@cn.fujitsu.com> References: <1377231003-2816-1-git-send-email-gaowanlong@cn.fujitsu.com> <1377231003-2816-7-git-send-email-gaowanlong@cn.fujitsu.com> <433635292.2972869.1377247246639.JavaMail.root@redhat.com> <521AB2C1.40306@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: gaowanlong@cn.fujitsu.com Cc: aliguori@us.ibm.com, ehabkost@redhat.com, qemu-devel@nongnu.org, hutao@cn.fujitsu.com, peter huangpeng , lcapitulino@redhat.com, bsd@redhat.com, y-goto@jp.fujitsu.com, pbonzini@redhat.com, lersek@redhat.com, afaerber@suse.de ----- Original Message ----- > On 08/23/2013 04:40 PM, Andrew Jones wrote: > > > > > > ----- Original Message ----- > >> 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 > >> Signed-off-by: Wanlong Gao > > > > Is this patch still necessary? I thought that dropping the > > numa_num_configured_nodes() calls from patch 8/12 got rid > > of the need for this library. Maybe I missed other uses? > > Yes, in 08/12 we also use mbind(), You don't need a whole library for mbind(), it's a syscall. See syscall(2). > and in 09/12 we use max_numa_node(). Really? I didn't see it there. And anyway, that goes back to our discussion about setting qemu's MAX_NODES to whatever we think qemu should support, and then just checking that we don't blow that limit whenever reading host node info, i.e. maxnode = 0; while (host_nodes[maxnode] && maxnode < MAX_NODES) node_read(&info[maxnode++]); type of a thing. And, if there's a place you really need to know the current online number of host nodes, then, like I said earlier, you should just go to sysfs yourself. libnuma:numa_max_node() returns an int that it only initializes at library load time, so it's not going to adapt to onlining/offlining. drew > > Thanks, > Wanlong Gao > > > > > drew > > > > >