Re: CPU attachent and detachment in a running Linux system

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue Dec 12 2000 - 07:32:12 EST


> thanks for your input but I think it won't work this way because the value
> of smp_num_cpus needs to be increased by one right before a new cpu gets
> started. Then one can imagine the following situation at one of the cpus
> that needs to be captured:

This is fine providing the code is aware of the potential race. You capture
all the CPUs up the count by one, set the new cpu going and wait for it
to jump to being captured (even though not by an interrupt) ?

> I still wonder what you and other people think about the idea of an
> interface where the parts of the kernel with per-cpu dependencies should
> register two functions...

The other approach would be too make sure the per CPU structures allocated
which consume little memory have space already for the extra processors - eg
with the arrays of pointers etc

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Dec 15 2000 - 21:00:24 EST