Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [PATCH] Correct nr_processes() when CPUs have been unplugged | Date | Thu, 5 Nov 2009 11:13:33 +1030 |
| |
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.
| |