sna: Yield the processor if the kernel reports EAGAIN
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jan 2014 09:32:50 +0000 (09:32 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jan 2014 09:32:50 +0000 (09:32 +0000)
commitde0797edac67e00b720dcc99d70b8e0f033a90b1
treedafd46822ad3b7080254f3da6ddb06555a4f220b
parent50a45a1cdd4d8319ba9358974d241069689591c5
sna: Yield the processor if the kernel reports EAGAIN

An artifact of our kernel/userspace interaction is that under certain
circumstances the kernel will report EAGAIN in order for it to have CPU
time to run its own workqueues before it can process the userspace
request. We can be cooperative and yield ourselves rather than busy-spin
waiting for the scheduler to demote us.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/kgem.c