From: "Daniel P. Berrange" <berrange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: kvm-devel@lists.sourceforge.net, chrisw@sous-sol.org,
avi@qumranet.com, Glauber Costa <gcosta@redhat.com>
Subject: Re: [PATCH 0/8] RFC: vcpu pinning at qemu start
Date: Tue, 4 Mar 2008 19:42:58 +0000 [thread overview]
Message-ID: <20080304194258.GP6713@redhat.com> (raw)
In-Reply-To: <47CDA2D8.7060709@codemonkey.ws>
On Tue, Mar 04, 2008 at 01:28:24PM -0600, Anthony Liguori wrote:
> Glauber Costa wrote:
> > My main interest is in management tools being able to specify pinning
> > set ups at VM creation time.
> >
> > As I said, it can be done through tools like taskset, but then you'd
> > have to know:
> > * when are the threads created
> > * which thread ids corresponds to each cpu
> >
> > And of course, for an amount of time, the threads will be running in a
> > "wrong" cpu, which may affect workloads running there. (which is a
> > case cpu pinning usually tries to address)
>
> A management tool can start QEMU with -S to prevent any CPUs from
> running, query the VCPU=>thread id relationship (modifying info cpus
> would be a good thing to do for this), taskset, and then run 'cont' in
> the monitor if they desperately need this functionality. However, I
> don't think the vast majority of people need this particular functionality.
I fully expected to have to run QEMU with -S and then use cont if I were
todo CPU pinning from libvirt.
The only info I'd need to get is the PID <-> vCPU mapping data. Then
I can use regular Linux taskset capabilities from libvirt to assign the
initial pCPU <-> vCPU mapping and finally run 'cont'.
> My feeling is that adding an interface to do this in QEMU encourages
> people to not use the existing Linux tools for this or worse yet, to
> think they can do a better job than Linux. The whole reason this exists
> in Xen is that Xen's schedulers were incapable of doing CPU migration
> historically (which is no longer true since the credit scheduler). It
> was necessary to specify pinning upon creation or you were stuck with
> round-robin placement. So libvirt has APIs for this because they were
> part of the Xen API because it was needed to get reasonable performance
> at some point in time on Xen. I don't think this behavior is useful for
> KVM though. Just because Xen does it doesn't imply that we should do it.
I agree that adding QEMU commands for stuff which Linux already has APIs
and tools is a bad idea. QEMU/KVM is much nicer to manage than Xen,
precisely because I can already use Linux APIs & process management tools.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-03-04 19:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 16:21 [PATCH 0/8] RFC: vcpu pinning at qemu start Glauber Costa
2008-03-04 16:21 ` [PATCH 1/8] add thread id to vcpu structure Glauber Costa
2008-03-04 16:21 ` [PATCH 2/8] provide a gettid function Glauber Costa
2008-03-04 16:21 ` [PATCH 3/8] get thread id at thread's creation Glauber Costa
2008-03-04 16:21 ` [PATCH 4/8] store and set cpu affinities Glauber Costa
2008-03-04 16:21 ` [PATCH 5/8] initialize affinities Glauber Costa
2008-03-04 16:21 ` [PATCH 6/8] stabilish default affinity for newly created cpus Glauber Costa
2008-03-04 16:22 ` [PATCH 7/8] process a cpu affinity mask Glauber Costa
2008-03-04 16:22 ` [PATCH 8/8] provide -cpu-map option Glauber Costa
2008-03-04 17:26 ` [PATCH 0/8] RFC: vcpu pinning at qemu start Joerg Roedel
2008-03-04 18:11 ` Glauber Costa
2008-03-04 18:19 ` Joerg Roedel
2008-03-04 17:42 ` Anthony Liguori
2008-03-04 18:10 ` Glauber Costa
2008-03-04 19:28 ` Anthony Liguori
2008-03-04 19:42 ` Daniel P. Berrange [this message]
2008-03-04 20:00 ` Glauber Costa
2008-03-04 19:59 ` Glauber Costa
2008-03-05 3:43 ` Anthony Liguori
2008-03-05 6:44 ` Avi Kivity
2008-03-05 13:10 ` Glauber Costa
2008-03-05 5:35 ` Avi Kivity
2008-03-05 14:29 ` Anthony Liguori
2008-03-05 5:28 ` Avi Kivity
2008-03-05 13:13 ` Glauber Costa
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=20080304194258.GP6713@redhat.com \
--to=berrange@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=avi@qumranet.com \
--cc=chrisw@sous-sol.org \
--cc=gcosta@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
/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