[Intel-gfx] [PATCH i-g-t] lib/dummyload: Handle timeout in a new thread instead of signal handler

Ander Conselvan De Oliveira conselvan2 at gmail.com
Mon Mar 27 11:54:38 UTC 2017


On Mon, 2017-03-27 at 12:23 +0100, Chris Wilson wrote:
> On Mon, Mar 27, 2017 at 02:08:28PM +0300, Ander Conselvan de Oliveira wrote:
> > Currently, the main thread needs to wakeup to run the signal handler
> > that ends a spin batch. When testing whether a function call succesfully
> > waits for a batch to complete, this behavior is undesired. It actually
> > invalidates the test.
> > 
> > Fix this by spawning a new thread to handle the timeout.
> > 
> > v2: Get rid of mutexes. (Chris)
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> 
> Lvgtm,
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Patch pushed to master. Thanks for reviewing.


> I hoping that this isn't implemented as a signal to the parent thread... :)

At least glibc creates a separate thread for this:

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/timer_c
reate.c;h=48a703c0651e929f12feb4f194675bcf71694981;hb=HEAD#l100

Ander


More information about the Intel-gfx mailing list