Bug 996758 - support exclusive vcpu<->cpu pinning
Summary: support exclusive vcpu<->cpu pinning
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Luyao Huang
Depends On:
TreeView+ depends on / blocked
Reported: 2013-08-13 21:33 UTC by Marcelo Tosatti
Modified: 2017-05-22 17:18 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-05-22 17:18:51 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Marcelo Tosatti 2013-08-13 21:33:03 UTC
Add an option to allow for exclusive CPU <-> VCPU assignment:

"what they need now is the ability to disable any kind of overcommit 
(CPU and RAM). So for example if they have a core already pinned to 
a VM, they don't want another VM to use it."

Comment 3 Ján Tomko 2014-07-31 11:18:01 UTC
I've sent a design proposal upstream:

Comment 6 Ján Tomko 2017-05-22 17:18:51 UTC
isolating other processes is out of scope of libvirt.

Manually assigning VMs to separate cpusets should be working already, after fixes like:
commit ff16bde100e19fbff17a964c08321f30f87afb22
Author:     Henning Schild <henning.schild@siemens.com>
AuthorDate: 2016-02-26 16:34:24 +0100
Commit:     Daniel P. Berrange <berrange@redhat.com>
CommitDate: 2016-03-01 14:07:27 +0000

    qemu_cgroup: use virCgroupAddTask instead of virCgroupMoveTask
    qemuProcessSetupEmulator runs at a point in time where there is only
    the qemu main thread. Use virCgroupAddTask to put just that one task
    into the emulator cgroup. That patch makes virCgroupMoveTask and
    virCgroupAddTaskStrController obsolete.
    Signed-off-by: Henning Schild <henning.schild@siemens.com>

git describe: v1.3.2-28-gff16bde contains: v1.3.3-rc1~318

commit 8e21e8d110743c66d2be258f8f39173f66c5c3b3
Author:     Henning Schild <henning.schild@siemens.com>
AuthorDate: 2016-02-26 16:34:23 +0100
Commit:     Daniel P. Berrange <berrange@redhat.com>
CommitDate: 2016-03-01 14:07:27 +0000

    qemu_cgroup: put qemu right into emulator sub-cgroup
    Move qemuProcessSetupEmulator up under qemuSetupCgroup. That way
    we move the one main thread right into the emulator cgroup, instead
    of moving multiple threads later on. And we do not actually want any
    threads running in the parent cgroups (cpu cpuacct cpuset).
    Signed-off-by: Henning Schild <henning.schild@siemens.com>

git describe: v1.3.2-27-g8e21e8d contains: v1.3.3-rc1~319

commit 90b721e43ec9232b5b218e891437bed04548e841
Author:     Henning Schild <henning.schild@siemens.com>
AuthorDate: 2015-12-14 15:58:05 -0500
Commit:     John Ferlan <jferlan@redhat.com>
CommitDate: 2015-12-14 15:58:05 -0500

    qemu cgroups: move new threads to new cgroup after cpuset is set up
    Moving tasks to cgroups implied sched_setaffinity. Changing the cpus in
    a set implies the same for all tasks in the group.
    The old code put the the thread into the cpuset inherited from the
    machine cgroup, which allowed it to run outside of vcpupin for a short
    Signed-off-by: Henning Schild <henning.schild@siemens.com>

git describe: v1.3.0-66-g90b721e contains: v1.3.1-rc1~196

Note You need to log in before you can comment on or make changes to this bug.