[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/3] add NUMA support to QEMU
From: |
Andre Przywara |
Subject: |
[Qemu-devel] [PATCH 0/3] add NUMA support to QEMU |
Date: |
Thu, 11 Dec 2008 12:28:19 +0100 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080508) |
Hi,
the following patches add support for NUMA (Non-Uniform Memory Access)
guests in QEMU. Since QEMU lacks real SMP support, this is mostly for
debugging or research, but will improve performance in KVM (with
additional KVM-only patches).
1/3: The user specifies a NUMA topology on the command line:
-numa
<nrnodes>[,mem:size1[;size2..]][,cpu:cpu1[;cpu2..]][,pin:node1[;node2]]
Beside the number of nodes all other arguments are optional, so possible
command lines are:
-numa 2
/* inject two NUMA nodes into the guest, distribute guest CPUs and
memory equally over the two nodes, don't pin the memory to host nodes*/
-smp 4 -numa 3,mem:1536M;768M;768M,cpu:0-1;2;3
/* inject three nodes, distribute the memory and cpu as described:
node0: 1536M, CPUs 0,1; node1: 768M, CPU 2; node2: 768M, CPU 3 */
-numa 2,pin:2;*
/* inject two nodes, allocate the memory for the first node from the
host node 2, the second node has no affinity (all host nodes) */
Please note that ; and * must be escaped on the shell.
For now it is not recommended to use host pinning in pure QEMU.
2/3: If libnuma is available (package numactl), QEMU will try to
allocate memory from the given nodes (or skip this if no pin: argument
is given). The NUMA topology is then pushed via the firmware
configuration interface to the BIOS.
The missing patch to build the ACPI SRAT table in the BIOS will be sent
if the BIOS is updated to the current BOCHS version.
3/3: Add monitor support: info numa will print information about the
guest and host NUMA status.
The numa command expects the same string as on the command line
(described above), only that the number of nodes must be omitted. The
memory and guest CPU affinity cannot be changed on the fly, because this
information is in a static BIOS table.
So the only useful command is to change the pinning:
numa pin:0;1
/* will pin the first guest node to host node 0, the second guest node
to host node 1 */
numa pin:;*
/* will leave the first guest node alone (no changes), the second guest
node can allocate from all host nodes */
As there is no SMP host support in QEMU, VCPUs cannot be pinned, this is
a KVM-only feature.
If this is acceptable please tell me and I will send documentation updates.
Comments are welcome.
Regards,
Andre.
Signed-off-by: Andre Przywara <address@hidden>
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH 0/3] add NUMA support to QEMU,
Andre Przywara <=