From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: [PATCH 0/4]: NUMA: add host binding Date: Wed, 11 Aug 2010 15:52:14 +0200 Message-ID: <1281534738-8310-1-git-send-email-andre.przywara@amd.com> Mime-Version: 1.0 Content-Type: text/plain Cc: kvm@vger.kernel.org To: avi@redhat.com, anthony@codemonkey.ws Return-path: Received: from tx2ehsobe002.messaging.microsoft.com ([65.55.88.12]:50037 "EHLO TX2EHSOBE004.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605Ab0HKNw0 (ORCPT ); Wed, 11 Aug 2010 09:52:26 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Hi, the following 4 patches add NUMA host binding to qemu(-kvm). They allow to specify NUMA policies to be applied to each of the (separately specified) guest NUMA nodes. It mimics numactl's syntax, allowing "membind", "preferred" and "interleave" as possible policies. An example is: $ qemu -smp 4 ... -numa node,cpus=0,mem=1024M \ -numa node,cpus=1-2,mem=2048M -numa node,cpus=3,mem=1024M \ -numa host,nodeid=0,membind=0 -numa host,nodeid=1,interleave=0-1 \ -numa host,nodeid=2,preferred=!0 The complete syntax is: -numa host,nodeid=,\ (membind|preferred|interleave)=[+!][-] The '+' denotes CPUSET relative nodes, '!' means negation (see numactl(8)). As it can be easier done from outside of QEMU, I completely left out vCPU binding, AFAIK management applications do this today already. This version is based on the new generic bitmap code submitted with patch 11/15 of the VNC update by Corentin Chary on Aug 11th: http://lists.gnu.org/archive/html/qemu-devel/2010-08/msg00517.html So it requires this patch to build (but not to apply). Please comment! Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany