Skip to content

RFC NUMA: add host side pinning

Andre Przywara kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3NUMA: add Linux libnuma detectionconfigure+33 -00 replies
2/3NUMA: add parsing of host NUMA pin optionsysemu.h vl.c+19 -00 replies
3/3NUMA: realize NUMA memory pinninghw/pc.c+51 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3][RFC] NUMA: add host side pinning

Hi,

these three patches add basic NUMA pinning to KVM. According to a user provided assignment parts of the guest's memory will be bound to different host nodes. This should increase performance in large virtual machines and on loaded hosts.
These patches are quite basic (but work) and I send them as RFC to get some feedback before implementing stuff in vain.

To use it you need to provide a guest NUMA configuration, this could be as simple as "-numa node -numa node" to give two nodes in the guest. Then you pin these nodes on a separate command line option to different host
nodes: "-numa pin,nodeid=0,host=0 -numa pin,nodeid=1,host=2" This separation of host and guest config sounds a bit complicated, but was demanded last time I submitted a similar version.
I refrained from binding the vCPUs to physical CPUs for now, but this can be added later with an "cpubind" option to "-numa pin,". Also this could be done from a management application by using sched_setaffinity().

Please note that this is currently made for qemu-kvm, although I am not up-to-date regarding the curent status of upstreams QEMU's true SMP capabilities. The final patch will be made against upstream QEMU anyway. Also this is currently for Linux hosts (any other KVM hosts alive?) and for PC guests only. I think both can be fixed easily if someone requests it (and gives me a pointer to further information).

Please comment on the approach in general and the implementation.

Thanks and Regards,
Andre.

Signature · 2 lines
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany