Re: O(1) scheduler "complex" macros

From: Ingo Molnar (mingo@elte.hu)
Date: Wed Jul 10 2002 - 13:31:03 EST


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

-
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/



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:16 EST