Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal

2011-06-17 Thread Jan Kiszka
On 2011-06-16 17:24, Alexandre Raymond wrote: > Hi Jan, > > On Thu, Jun 16, 2011 at 5:31 AM, Jan Kiszka wrote: >> Ingo Molnar pointed out that sending the timer signal to the whole >> process, just blocking it everywhere, is suboptimal with an increasing >> number of threads. QEMU is using this p

Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal

2011-06-16 Thread Alexandre Raymond
Hi Jan, On Thu, Jun 16, 2011 at 5:31 AM, Jan Kiszka wrote: > Ingo Molnar pointed out that sending the timer signal to the whole > process, just blocking it everywhere, is suboptimal with an increasing > number of threads. QEMU is using this pattern so far. I am not familiar with this code, but d

Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal

2011-06-16 Thread Richard Henderson
On 06/16/2011 02:31 AM, Jan Kiszka wrote: > ev.sigev_value.sival_int = 0; > -ev.sigev_notify = SIGEV_SIGNAL; > ev.sigev_signo = SIGALRM; > +#ifdef SIGEV_THREAD_ID > +if (qemu_signalfd_available()) { > +ev.sigev_notify = SIGEV_THREAD_ID; > +ev._sigev_un._tid = qemu_

Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal

2011-06-16 Thread Ingo Molnar
* Jan Kiszka wrote: > Ingo Molnar pointed out that sending the timer signal to the whole > process, just blocking it everywhere, is suboptimal with an increasing > number of threads. QEMU is using this pattern so far. > > But Linux provides a (non-portable) way to restrict the signal to a > sin

[Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal

2011-06-16 Thread Jan Kiszka
Ingo Molnar pointed out that sending the timer signal to the whole process, just blocking it everywhere, is suboptimal with an increasing number of threads. QEMU is using this pattern so far. But Linux provides a (non-portable) way to restrict the signal to a single thread: Use SIGEV_THREAD_ID unl