[RFC] drm/amdgpu: avoid scheduling on fence status query

Michel Dänzer michel at daenzer.net
Wed Apr 26 01:09:03 UTC 2017


On 26/04/17 09:28 AM, Andres Rodriguez wrote:
> When amdgpu_cs_wait_ioctl is called with a timeout of zero, the caller
> is just interested in the current status of the fence.
> 
> The default implementation of dma_fence_wait_timeout on an unsignaled
> fence will always call schedule_timeout(), even if the timeout is zero.
> This may result in significant overhead for clients that heavily use
> this interface.
> 
> This patch avoids the dma_fence_wait_timeout overhead by directly
> checking the fence status.
> 
> Signed-off-by: Andres Rodriguez <andresx7 at gmail.com>
> ---
> 
> I'm not sure if we should be working around this issue at the amdgpu
> level, or at fixing the dma_fence_default_wait level instead.

I'd say the latter, assuming it can give the same benefit.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list