Re: [PATCH] Fix hotplug cpu on x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux