[vfio-users] Memory allocation with numatune

Thomas Lindroth thomas.lindroth at gmail.com
Sat Jan 28 11:58:41 UTC 2017


On 01/27/2017 04:52 PM, Alex Williamson wrote:
> vcpupin actually looks a little off though, just like on the host, the
> VM is going to enumerate cores then threads

Are you sure about that? Perhaps there is some numa trick I don't
understand but it looks like the guest is a regular 6 cores
with HT (<topology sockets='1' cores='6' threads='2'/>) and
for me setups like that results in a layouts like this in the
guest (qemu-2.8.0):

cat /proc/cpuinfo |grep "core id"
core id         : 0
core id         : 0
core id         : 1
core id         : 1
core id         : 2
core id         : 2

The ordering in the guest is threads then cores but for the
host it's the other way around

cat /proc/cpuinfo |grep "core id"
core id         : 0
core id         : 1
core id         : 2
core id         : 3
core id         : 0
core id         : 1
core id         : 2
core id         : 3

Cores then threads. So to get a 1:1 match I have to use
pinning like this which is similar to that numa setup.

<vcpupin vcpu='0' cpuset='1'/>
<vcpupin vcpu='1' cpuset='5'/>
<vcpupin vcpu='2' cpuset='2'/>
<vcpupin vcpu='3' cpuset='6'/>
<vcpupin vcpu='4' cpuset='3'/>
<vcpupin vcpu='5' cpuset='7'/>
<topology sockets='1' cores='3' threads='2'/>




More information about the vfio-users mailing list