lkml.org 
[lkml]   [2007]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Fw: Re: [mm PATCH 4/6] RCU: (now) CPU hotplug
On Tue, Jan 30, 2007 at 08:33:40AM +0100, Ingo Molnar wrote:
>
> * Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
>
> > > in fact (new) kprobes uses the freezer, and it's far more
> > > performance sensitive than the handling of CPU hotplug events.
> >
> > Outside of realtime workloads, I agree that performance should not be
> > a problem. And I don't know of any reason why realtime systems need
> > to be able to do hotplug CPU. Yet, anyway. ;-)
>
> even for -rt it's not really an issue: the hotplug locks are so
> all-encompassing and so unbound at the moment that there's no realistic
> expectation for them to ever become deterministic. So we might as well
> make them encompass "everything" - without any noticeable effect.
>
> > So the thought is to make _cpu_down() and _cpu_up() do something like
> > the following (untested, probably does not even compile), perhaps with
> > suitable adjustments elsewhere as well?
> >
> > static int _cpu_down(unsigned int cpu)
> > {
> > int err;
> > struct task_struct *p;
> > cpumask_t old_allowed, tmp;
> >
> > if (num_online_cpus() == 1)
> > return -EBUSY;
> >
> > if (!cpu_online(cpu))
> > return -EINVAL;
> >
> > if (freeze_processes()) {
> > err = -EBUSY;
> > goto out_freeze_notify_failed;
> > }
> > err = raw_notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE,
> > (void *)(long)cpu);
>
> yeah. This all looks so nice that i almost cannot believe it's true :-)

Well, it turns out that maybe it is in fact untrue. :-/

I need to look at all uses of PF_NOFREEZE -- as I understand the
code, processes marked PF_NOFREEZE will continue running, potentially
interfering with the hotplug operation. :-(

I will pass my findings on to this list.

> This would allow us to rip out all the cpu-hotplug locking: wow! If only
> someone would volunteer to try to pull this off and then to touch so
> many subsystems ;-)

Hey, just ending the debates on how to do CPU-hotplug locking would be
worth something! ;-)

> i fully agree that the opposite notifications should be traversed in
> inverse order [but this is an orthogonal improvement]. Too bad the
> notifier list is a single linked list.

:-(

But there can't be -that- many elements in that list... But agreed,
separate issue.

Thanx, Paul
-
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: 2007-01-30 17:05    [from the cache]
©2003-2011 Jasper Spaans