From: Avi Kivity <avi@qumranet.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: kvm-devel@lists.sourceforge.net, chrisw@sous-sol.org,
Glauber Costa <gcosta@redhat.com>
Subject: Re: [PATCH 0/8] RFC: vcpu pinning at qemu start
Date: Wed, 05 Mar 2008 08:44:05 +0200 [thread overview]
Message-ID: <47CE4135.9050008@qumranet.com> (raw)
In-Reply-To: <47CE16EC.8040603@codemonkey.ws>
Anthony Liguori wrote:
> Glauber Costa wrote:
>
>> Anthony Liguori wrote:
>>
>> No, it can't. Because at the time qemu starts, no vcpu -> thread id
>> relationship exists at all. And we don't know when it will.
>>
>
> Sure we do. The vcpu -> thread id relationship is valid after
> kvm_init_ap() is called which is after machine init but before the
> select loop is entered for the first time. Therefore, if you start qemu
> with -S, then connect on the monitor, and do an info cpus, you could be
> guaranteed to be told the mapping.
>
> The threads are *idle* at this point so there's no harm if they were
> started on the "wrong" CPU. You can now taskset to your hearts content
> and then when you're happy with placement, you can issue a 'cont' so
> that the VM actually starts running. I saw "wrong" because you can
> still taskset the initial creation guaranteeing that the threads are
> created on the right group of physical CPUs, you just can't specify the
> exact mapping until you start interacting with the monitor.
>
>
Good points. Initially I thought we ought to abstract the
implementation and not expose the vcpu thread id, but I'm beginning to
thing that due the wide variety of options (affinity, page migration,
priority, cpu control groups) and the relative obscurity of the feature
(which as you point out, isn't needed in the common case), we can export
the thread id and let the management tools deal with it directly.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
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-05 6:44 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
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 [this message]
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=47CE4135.9050008@qumranet.com \
--to=avi@qumranet.com \
--cc=anthony@codemonkey.ws \
--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