From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/3] KVM-userspace: add NUMA support for guests Date: Sat, 29 Nov 2008 20:29:36 +0200 Message-ID: <49318A10.7080801@redhat.com> References: <492F1DD9.8030901@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Andre Przywara Return-path: Received: from mx2.redhat.com ([66.187.237.31]:50573 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbYK2S32 (ORCPT ); Sat, 29 Nov 2008 13:29:28 -0500 In-Reply-To: <492F1DD9.8030901@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: Andre Przywara wrote: > The user (or better: management application) specifies the host nodes > the guest should use: -nodes 2,3 would create a two node guest mapped to > node 2 and 3 on the host. These numbers are handed over to libnuma: > VCPUs are pinned to the nodes and the allocated guest memory is bound to > it's respective node. Since libnuma seems not to be installed > everywhere, the user has to enable this via configure --enable-numa > In the BIOS code an ACPI SRAT table was added, which describes the NUMA > topology to the guest. The number of nodes is communicated via the CMOS > RAM (offset 0x3E). If someone thinks of this as a bad idea, tell me. There exists now a firmware interface in qemu for this kind of communications. > To take use of the new BIOS, install the iasl compiler > (http://acpica.org/downloads/) and type "make bios" before installing, > so the default BIOS will be replaced with the modified one. > Node over-committing is allowed (-nodes 0,0,0,0), omitting the -nodes > parameter reverts to the old behavior. '-nodes' is too generic a name ('node' could also mean a host). Suggest -numanode. Need more flexibility: specify the range of memory per node, which cpus are in the node, relative weights for the SRAT table: -numanode node=1,cpu=2,cpu=3,start=1G,size=1G,hostnode=3 Also need a monitor command to change host nodes dynamically: (qemu) numanode 1 0 -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.