From: Andre Przywara <andre.przywara@amd.com>
To: KVM list <kvm@vger.kernel.org>, QEMU devel <qemu-devel@nongnu.org>
Subject: Using Linux's CPUSET for KVM VCPUs
Date: Thu, 22 Jul 2010 16:03:13 +0200 [thread overview]
Message-ID: <4C484FA1.60701@amd.com> (raw)
Hi all,
while working on NUMA host pinning, I experimented with vCPU affinity
within QEMU, but left it alone as it would complicate the code and would
not achieve better experience than using taskset with the monitor
provided thread ids like it is done currently. During that I looked at
Linux' CPUSET implementation
(/src/linux-2.6/Documentation/cgroups/cpusets.txt).
In brief, this is a pseudo file system based, truly hierarchical
implementation of restricting a set of processes (or threads, it uses
PIDs) to a certain subset of the machine.
Sadly we cannot leverage this for true guest NUMA memory assignment, but
it would work nice for pinning (or not) guest vCPUs. I had the following
structure in mind:
For each guest there is a new CPUSET (mkdir $CPUSET_MNT/`cat
/proc/$$/cpuset`/kvm_$guestname). One could then assign the guest global
resources to this CPUSET.
For each vCPU there is a separate CPUSET located under this guest global
one. This would allow for easy manipulation of the pinning of vCPUs,
even from the console without any mgt app (although this could be easily
implemented in libvirt).
/
|
+--/ kvm_guest_01
| |
| +-- VCPU0
| |
| +-- VCPU1
|
+--/ kvm_guest_02
...
What do you think about it? It is worth implementing this?
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
next reply other threads:[~2010-07-22 14:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 14:03 Andre Przywara [this message]
2010-07-22 14:43 ` [Qemu-devel] Using Linux's CPUSET for KVM VCPUs Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C484FA1.60701@amd.com \
--to=andre.przywara@amd.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox