Hi
I have successfully created a KVM, and i'm trying to follow this guide on how to do cpu pinning.
In their example XML code i see that they are passing the vCPU, and then the next thing that is written a cpuset. I don't quite understand what this is, and how it correlates in this way in their example.Could anyone please help me a bit here?
Here is my cpu layout, and I want to pass through everything but core 0. Which is then every vCPU except 0 and 16. But how should my xml look like then?
my: lscpu -e
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ
0 0 0 0 0:0:0:0 yes 3500,0000 2200,0000
1 0 0 1 1:1:1:0 yes 3500,0000 2200,0000
2 0 0 2 2:2:2:0 yes 3500,0000 2200,0000
3 0 0 3 3:3:3:0 yes 3500,0000 2200,0000
4 0 0 4 4:4:4:1 yes 3500,0000 2200,0000
5 0 0 5 5:5:5:1 yes 3500,0000 2200,0000
6 0 0 6 6:6:6:1 yes 3500,0000 2200,0000
7 0 0 7 7:7:7:1 yes 3500,0000 2200,0000
8 0 0 8 8:8:8:2 yes 3500,0000 2200,0000
9 0 0 9 9:9:9:2 yes 3500,0000 2200,0000
10 0 0 10 10:10:10:2 yes 3500,0000 2200,0000
11 0 0 11 11:11:11:2 yes 3500,0000 2200,0000
12 0 0 12 12:12:12:3 yes 3500,0000 2200,0000
13 0 0 13 13:13:13:3 yes 3500,0000 2200,0000
14 0 0 14 14:14:14:3 yes 3500,0000 2200,0000
15 0 0 15 15:15:15:3 yes 3500,0000 2200,0000
16 0 0 0 0:0:0:0 yes 3500,0000 2200,0000
17 0 0 1 1:1:1:0 yes 3500,0000 2200,0000
18 0 0 2 2:2:2:0 yes 3500,0000 2200,0000
19 0 0 3 3:3:3:0 yes 3500,0000 2200,0000
20 0 0 4 4:4:4:1 yes 3500,0000 2200,0000
21 0 0 5 5:5:5:1 yes 3500,0000 2200,0000
22 0 0 6 6:6:6:1 yes 3500,0000 2200,0000
23 0 0 7 7:7:7:1 yes 3500,0000 2200,0000
24 0 0 8 8:8:8:2 yes 3500,0000 2200,0000
25 0 0 9 9:9:9:2 yes 3500,0000 2200,0000
26 0 0 10 10:10:10:2 yes 3500,0000 2200,0000
27 0 0 11 11:11:11:2 yes 3500,0000 2200,0000
28 0 0 12 12:12:12:3 yes 3500,0000 2200,0000
29 0 0 13 13:13:13:3 yes 3500,0000 2200,0000
30 0 0 14 14:14:14:3 yes 3500,0000 2200,0000
31 0 0 15 15:15:15:3 yes 3500,0000 2200,0000
Here is the xml code that has me confused
...
<vcpu placement='static'>8</vcpu>
<iothreads>1</iothreads>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='8'/>
<vcpupin vcpu='2' cpuset='3'/>
<vcpupin vcpu='3' cpuset='9'/>
<vcpupin vcpu='4' cpuset='4'/>
<vcpupin vcpu='5' cpuset='10'/>
<vcpupin vcpu='6' cpuset='5'/>
<vcpupin vcpu='7' cpuset='11'/>
<emulatorpin cpuset='0,6'/>
<iothreadpin iothread='1' cpuset='0,6'/>
</cputune>
...
<topology sockets='1' cores='4' threads='2'/>
...
I don't understand why their "cpuset" seems to be so random. From their lscpu -e output
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ
0 0 0 0 0:0:0:0 yes 4600.0000 800.0000
1 0 0 1 1:1:1:0 yes 4600.0000 800.0000
2 0 0 2 2:2:2:0 yes 4600.0000 800.0000
3 0 0 3 3:3:3:0 yes 4600.0000 800.0000
4 0 0 4 4:4:4:0 yes 4600.0000 800.0000
5 0 0 5 5:5:5:0 yes 4600.0000 800.0000
6 0 0 0 0:0:0:0 yes 4600.0000 800.0000
7 0 0 1 1:1:1:0 yes 4600.0000 800.0000
8 0 0 2 2:2:2:0 yes 4600.0000 800.0000
9 0 0 3 3:3:3:0 yes 4600.0000 800.0000
10 0 0 4 4:4:4:0 yes 4600.0000 800.0000
11 0 0 5 5:5:5:0 yes 4600.0000 800.0000