From: Christoph Lameter <clameter@sgi.com>
To: pj@sgi.com
Cc: travis@sgi.com, Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@suse.de>, Jack Steiner <steiner@sgi.com>,
linux-mm@kvack.org, "Siddha,
Suresh B" <suresh.b.siddha@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1] x86: Convert cpuinfo_x86 array to a per_cpu array v3
Date: Tue, 16 Oct 2007 08:02:21 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0710160755200.25014@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20071016011827.91350174.akpm@linux-foundation.org>
On Tue, 16 Oct 2007, Andrew Morton wrote:
> On Mon, 24 Sep 2007 14:08:53 -0700 travis@sgi.com wrote:
> > cpu_sibling_map and cpu_core_map have been taken care of in
> > a prior patch. This patch deals with the cpu_data array of
> > cpuinfo_x86 structs. The model that was used in sparc64
> > architecture was adopted for x86.
>
> This has mysteriously started to oops on me, only on x86_64.
>
> http://userweb.kernel.org/~akpm/config-x.txt
> http://userweb.kernel.org/~akpm/dsc00001.jpg
>
> which is a bit strange since this patch doesn't touch sched.c. Maybe
> there's something somewhere else in the -mm lineup which when combined with
> this prevents it from oopsing, dunno. I'll hold it back for now and will
> see what happens.
The config that you are using has
CONFIG_SCHED_MC
and
CONFIG_SCHED_MT
set.
So we use cpu_corecroup_map() from arch/x86_64/kernel/smpboot.c in
cpu_to_phys_group that has these nice convoluted ifdefs:
static int cpu_to_phys_group(int cpu, const cpumask_t *cpu_map,
struct sched_group **sg)
{
int group;
#ifdef CONFIG_SCHED_MC
cpumask_t mask = cpu_coregroup_map(cpu);
cpus_and(mask, mask, *cpu_map);
group = first_cpu(mask);
#elif defined(CONFIG_SCHED_SMT)
cpumask_t mask = per_cpu(cpu_sibling_map, cpu);
cpus_and(mask, mask, *cpu_map);
group = first_cpu(mask);
#else
group = cpu;
#endif
if (sg)
*sg = &per_cpu(sched_group_phys, group);
return group;
}
and I guess that some sched domain patches resulted in an empty
nodemask so that we end up with an invalid group number for the sched
group?
/* maps the cpu to the sched domain representing multi-core */
cpumask_t cpu_coregroup_map(int cpu)
{
struct cpuinfo_x86 *c = &cpu_data(cpu);
/*
* For perf, we return last level cache shared map.
* And for power savings, we return cpu_core_map
*/
if (sched_mc_power_savings || sched_smt_power_savings)
return per_cpu(cpu_core_map, cpu);
else
return c->llc_shared_map;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-10-16 15:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 21:08 [PATCH 0/1] x86: Convert cpuinfo_x86 array to a per_cpu array v3 travis
2007-09-24 21:08 ` [PATCH 1/1] " travis
2007-09-24 22:01 ` roel
2007-09-24 23:24 ` Dave Jones
2007-09-25 0:20 ` roel
2007-09-25 0:31 ` Dave Jones
2007-10-16 8:18 ` [PATCH 0/1] " Andrew Morton
2007-08-04 1:15 ` Mike Travis
2007-10-16 15:02 ` Christoph Lameter [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=Pine.LNX.4.64.0710160755200.25014@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pj@sgi.com \
--cc=steiner@sgi.com \
--cc=suresh.b.siddha@intel.com \
--cc=travis@sgi.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).