Re: [RFC][PATCH 07/17] sched: Serialize p->cpus_allowed and ttwu()using p->pi_lock

From: Peter Zijlstra
Date: Mon Jan 03 2011 - 06:12:22 EST

On Wed, 2010-12-29 at 22:20 +0800, Yong Zhang wrote:
> > - * The caller (fork, wakeup) owns TASK_WAKING, ->cpus_allowed is stable.
> > + * The caller (fork, wakeup) owns p->pi_lock, ->cpus_allowed is stable.
> Yes for wakeup, but not true for fork.
> I don't see protection in wake_up_new_task().
> Or am I missing something?

Ah, true, wake_up_new_task() holds task_rq_lock() which is sufficient,
but yes, we could also make that pi_lock.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at