From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Borislav Petkov <bp@amd64.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Andreas Herrmann <andreas.herrmann3@amd.com>,
LKML <linux-kernel@vger.kernel.org>, hpa <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: WARNING: at arch/x86/kernel/smpboot.c:310 topology_sane.clone.1+0x6e/0x81()
Date: Tue, 29 May 2012 16:51:46 +0200 [thread overview]
Message-ID: <1338303106.26856.92.camel@twins> (raw)
In-Reply-To: <20120529135442.GE29157@aftab.osrc.amd.com>
On Tue, 2012-05-29 at 15:54 +0200, Borislav Petkov wrote:
> Dudes,
>
> I'm getting the warning below on current linus. AFAICT, it is caused by
>
> static bool __cpuinit match_mc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
> {
> if (c->phys_proc_id == o->phys_proc_id)
> return topology_sane(c, o, "mc");
>
> return false;
> }
>
> and the reason is, IMHO, that because this is a MCM box which has two
> nodes in one physical package, i.e., phys_proc_id is 0 on both CPU6 and
> CPU0 but it has two internal nodes, 0 and 1 and CPUs 0-5 are on node 0
> and CPUs 6-11 are on node 1, the warning fires.
>
> Maybe we could do something like this untested hunk:
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 433529e29be4..e52538cd48bb 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -348,7 +348,8 @@ static bool __cpuinit match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
> static bool __cpuinit match_mc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
> {
> if (c->phys_proc_id == o->phys_proc_id)
> - return topology_sane(c, o, "mc");
> + if (!cpu_has(c, X86_FEATURE_AMD_DCM))
> + return topology_sane(c, o, "mc");
>
> return false;
> }
>
> or you have a better idea...?
Ah,.. uhm.. unfortunate this... we only seem to use cpu_core_mask for
topology_core_cpumask() and its purpose is to enumerate cores in a
package for some very limited generic functions.
Its a bit sad we defined it thus, the multi-core concept only really
make sense if you share caches, otherwise its just smp.
Also, our generic topology as defined doesn't match nodes. Which is
weird to say the least.
I'd almost be tempted to say you should fake phys_id, but I can only
imagine what all would explode if we'd do that :-)
Yeah, I guess we should do the thing you propose, unless someone else
has a sane idea?
next prev parent reply other threads:[~2012-05-29 14:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 13:54 WARNING: at arch/x86/kernel/smpboot.c:310 topology_sane.clone.1+0x6e/0x81() Borislav Petkov
2012-05-29 14:51 ` Peter Zijlstra [this message]
2012-05-29 15:29 ` Andreas Herrmann
2012-05-29 16:59 ` Peter Zijlstra
2012-05-29 17:13 ` Borislav Petkov
2012-05-29 17:25 ` Peter Zijlstra
2012-05-29 17:48 ` Andreas Herrmann
2012-06-04 12:41 ` [PATCH] x86, smp: Fix topology checks on AMD MCM Borislav Petkov
2012-06-04 12:43 ` Peter Zijlstra
2012-06-04 13:37 ` Borislav Petkov
2012-06-04 13:38 ` Peter Zijlstra
2012-06-04 14:48 ` Borislav Petkov
2012-06-04 14:56 ` Peter Zijlstra
2012-06-04 16:01 ` Borislav Petkov
2012-06-06 15:31 ` [PATCH -v2] " Borislav Petkov
2012-06-14 8:39 ` [tip:x86/urgent] x86/smp: Fix topology checks on AMD MCM CPUs tip-bot for Borislav Petkov
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=1338303106.26856.92.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=andreas.herrmann3@amd.com \
--cc=bp@amd64.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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