Re: [PATCH] Correct nr_processes() when CPUs have been unplugged
From: Rusty Russell
Date: Wed Nov 04 2009 - 19:43:51 EST
On Wed, 4 Nov 2009 05:04:32 am Christoph Lameter wrote:
> On Tue, 3 Nov 2009, Ingo Molnar wrote:
>
> > Sidenote: percpu areas currently are kept allocated on x86.
>
> They must be kept allocated for all possible cpus. Arch code cannot decide
> to not allocate per cpu areas.
>
> Search for "for_each_possible_cpu" in the source tree if you want more
> detail.
Yeah, handling onlining/offlining of cpus is a hassle for most code.
But I can see us wanting abstractions for counters which handle being per-cpu
or per-node and doing the folding etc. automagically. It's best that this
be done by looking at all the existing users to see if there's a nice API
which would cover 90%.
Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/