Re: [dm-devel] [PATCH] multipathd: use nanosleep for sleeping

2018-03-07 Thread Martin Wilck
On Tue, 2018-03-06 at 19:21 -0600, Benjamin Marzinski wrote: > On Tue, Mar 06, 2018 at 09:37:13PM +0100, Martin Wilck wrote: > > > > I'm sure this works, but have you considered achieving the same > > result > > simply by using create_timer with a different signal than SIGALRM? > > Thinking about

Re: [dm-devel] [PATCH] multipathd: use nanosleep for sleeping

2018-03-06 Thread Martin Wilck
On Mon, 2018-03-05 at 19:20 -0600, Benjamin Marzinski wrote: > In order to safely use SIGALRM in a multi-threaded program, only one > thread can schedule and wait on SIGALRM at a time. All other threads > must have SIGALRM blocked, and be unable to schedule an alarm. The > strict_timing code in

[dm-devel] [PATCH] multipathd: use nanosleep for sleeping

2018-03-05 Thread Benjamin Marzinski
In order to safely use SIGALRM in a multi-threaded program, only one thread can schedule and wait on SIGALRM at a time. All other threads must have SIGALRM blocked, and be unable to schedule an alarm. The strict_timing code in checkerloop was unblocking SIGALRM, and calling setitimer(), without