Re: [ovs-dev] [threads 05/28] timeval: Always block SIGALRM in time_poll().

2013-07-11 Thread Ben Pfaff
On Thu, Jul 11, 2013 at 09:13:15AM -0400, Ed Maste wrote: > On 10 July 2013 19:03, Ben Pfaff wrote: > > (The usual reason for ppoll() is to ensure atomicity of changing the signal > > mask and blocking, but time_poll() does not need atomicity. Therefore, > > even a userspace emulated ppoll() woul

Re: [ovs-dev] [threads 05/28] timeval: Always block SIGALRM in time_poll().

2013-07-11 Thread Ed Maste
On 10 July 2013 19:03, Ben Pfaff wrote: > (The usual reason for ppoll() is to ensure atomicity of changing the signal > mask and blocking, but time_poll() does not need atomicity. Therefore, > even a userspace emulated ppoll() would work here in a race-free manner, if > the kernel does not suppor

[ovs-dev] [threads 05/28] timeval: Always block SIGALRM in time_poll().

2013-07-10 Thread Ben Pfaff
Until now, time_poll() has blocked SIGALRM lazily, only after waking up once due to SIGALRM. The rationale was that many calls to poll() wake up quickly, before any SIGALRM would arrive, so that by only blocking it lazily we saved two system calls (one to block SIGALRM, one to unblock it) on most