Re: [PATCH] Correct nr_processes() when CPUs have been unplugged

From: Ingo Molnar
Date: Wed Nov 04 2009 - 05:42:41 EST



* Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx> 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.

This has come up in the past. On-demand deallocation of percpu areas is
a future possibility that might be useful - see previous percpu
discussions on lkml for details.

All in one, the conclusion is that we dont want it yet (on-demand
allocation of them is perfectly fine for now) - i just wanted to mention
that this is a _current_ situation and an implementational choice, which
judgement could change in the future.

The more 'virtual' our abstraction of CPUs becomes, the less the notion
of permanent allocation will be acceptable as time goes on.

Dynamic allocation concepts are natural and the new, generic percpu
allocator makes it more feasible to eventually deallocate percpu areas.
(Of course various for_each_possible_cpu() assumptions will have to be
fixed in that case.)

Ingo
--
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/