From: David Gibson <david@gibson.dropbear.id.au>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: zhugh.fnst@cn.fujitsu.com, qemu-devel@nongnu.org, agraf@suse.de,
Bharata B Rao <bharata.rao@gmail.com>,
imammedo@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [RFC v0 PATCH] cpus: Convert cpu_index into a bitmap
Date: Thu, 19 Mar 2015 15:43:23 +1100 [thread overview]
Message-ID: <20150319044323.GW5741@voom.redhat.com> (raw)
In-Reply-To: <20150318063403.GE21610@in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2253 bytes --]
On Wed, Mar 18, 2015 at 12:04:04PM +0530, Bharata B Rao wrote:
> On Wed, Mar 18, 2015 at 11:49:59AM +1100, David Gibson wrote:
> > On Fri, Mar 13, 2015 at 05:26:36PM +0530, Bharata B Rao wrote:
> > > From: Bharata B Rao <bharata.rao@gmail.com>
> > >
> > > Currently CPUState.cpu_index is monotonically increasing and a newly
> > > created CPU always gets the next higher index. The next available
> > > index is calculated by counting the existing number of CPUs. This is
> > > fine as long as we only add CPUs, but there are architectures which
> > > are starting to support CPU removal too. For an architecture like PowerPC
> > > which derives its CPU identifier (device tree ID) from cpu_index, the
> > > existing logic of generating cpu_index values causes problems.
> > >
> > > With the currently proposed method of handling vCPU removal by parking
> > > the vCPU fd in QEMU
> > > (Ref: http://lists.gnu.org/archive/html/qemu-devel/2015-02/msg02604.html),
> > > generating cpu_index this way will not work for PowerPC.
> > >
> > > This patch changes the way cpu_index is handed out by maintaining
> > > a bit map of the CPUs that tracks both addition and removal of CPUs.
> > >
> > > I am not sure if this is the right and an acceptable approach. The
> > > alternative is to do something similar for PowerPC alone and not
> > > depend on cpu_index.
> > >
> > > I have tested this with out-of-the-tree patches for CPU hot plug and
> > > removal on x86 and sPAPR PowerPC.
> >
> > How does this interact with the tweaking of cpu indexes that spapr
> > does in order to configure the guest SMT mode on POWER7 and POWER8
> > systems?
>
> I am not changing the mapping of cpu_index to cpu_dt_id. So nothing
> should be change. Can you please point me to the piece of tweaking code
> that you are referring to above ?
Ah, I thought it actually adjusted the cpu_index values, rather than
mapping them to different cpu_dt_id values. Maybe it used to, or
maybe I just misremembered.
Never mind, should be fine.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-03-19 4:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 11:56 [Qemu-devel] [RFC v0 PATCH] cpus: Convert cpu_index into a bitmap Bharata B Rao
2015-03-17 6:56 ` Alexander Graf
2015-03-17 8:39 ` Bharata B Rao
2015-03-17 10:56 ` Andreas Färber
2015-03-18 6:20 ` Bharata B Rao
2015-03-19 13:58 ` Eduardo Habkost
2015-05-07 9:35 ` Bharata B Rao
2015-05-07 15:33 ` Eduardo Habkost
2015-03-17 10:51 ` Andreas Färber
2015-03-18 6:28 ` Bharata B Rao
2015-03-18 0:49 ` David Gibson
2015-03-18 6:34 ` Bharata B Rao
2015-03-19 4:43 ` David Gibson [this message]
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=20150319044323.GW5741@voom.redhat.com \
--to=david@gibson.dropbear.id.au \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=bharata.rao@gmail.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhugh.fnst@cn.fujitsu.com \
/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;
as well as URLs for NNTP newsgroup(s).