lkml.org 
[lkml]   [2005]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Fix hotplug cpu on x86_64
Date
On Friday 07 October 2005 18:42, Protasevich, Natalie wrote:

> You know Andi, I was imagining something like bitmap or linked list of
> all per_cpu vars (dynamically updated) and just going through this
> list... Or something like that (maybe some registration mechanism).
> There are not too many of them - about two dozens, mostly all sorts of
> accounting.

Finding them is no problem. We have NR_CPUS arrays for this (or other
per CPU mechanisms).

The problem is initializing them correct. There are currently two ways to do
this:

- (easier one, used by most subsystems) at startup set up state for
all possible CPUs.
- (complex one) register a CPU notifier and watch for CPU_UP/DOWN

Because of the first way the per cpu data is currently preallocated for
all hotplug CPUs. You cannot copy the state later because it might be
undefined then.

To make dynamic changes of possible map work would require to convert all
users to the second more complex way. Probably a lot of work.

>
> > I think it is better to try to figure out how many hotplug
> > CPUs are supported, otherwise use a small default.
>
> Exactly - such as on ES7000, it can support 32, 64, 128 etc. processors
> depending on what configuration the customer actually ordered :)... it
> should be something for that, then NR_CPUS could be either defined as
> boot parameter or belong to subarchs.

ACPI/mptables has the concept of "disabled" CPUs. I just bent that a bit
and use it as the number of possible CPUs.

-Andi

-
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-10-07 19:26    [W:2.111 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site