Re: New schedule() and semaphore implementation ...

Andrea Arcangeli (andrea@suse.de)
Sat, 12 Jun 1999 04:21:30 +0200 (CEST)


On Sat, 12 Jun 1999, Davide Libenzi wrote:

>I think that the goodness implementation solves the mm and smp precendences
>as long as the way to exit for every task queued.

With the goodness implementation you still have to browse all the
waitqueue to choose the most priority task (O(nr_task_in_waitqueue)). With
a FIFO wakeup you'll instead do all the wakeup work in O(1) (and you won't
have to run goodness for such one task).

I see the advantage of your implementation (RT tasks will go ahead before
others tasks for example) but I am not sure if it worth to do the extra
work in practice. Also consider that you don't know which will be the CPU
(and its prev task) that will reschedule the task blocked in the semaphore
so the goodness may be not completly relialable (the wakenup task may be
rescheduled from the other CPU before you'll exit from your sem_wake_up).

Andrea Arcangeli

PS. for the record in my previous down-EXCLUSVE patch the add_wait_queue
should be replaced with an add_wait_queue_exclusive. That will be enough
to get the FIFO behaviour.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/