[PATCH] dma-buf: Do a fast lockless check for poll with timeout=0

2016-08-28 Thread Chris Wilson
On Sun, Aug 28, 2016 at 09:33:54PM +0100, Chris Wilson wrote: > On Sun, Aug 28, 2016 at 05:37:47PM +0100, Chris Wilson wrote: > > Currently we install a callback for performing poll on a dma-buf, > > irrespective of the timeout. This involves taking a spinlock, as well as > > unnecessary work, and

[PATCH] dma-buf: Do a fast lockless check for poll with timeout=0

2016-08-28 Thread Chris Wilson
On Sun, Aug 28, 2016 at 05:37:47PM +0100, Chris Wilson wrote: > Currently we install a callback for performing poll on a dma-buf, > irrespective of the timeout. This involves taking a spinlock, as well as > unnecessary work, and greatly reduces scaling of poll(.timeout=0) across > multiple threads.

[Intel-gfx] [PATCH] dma-buf: Do a fast lockless check for poll with timeout=0

2016-08-28 Thread Daniel Vetter
On Sun, Aug 28, 2016 at 05:37:47PM +0100, Chris Wilson wrote: > Currently we install a callback for performing poll on a dma-buf, > irrespective of the timeout. This involves taking a spinlock, as well as > unnecessary work, and greatly reduces scaling of poll(.timeout=0) across > multiple threads.

[PATCH] dma-buf: Do a fast lockless check for poll with timeout=0

2016-08-28 Thread Chris Wilson
Currently we install a callback for performing poll on a dma-buf, irrespective of the timeout. This involves taking a spinlock, as well as unnecessary work, and greatly reduces scaling of poll(.timeout=0) across multiple threads. We can query whether the poll will block prior to installing the cal