All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] lib/dummyload: Handle timeout in a new thread instead of signal handler
Date: Mon, 27 Mar 2017 14:54:38 +0300	[thread overview]
Message-ID: <1490615678.3684.11.camel@gmail.com> (raw)
In-Reply-To: <20170327112318.GH10606@nuc-i3427.alporthouse.com>

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@chris-wilson.co.uk>
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> 
> Lvgtm,
> Reviewed-by: Chris Wilson <chris@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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2017-03-27 11:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27  8:45 [PATCH i-g-t] lib/dummyload: Handle timeout in a new thread instead of signal handler Ander Conselvan de Oliveira
2017-03-27  9:09 ` Chris Wilson
2017-03-27 11:08   ` Ander Conselvan de Oliveira
2017-03-27 11:23     ` Chris Wilson
2017-03-27 11:54       ` Ander Conselvan De Oliveira [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490615678.3684.11.camel@gmail.com \
    --to=conselvan2@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.