From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: zhugh.fnst@cn.fujitsu.com, agraf@suse.de, qemu-devel@nongnu.org,
imammedo@redhat.com, afaerber@suse.de,
david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap
Date: Mon, 11 May 2015 09:07:35 +0530 [thread overview]
Message-ID: <20150511033734.GB7715@in.ibm.com> (raw)
In-Reply-To: <20150508145740.GK17796@thinpad.lan.raisama.net>
On Fri, May 08, 2015 at 11:57:40AM -0300, Eduardo Habkost wrote:
> On Fri, May 08, 2015 at 03:21:35PM +0530, Bharata B Rao wrote:
> [...]
> > void cpu_exec_init(CPUArchState *env, Error **errp)
> > {
> > CPUState *cpu = ENV_GET_CPU(env);
> > CPUClass *cc = CPU_GET_CLASS(cpu);
> > - CPUState *some_cpu;
> > int cpu_index;
> > -
> > #if defined(CONFIG_USER_ONLY)
> > + CPUState *some_cpu;
> > +
> > cpu_list_lock();
> > -#endif
> > cpu_index = 0;
> > CPU_FOREACH(some_cpu) {
> > cpu_index++;
> > }
> > cpu->cpu_index = cpu_index;
>
> Why not use the bitmap on CONFIG_USER too?
I was doing like that in v1 and it required me to cook up a max_cpus value
for CONFIG_USER case to define the bitmap.
Andreas pointed out that it is better not to touch the allocation
logic for CONFIG_USER.
https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg03571.html
Regards,
Bharata.
next prev parent reply other threads:[~2015-05-11 3:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 9:51 [Qemu-devel] [RFC v1 PATCH 0/3] cpus: Convert cpu_index into a bitmap Bharata B Rao
2015-05-08 9:51 ` [Qemu-devel] [RFC v1 PATCH 1/3] cpus: Add Error argument to cpu_exec_init() Bharata B Rao
2015-05-11 16:04 ` Eduardo Habkost
2015-05-08 9:51 ` [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap Bharata B Rao
2015-05-08 14:55 ` Eduardo Habkost
2015-05-11 3:33 ` Bharata B Rao
2015-05-11 14:28 ` Eduardo Habkost
2015-05-08 14:57 ` Eduardo Habkost
2015-05-11 3:37 ` Bharata B Rao [this message]
2015-05-11 14:37 ` Eduardo Habkost
2015-05-08 9:51 ` [Qemu-devel] [RFC v1 PATCH 3/3] ppc: Move cpu_exec_init() call to realize function Bharata B Rao
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=20150511033734.GB7715@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.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).