[RFC] exclusive vcpu-cpu pinning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello developers!

Currently, our default cgroup layout is:
-top level cgroup
\-machine (machine.slice with systemd)
 `-vm1.libvirt-qemu (machine-qemu\x2dvm1.scope with systemd)
  `-emulator
  `-vcpu0
  \-vcpu1
 \-vm2.libvirt-qemu
  `-emulator
  `-vcpu0
  `-vcpu1

To free some CPUs for exclusive use, either all processes from the top level
cgroup should be moved to another one (which does not seem like a great idea)
or isolcpus= should be specified on the kernel command line.

The cpuset.cpu_exclusive option can be set on a cgroup if
* all the groups up to the top level group have it set
* the cpuset of the current group is a subset of the parent group
  and no siblings use any cpus from the current cpuset

This would mean that to keep the existing nested structure, all vcpus and the
emulator thread would need to have an exclusive CPU, e.g:
  <vcpu placement='static' cpuset='4-6'>2</vcpu>
  <cputune exclusive='yes'>
    <vcpupin vcpu='0' cpuset='5'/>
    <vcpupin vcpu='1' cpuset='6'/>
    <emulatorpin cpuset='4'/>
  </cputune>

(The only two issues I found:
 1) libvirt would have to mess with systemd's 'machine-scope' behind it's back
(setting cpu_exclusive)
 2) creating machines without explicit cpu pinning fails, as libvirt tries to
    write all the cpus to the cpuset, even those the other machine uses
    exclusively)

I've also thought about just keeping track of the 'exclusived' CPUs in
libvirt. This would not work across drivers. And it could possibly be needed
to solve issue 2).

Do you think any of these options would be useful?

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=996758

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]