Re: [kvm-devel] [PATCH] Use pipe() to simulate signalfd() (v2)

2008-05-04 Thread Anthony Liguori
Avi Kivity wrote: Please split the signalfd() emulation into a separate (preparatory) patch. Also, we need to detect signalfd() at run time as well as compile time, since qemu may be compiled on a different machine than it is run on. Ok. We can keep the signals blocked, but run the

Re: [kvm-devel] [PATCH] Use pipe() to simulate signalfd() (v2)

2008-05-04 Thread Avi Kivity
Anthony Liguori wrote: We can keep the signals blocked, but run the signalfd emulation in a separate thread (where it can dequeue signals using sigwait as an added bonus). This will reduce the differences between the two modes at the expense of increased signalfd() emulation complexity,

Re: [kvm-devel] [PATCH] Use pipe() to simulate signalfd() (v2)

2008-05-04 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: We can keep the signals blocked, but run the signalfd emulation in a separate thread (where it can dequeue signals using sigwait as an added bonus). This will reduce the differences between the two modes at the expense of increased signalfd()

[kvm-devel] [PATCH] Use pipe() to simulate signalfd() (v2)

2008-05-02 Thread Anthony Liguori
This patch reworks the IO thread to use signalfd() instead of sigtimedwait(). This will eliminate the need to use SIGIO everywhere. In this version of the patch, we use signalfd() when it's available. When it isn't available, we instead use a pipe() that is written to in each signal handler.