Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Cyril Hrubis
Hi! > > That is likely POSIX conformance bug, since POSIX explicitly states that > > sigtimedwait() shall use CLOCK_MONOTONIC to measure the timeout. > > > > "If the Monotonic Clock option is supported, the CLOCK_MONOTONIC clock > > shall be used to measure the time interval specified by the

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Cyril Hrubis
Hi! > > That is likely POSIX conformance bug, since POSIX explicitly states that > > sigtimedwait() shall use CLOCK_MONOTONIC to measure the timeout. > > > > "If the Monotonic Clock option is supported, the CLOCK_MONOTONIC clock > > shall be used to measure the time interval specified by the

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Thomas Gleixner
On Thu, 23 Jun 2016, Cyril Hrubis wrote: > > 1) sigtimedwait() is unusual in that it uses the jiffies timer. Most > >system call timeouts (including specifically the one in FUTEX_WAIT) > >use the high-resolution timer subsystem, which is a whole different > >animal with tighter

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Thomas Gleixner
On Thu, 23 Jun 2016, Cyril Hrubis wrote: > > 1) sigtimedwait() is unusual in that it uses the jiffies timer. Most > >system call timeouts (including specifically the one in FUTEX_WAIT) > >use the high-resolution timer subsystem, which is a whole different > >animal with tighter

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Cyril Hrubis
Hi! > Two points: > 1) sigtimedwait() is unusual in that it uses the jiffies timer. Most >system call timeouts (including specifically the one in FUTEX_WAIT) >use the high-resolution timer subsystem, which is a whole different >animal with tighter guarantees, and That is likely POSIX

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Cyril Hrubis
Hi! > Two points: > 1) sigtimedwait() is unusual in that it uses the jiffies timer. Most >system call timeouts (including specifically the one in FUTEX_WAIT) >use the high-resolution timer subsystem, which is a whole different >animal with tighter guarantees, and That is likely POSIX

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Thomas Gleixner
On Thu, 23 Jun 2016, George Spelvin wrote: > Cyril Hrubis wrote: > > Thomas Gleixner wrote: > >> Err. You know that the timer expired because sigtimedwait() returns > >> EAGAIN. And the only thing you can reliably check for is that the timer did > >> not expired to early. Anything else is

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Thomas Gleixner
On Thu, 23 Jun 2016, George Spelvin wrote: > Cyril Hrubis wrote: > > Thomas Gleixner wrote: > >> Err. You know that the timer expired because sigtimedwait() returns > >> EAGAIN. And the only thing you can reliably check for is that the timer did > >> not expired to early. Anything else is

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread George Spelvin
Cyril Hrubis wrote: > Thomas Gleixner wrote: >> Err. You know that the timer expired because sigtimedwait() returns >> EAGAIN. And the only thing you can reliably check for is that the timer did >> not expired to early. Anything else is guesswork and voodoo programming. > But seriously is there a

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread George Spelvin
Cyril Hrubis wrote: > Thomas Gleixner wrote: >> Err. You know that the timer expired because sigtimedwait() returns >> EAGAIN. And the only thing you can reliably check for is that the timer did >> not expired to early. Anything else is guesswork and voodoo programming. > But seriously is there a

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Cyril Hrubis
Hi! > > While this is true, checking with reasonable error margin works just > > fine 99% of the time. You cannot really test that timer expires, without > > setting arbitrary margin. > > Err. You know that the timer expired because sigtimedwait() returns > EAGAIN. And the only thing you can

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Cyril Hrubis
Hi! > > While this is true, checking with reasonable error margin works just > > fine 99% of the time. You cannot really test that timer expires, without > > setting arbitrary margin. > > Err. You know that the timer expired because sigtimedwait() returns > EAGAIN. And the only thing you can

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Thomas Gleixner
On Wed, 22 Jun 2016, Cyril Hrubis wrote: > Hi! > > > rtbox:~ # > > > /usr/local/ltp/conformance/interfaces/sigtimedwait/sigtimedwait_1-1.run-test > > > Test FAILED: sigtimedwait() did not return in the required time > > > time_elapsed: 1.197057 > > > ...come on, you can do it... > > > rtbox:~ #

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-23 Thread Thomas Gleixner
On Wed, 22 Jun 2016, Cyril Hrubis wrote: > Hi! > > > rtbox:~ # > > > /usr/local/ltp/conformance/interfaces/sigtimedwait/sigtimedwait_1-1.run-test > > > Test FAILED: sigtimedwait() did not return in the required time > > > time_elapsed: 1.197057 > > > ...come on, you can do it... > > > rtbox:~ #

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-22 Thread Cyril Hrubis
Hi! > > rtbox:~ # > > /usr/local/ltp/conformance/interfaces/sigtimedwait/sigtimedwait_1-1.run-test > > Test FAILED: sigtimedwait() did not return in the required time > > time_elapsed: 1.197057 > > ...come on, you can do it... > > rtbox:~ # > >

Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

2016-06-22 Thread Cyril Hrubis
Hi! > > rtbox:~ # > > /usr/local/ltp/conformance/interfaces/sigtimedwait/sigtimedwait_1-1.run-test > > Test FAILED: sigtimedwait() did not return in the required time > > time_elapsed: 1.197057 > > ...come on, you can do it... > > rtbox:~ # > >