From: Mikael Pettersson <mikpe@csd.uu.se>
To: Andi Kleen <ak@muc.de>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH 2.6.12-rc4-mm2] perfctr: x86 update with K8 multicore fixes, take 2
Date: Wed, 18 May 2005 10:07:39 +0200 [thread overview]
Message-ID: <17034.63435.196130.708395@alkaid.it.uu.se> (raw)
In-Reply-To: <m164xh7aqe.fsf@muc.de>
Andi Kleen writes:
> Mikael Pettersson <mikpe@csd.uu.se> writes:
>
> > +#ifdef CONFIG_SMP
> > +static void __init k8_multicore_init(void)
> > +{
> > + cpumask_t non0cores;
> > + int i;
> > +
> > + cpus_clear(non0cores);
> > + for(i = 0; i < NR_CPUS; ++i) {
> > + cpumask_t cores = cpu_core_map[i];
> > + int core0 = first_cpu(cores);
> > + if (core0 >= NR_CPUS)
> > + continue;
> > + cpu_clear(core0, cores);
> > + cpus_or(non0cores, non0cores, cores);
> > + }
> > + if (cpus_empty(non0cores))
> > + return;
> > + k8_is_multicore = 1;
>
> That is still far too complicated. Just use current_cpu_data->x86_num_cores > 1
> That is simple enough that you don't need the ugly variable.
Right now you're right, but if you read the big comment just above
this code you'll see that once chips w/o the RevE erratum are
released, I'll make more serious use of the non0cores cpumask.
I consider _that_ the intended design (for the shared NB issue),
and the current code (just the k8_is_multicore flag) a workaround
for the NB clobber erratum in the 1st gen chips.
/Mikael
prev parent reply other threads:[~2005-05-18 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-17 20:44 Mikael Pettersson
2005-05-17 22:23 ` Andi Kleen
2005-05-18 8:07 ` Mikael Pettersson [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=17034.63435.196130.708395@alkaid.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®