lkml.org 
[lkml]   [2003]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [TRIVIAL PATCH] Use valid node number when unmapping CPUs


Matthew Dobson wrote:

> The cpu_2_node array for i386 is initialized to 0 for each CPU,
> effectively mapping all CPUs to node 0 unless changed. When we unmap
> CPUs, however, we stick a -1 in the array, mapping the CPU to an
> invalid node. This really isn't helpful. We should map the CPU to
> node 0, to make sure that callers of cpu_to_node() and friends aren't
> returned a bogus node number. This trivial patch changes the
> unmapping code to place a 0 in the node mapping for removed CPUs.
>
> Cheers!


I'd prefer it got initialised to -1 for each cpu, and either set to -1
or not touched during unmap.

0 is more bogus than the alternatives, isn't it? At least for the subset
of CPUs not on node 0. Callers should be fixed.


-
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: 2005-03-22 13:59    [W:0.040 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site