lkml.org 
[lkml]   [2010]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 15/16] x86: Unify node_to_cpumask_map handling between 32 and 64bit
Hello, again.

On Thu, Dec 30, 2010 at 01:48:00PM +0100, Tejun Heo wrote:
> On Tue, Dec 28, 2010 at 12:43:24PM -0800, David Rientjes wrote:
> > This has been almost entirely rewritten in x86/numa by c1c3443c ("x86,
> > numa: Fake node-to-cpumask for NUMA emulation") and the pending fix
> > http://marc.info/?l=linux-kernel&m=129340072128297 ("x86, numa: Fix
> > CONFIG_DEBUG_PER_CPU_MAPS without NUMA"). Since this is only moving those
> > functions to numa.c, it should be trivial to fix once based on x86/numa.
>
> Sigh, the new NUMA emulation thing is 64bit only. :-( I'll see if it
> can be applied to 32bit too. BTW, how does this interact with the
> Shaohui's patchset. Isn't that about NUMA emulation too? Are these
> the same patches?

Okay, after going through the changes, here are some thoughts FWIW.

I'm doubtful the direction was the correct one. NUMA emulation,
almost by definition, doesn't vary too much depending on the
underlying hardware and how it's configured. All that's necessary is
the physical node map an apicid to nid mapping, which can and probably
should be represented in common form regardless of emulation and the
emulation code should simply manipulate the parsed information.

The original implementation was 64bit apic specific. If it needed to
be extended to cover amd topology, the right way would be updating the
apic and amd numa code so that they generate the information in a
uniform way and NUMA emulation would follow naturally. Instead, it
looks like what happened was simply adding amd specific code with more
gluing. The unnecessary differences between acpi and amd paths sure
aren't your fault but I really don't think we should be moving toward
that direction when things can (and definitely should) be unified with
a bit more effort. NUMA code already is unnecessary hairy with
32/64bit and different subarchs somewhat unified but subtly differing
in many places without clear indications.

That said, Shaohui is already working on unifying the emulation code,
so I'll just do another quick dirty #ifdef'ing for the affected part.

Thank you.

--
tejun


\
 
 \ /
  Last update: 2010-12-30 16:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site