Re: [PATCH 20/22] sched: Move the second half of ttwu() to the remote cpu

Peter Zijlstra
2011-03-16T08:30:29Z

On Thu, 2011-03-10 at 17:44 -0800, Frank Rowand wrote:
> > @@ -6287,6 +6342,7 @@ migration_call(struct notifier_block *nf
> >
> > #ifdef CONFIG_HOTPLUG_CPU
> > case CPU_DYING:
>
> Should pi_lock be locked here, so that additional wake ups can not
> be put on the wake list in the window after sched_ttwu_pending()
> completes, and before set_rq_offline(rq) is called? If so, then
> of course unlock pi_lock after the matching
> "raw_spin_unlock_irqrestore(&rq->lock, flags);"

The cpu should be offline already, so select_task_rq() will never return
it and hence no new tasks should end up on this list.

> > + sched_ttwu_pending();
> > /* Update our root-domain */