[Mesa-dev] [PATCH] Do not use sched_yield() on Linux

Alan Swanson swanson at ukfsn.org
Tue Jan 31 09:30:44 PST 2012


As discussed back in 2003, sched_yield() on Linux is no longer
equivalent to other POSIX variations. From a LWN article; "This call
used to simply move the process to the end of the run queue; now it
moves the process to the "expired" queue, effectively cancelling the
rest of the process's time slice. So a process calling sched_yield() now
must wait until all other runnable processes in the system have used up
their time slices before it will get the processor again."

However its use on Linux has sneaked back in causing suboptimal
performance such as reported by Simon Farnsworth on r600g. Use sleep on
Linux instead.

Signed-off-by: Alan Swanson <swanson at ukfsn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mesa-kill-linux-sched_yield.patch
Type: text/x-patch
Size: 3268 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120131/866fe277/attachment.bin>


More information about the mesa-dev mailing list