* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
[not found] <Pine.LNX.4.64.0708312028400.24049@schroedinger.engr.sgi.com>
@ 2007-09-04 20:29 ` Mike Travis
2007-09-04 21:10 ` Andrew Morton
0 siblings, 1 reply; 9+ messages in thread
From: Mike Travis @ 2007-09-04 20:29 UTC (permalink / raw)
To: Christoph Lameter
Cc: Jack Steiner, Andi Kleen, linux-mm, linux-kernel, Andrew Morton,
Kamalesh Babulal
[Sorry, I did not see this message until Christoph forwarded it to me. I'm
guessing we (SGI) still have a problem with our external spam filter?]
>
> ---------- Forwarded message ----------
> Date: Fri, 31 Aug 2007 19:49:03 -0700
> From: Andrew Morton <akpm@linux-foundation.org>
> To: travis@sgi.com
> Cc: Andi Kleen <ak@suse.de>, linux-mm@kvack.org, linux-kernel@vger.kernel.org,
> Christoph Lameter <clameter@sgi.com>
> Subject: Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable
> (v2)
>
> On Fri, 24 Aug 2007 15:26:57 -0700 travis@sgi.com wrote:
>
>> Convert cpu_sibling_map from a static array sized by NR_CPUS to a
>> per_cpu variable. This saves sizeof(cpumask_t) * NR unused cpus.
>> Access is mostly from startup and CPU HOTPLUG functions.
>
> ia64 allmodconfig:
>
> kernel/sched.c: In function `cpu_to_phys_group': kernel/sched.c:5937: error: `per_cpu__cpu_sibling_map' undeclared (first use in this function) kernel/sched.c:5937: error: (Each undeclared identifier is reported only once
> kernel/sched.c:5937: error: for each function it appears in.) kernel/sched.c:5937: warning: type defaults to `int' in declaration of `type name'
> kernel/sched.c:5937: error: invalid type argument of `unary *' kernel/sched.c: In function `build_sched_domains': kernel/sched.c:6172: error: `per_cpu__cpu_sibling_map' undeclared (first use in this function) kernel/sched.c:6172: warning: type defaults to `int' in declaration of `type name' kernel/sched.c:6172: error: invalid type argument of `unary *' kernel/sched.c:6183: warning: type defaults to `int' in declaration of `type name' kernel/sched.c:6183: error: invalid type argument of `unary *'
I'm thinking that the best approach would be to define a cpu_sibling_map() macro
to handle the cases where cpu_sibling_map is not a per_cpu variable? Perhaps
something like:
#ifdef CONFIG_SCHED_SMT
#ifndef cpu_sibling_map
#define cpu_sibling_map(cpu) cpu_sibling_map[cpu]
#endif
#endif
My question though, would include/linux/smp.h be the appropriate place for
the above define? (That is, if the above approach is the correct one... ;-)
Thanks,
Mike
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-04 20:29 ` [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd) Mike Travis
@ 2007-09-04 21:10 ` Andrew Morton
2007-09-04 23:11 ` Mike Travis
2007-09-05 3:48 ` Christoph Lameter
0 siblings, 2 replies; 9+ messages in thread
From: Andrew Morton @ 2007-09-04 21:10 UTC (permalink / raw)
To: Mike Travis; +Cc: clameter, steiner, ak, linux-mm, linux-kernel, kamalesh
> On Tue, 04 Sep 2007 13:29:11 -0700 Mike Travis <travis@sgi.com> wrote:
> [Sorry, I did not see this message until Christoph forwarded it to me. I'm
> guessing we (SGI) still have a problem with our external spam filter?]
>
> >
> > ---------- Forwarded message ----------
> > Date: Fri, 31 Aug 2007 19:49:03 -0700
> > From: Andrew Morton <akpm@linux-foundation.org>
> > To: travis@sgi.com
> > Cc: Andi Kleen <ak@suse.de>, linux-mm@kvack.org, linux-kernel@vger.kernel.org,
> > Christoph Lameter <clameter@sgi.com>
> > Subject: Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable
> > (v2)
> >
> > On Fri, 24 Aug 2007 15:26:57 -0700 travis@sgi.com wrote:
> >
> >> Convert cpu_sibling_map from a static array sized by NR_CPUS to a
> >> per_cpu variable. This saves sizeof(cpumask_t) * NR unused cpus.
> >> Access is mostly from startup and CPU HOTPLUG functions.
> >
> > ia64 allmodconfig:
> >
> > kernel/sched.c: In function `cpu_to_phys_group': kernel/sched.c:5937: error: `per_cpu__cpu_sibling_map' undeclared (first use in this function) kernel/sched.c:5937: error: (Each undeclared identifier is reported only once
> > kernel/sched.c:5937: error: for each function it appears in.) kernel/sched.c:5937: warning: type defaults to `int' in declaration of `type name'
> > kernel/sched.c:5937: error: invalid type argument of `unary *' kernel/sched.c: In function `build_sched_domains': kernel/sched.c:6172: error: `per_cpu__cpu_sibling_map' undeclared (first use in this function) kernel/sched.c:6172: warning: type defaults to `int' in declaration of `type name' kernel/sched.c:6172: error: invalid type argument of `unary *' kernel/sched.c:6183: warning: type defaults to `int' in declaration of `type name' kernel/sched.c:6183: error: invalid type argument of `unary *'
>
> I'm thinking that the best approach would be to define a cpu_sibling_map() macro
> to handle the cases where cpu_sibling_map is not a per_cpu variable? Perhaps
> something like:
>
> #ifdef CONFIG_SCHED_SMT
> #ifndef cpu_sibling_map
> #define cpu_sibling_map(cpu) cpu_sibling_map[cpu]
> #endif
> #endif
>
> My question though, would include/linux/smp.h be the appropriate place for
> the above define? (That is, if the above approach is the correct one... ;-)
It'd be better to convert the unconverted architectures?
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-04 21:10 ` Andrew Morton
@ 2007-09-04 23:11 ` Mike Travis
2007-09-05 0:00 ` Andrew Morton
2007-09-05 8:10 ` Andi Kleen
2007-09-05 3:48 ` Christoph Lameter
1 sibling, 2 replies; 9+ messages in thread
From: Mike Travis @ 2007-09-04 23:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: clameter, steiner, ak, linux-mm, linux-kernel, kamalesh
Andrew Morton wrote:
>> On Tue, 04 Sep 2007 13:29:11 -0700 Mike Travis <travis@sgi.com> wrote:
>>> ---------- Forwarded message ----------
>>> Date: Fri, 31 Aug 2007 19:49:03 -0700
>>> From: Andrew Morton <akpm@linux-foundation.org>
>>> To: travis@sgi.com
>>> Cc: Andi Kleen <ak@suse.de>, linux-mm@kvack.org, linux-kernel@vger.kernel.org,
>>> Christoph Lameter <clameter@sgi.com>
>>> Subject: Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable
>>> (v2)
>>>
>>> On Fri, 24 Aug 2007 15:26:57 -0700 travis@sgi.com wrote:
>>>
>>>> Convert cpu_sibling_map from a static array sized by NR_CPUS to a
>>>> per_cpu variable. This saves sizeof(cpumask_t) * NR unused cpus.
>>>> Access is mostly from startup and CPU HOTPLUG functions.
>>> ia64 allmodconfig:
>>>
>>> kernel/sched.c: In function `cpu_to_phys_group': kernel/sched.c:5937: error: `per_cpu__cpu_sibling_map' undeclared (first use in this function) kernel/sched.c:5937: error: (Each undeclared identifier is reported only once
>>> kernel/sched.c:5937: error: for each function it appears in.) kernel/sched.c:5937: warning: type defaults to `int' in declaration of `type name'
>>> kernel/sched.c:5937: error: invalid type argument of `unary *' kernel/sched.c: In function `build_sched_domains': kernel/sched.c:6172: error: `per_cpu__cpu_sibling_map' undeclared (first use in this function) kernel/sched.c:6172: warning: type defaults to `int' in declaration of `type name' kernel/sched.c:6172: error: invalid type argument of `unary *' kernel/sched.c:6183: warning: type defaults to `int' in declaration of `type name' kernel/sched.c:6183: error: invalid type argument of `unary *'
>> I'm thinking that the best approach would be to define a cpu_sibling_map() macro
>> to handle the cases where cpu_sibling_map is not a per_cpu variable? Perhaps
>> something like:
>>
>> #ifdef CONFIG_SCHED_SMT
>> #ifndef cpu_sibling_map
>> #define cpu_sibling_map(cpu) cpu_sibling_map[cpu]
>> #endif
>> #endif
>>
>> My question though, would include/linux/smp.h be the appropriate place for
>> the above define? (That is, if the above approach is the correct one... ;-)
>
> It'd be better to convert the unconverted architectures?
I can easily do the changes for ia64 and test them. I don't have the capability
of testing on the powerpc.
And are you asking for just the changes to fix the build problem, or the whole
set of the changes that were made for x86_64 and i386 in regards to converting
NR_CPU arrays to per cpu data?
Thanks,
Mike
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-04 23:11 ` Mike Travis
@ 2007-09-05 0:00 ` Andrew Morton
2007-09-05 8:10 ` Andi Kleen
1 sibling, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2007-09-05 0:00 UTC (permalink / raw)
To: Mike Travis; +Cc: clameter, steiner, ak, linux-mm, linux-kernel, kamalesh
> On Tue, 04 Sep 2007 16:11:31 -0700 Mike Travis <travis@sgi.com> wrote:
> >
> > It'd be better to convert the unconverted architectures?
>
> I can easily do the changes for ia64 and test them. I don't have the capability
> of testing on the powerpc.
>
> And are you asking for just the changes to fix the build problem, or the whole
> set of the changes that were made for x86_64 and i386 in regards to converting
> NR_CPU arrays to per cpu data?
Well... it'd be better to have all architectures doing the same thing. If
that's impractical then we should at least implement suitable accessor
functions into the arch so that core code doesn't need to handle some
architectures one way and others the other way.
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-04 21:10 ` Andrew Morton
2007-09-04 23:11 ` Mike Travis
@ 2007-09-05 3:48 ` Christoph Lameter
1 sibling, 0 replies; 9+ messages in thread
From: Christoph Lameter @ 2007-09-05 3:48 UTC (permalink / raw)
To: Andrew Morton; +Cc: Mike Travis, steiner, ak, linux-mm, linux-kernel, kamalesh
On Tue, 4 Sep 2007, Andrew Morton wrote:
> > My question though, would include/linux/smp.h be the appropriate place for
> > the above define? (That is, if the above approach is the correct one... ;-)
>
> It'd be better to convert the unconverted architectures?
That is certainly the cleanest solution. Maybe we can only convert the
variables used in the scheduler that way?
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-04 23:11 ` Mike Travis
2007-09-05 0:00 ` Andrew Morton
@ 2007-09-05 8:10 ` Andi Kleen
2007-09-05 8:40 ` Andrew Morton
1 sibling, 1 reply; 9+ messages in thread
From: Andi Kleen @ 2007-09-05 8:10 UTC (permalink / raw)
To: Mike Travis
Cc: Andrew Morton, clameter, steiner, linux-mm, linux-kernel, kamalesh
> > It'd be better to convert the unconverted architectures?
Agreed.
> I can easily do the changes for ia64 and test them. I don't have the
> capability of testing on the powerpc.
You can get cross compilers and make it compile and I'm sure some
powerpc person will be happy to test it then when you post the patches
> And are you asking for just the changes to fix the build problem, or the
> whole set of the changes that were made for x86_64 and i386 in regards to
> converting NR_CPU arrays to per cpu data?
At least the variables that are used by non architecture specific code
(like cpu_sibling_map) should be probably all converted. For architecture
specific variables it's ok to leave it to the architecture people.
-Andi
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-05 8:10 ` Andi Kleen
@ 2007-09-05 8:40 ` Andrew Morton
2007-09-05 14:46 ` Mike Travis
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2007-09-05 8:40 UTC (permalink / raw)
To: Andi Kleen; +Cc: travis, clameter, steiner, linux-mm, linux-kernel, kamalesh
> On Wed, 5 Sep 2007 09:10:10 +0100 Andi Kleen <ak@suse.de> wrote:
> > I can easily do the changes for ia64 and test them. I don't have the
> > capability of testing on the powerpc.
>
> You can get cross compilers and make it compile
http://userweb.kernel.org/~akpm/cross-compilers/
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-05 8:40 ` Andrew Morton
@ 2007-09-05 14:46 ` Mike Travis
2007-09-05 15:15 ` Andrew Morton
0 siblings, 1 reply; 9+ messages in thread
From: Mike Travis @ 2007-09-05 14:46 UTC (permalink / raw)
To: Andrew Morton
Cc: Andi Kleen, clameter, steiner, linux-mm, linux-kernel, kamalesh
Andrew Morton wrote:
>> On Wed, 5 Sep 2007 09:10:10 +0100 Andi Kleen <ak@suse.de> wrote:
>>> I can easily do the changes for ia64 and test them. I don't have the
>>> capability of testing on the powerpc.
>> You can get cross compilers and make it compile
>
> http://userweb.kernel.org/~akpm/cross-compilers/
Thanks Andrew!
It's an extensive list but I didn't see one for ppc64?
Regards,
Mike
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd)
2007-09-05 14:46 ` Mike Travis
@ 2007-09-05 15:15 ` Andrew Morton
0 siblings, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2007-09-05 15:15 UTC (permalink / raw)
To: Mike Travis; +Cc: ak, clameter, steiner, linux-mm, linux-kernel, kamalesh
> On Wed, 05 Sep 2007 07:46:36 -0700 Mike Travis <travis@sgi.com> wrote:
>
>
> Andrew Morton wrote:
> >> On Wed, 5 Sep 2007 09:10:10 +0100 Andi Kleen <ak@suse.de> wrote:
> >>> I can easily do the changes for ia64 and test them. I don't have the
> >>> capability of testing on the powerpc.
> >> You can get cross compilers and make it compile
> >
> > http://userweb.kernel.org/~akpm/cross-compilers/
>
> Thanks Andrew!
>
> It's an extensive list but I didn't see one for ppc64?
>
argh, yes, my ppc64 cross-compiler doesn't work, and I have powerpc
machines so I didn't pursue it.
Oh well. Please cc powerpc developers on the patch and if it later
breaks we can blame them :) I'll be the first to compile and runtime
test it, so please just do a best-effort thing.
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-09-05 15:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.64.0708312028400.24049@schroedinger.engr.sgi.com>
2007-09-04 20:29 ` [PATCH 3/6] x86: Convert cpu_sibling_map to be a per cpu variable (v2) (fwd) Mike Travis
2007-09-04 21:10 ` Andrew Morton
2007-09-04 23:11 ` Mike Travis
2007-09-05 0:00 ` Andrew Morton
2007-09-05 8:10 ` Andi Kleen
2007-09-05 8:40 ` Andrew Morton
2007-09-05 14:46 ` Mike Travis
2007-09-05 15:15 ` Andrew Morton
2007-09-05 3:48 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox