[Linux-ia64] Re: O(1) scheduler "complex" macros

From: Ingo Molnar <mingo_at_elte.hu>
Date: 2002-07-11 04:31:03
On Tue, 9 Jul 2002, Erich Focht wrote:

> Suppose we have 
>   cpu1: idle1
>   cpu2: prev2 -> next2  (in the switch)
> 
> I don't understand how task_lock(prev2) done on cpu2 can prevent cpu1 to
> schedule prev2, which it stole after the RQ#2 lock release. It will just
> try to task_lock(idle1), which will be successfull.

you are right - the 'complex' macros also need to lock the 'next' task,
not only the 'previous' task - but to do that deadlock-free, they need to
drop the runqueue lock ...

	Ingo
Received on Tue Jul 09 11:38:17 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:09 EST