lkml.org 
[lkml]   [2009]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 15/15] x86: Fix cpu_coregroup_mask to return correct cpumask on multi-node processors
On Mon, Aug 24, 2009 at 05:36:16PM +0200, Peter Zijlstra wrote:
> On Thu, 2009-08-20 at 15:46 +0200, Andreas Herrmann wrote:
> > The correct mask that describes core-siblings of an processor
> > is topology_core_cpumask. See topology adapation patches, especially
> > http://marc.info/?l=linux-kernel&m=124964999608179
>
>
> argh, violence, murder kill.. this is the worst possible hack and you're
> extending it :/

So this is the third code area
(besides sched_*_power_savings sysfs interface, and the __cpu_power fiddling)
that is crap, mess, a hack.

Didn't know that I'd enter such a minefield when touching this code. ;-(

What would be your perferred solution for the
core_cpumask/llc_shared_map stuff? Another domain level to get rid of
this function?

> > Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
> > ---
> > arch/x86/kernel/smpboot.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> > index f797214..f39bb2c 100644
> > --- a/arch/x86/kernel/smpboot.c
> > +++ b/arch/x86/kernel/smpboot.c
> > @@ -446,7 +446,7 @@ const struct cpumask *cpu_coregroup_mask(int cpu)
> > * And for power savings, we return cpu_core_map
> > */
> > if (sched_mc_power_savings || sched_smt_power_savings)
> > - return cpu_core_mask(cpu);
> > + return topology_core_cpumask(cpu);
> > else
> > return c->llc_shared_map;
> > }
>

Andreas

--
Operating | Advanced Micro Devices GmbH
System | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
(OSRC) | Registergericht München, HRB Nr. 43632


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-08-25 11:35    [W:0.118 / U:5.592 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site