[vfio-users] Memory allocation with numatune

Alex Williamson alex.williamson at redhat.com
Fri Jan 27 15:52:50 UTC 2017


On Fri, 27 Jan 2017 11:58:05 +0100
Jan Wiele <jan at wiele.org> wrote:

> Hi,
> I've two E5-2670 CPUs and want to pin a VM to a node. CPU pinning works fine, 
> however memory allocation seems to happen randomly. Sometimes it is done on 
> node 0, sometimes on node 1.
> 
> My VM config: http://pastebin.com/raw/J6trq7gJ
> I'm on Arch Linux Kernel 4.8.13-1 with libvirt 2.4.0-2
> 
> Any ideas? 

Looks like it should work to me.  I've certainly tested this sort of
setup on RHEL and Fedora in the past and it did the right thing.  Your
vcpupin actually looks a little off though, just like on the host, the
VM is going to enumerate cores then threads, this is why your numactl
info shows node0 w/ {0-7,16-23}, node1 w/ {8-15,24-31}, ie.
{cores,threads}.  By interleaving the node1 pinning as you've done, the
mapping is off in the VM.  For instance, the guest will think CPU0 and
CPU6 are threads on the same core, but they're mapped to CPU8 and CPU11
on the host, which are unrelated.  I know that doesn't help your
numatune issue though.




More information about the vfio-users mailing list