Messages in this thread | ![/](/images/icornerl.gif) | | Date | Sat, 11 Oct 2003 09:40:07 +1000 | From | Rusty Russell <> | Subject | Re: 2.7 thoughts |
| |
On Fri, 10 Oct 2003 11:56:09 -0700 Tim Hockin <thockin@hockin.org> wrote:
> On Fri, Oct 10, 2003 at 11:29:09AM -0700, William Lee Irwin III wrote: > > I think there is some generalized cpu hotplug stuff that's gone in that > > direction already, though I don't know any details. The bits about non- > > cooperative offlining were very interesting to hear, though. > > I spoke with Rusty about it at OLS. I haven't tracked the hotplug CPU > projects. I think that TASK_UNRUNNABLE is the sane way to handle said edge > case, but at the time Rusty was leaning towards SIGPOWER.
Yeah, if a task has become unrunnable, I do a SIGPOWER (with a new cpu siginfo field). If hotplug CPUs had been introduced at the same time as affinity, this would IMHO have been a valid approach, but may not be so now.
See my kernel.org page, and the sourceforge mailing list for details.
I haven't done anything fancy with cpu offlining, but the most painful bit is all the callbacks for workqueue threads, migration threads etc. Once that's in place, doing the atomic-style switch should be quite possible. There's a theoretical case where code would do:
spin_lock foo[smp_processor_id()]++; ... foo[smp_processor_id()]--; spin_unlock
So you might want to fake up the answer to smp_processor_id() for that task/interrupt. Other real per-cpu things might have problems (if you were halfway through fiddling with the interrupt state on that CPU, maybe MTRR), but that's what makes it fun.
Cheers, Rusty. -- there are those who do and those who hang on and you don't see too many doers quoting their contemporaries. -- Larry McVoy - 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/
| ![\](/images/icornerr.gif) |