Re: [rfc][patch] futex: restartable futex_wait?

2007-03-09 Thread Thomas Gleixner
On Fri, 2007-03-09 at 13:24 +0100, Nick Piggin wrote: > > > > 'time' here is relative, so the restarted syscall will do a /full/ wait > > > > again. > > > > > > But it has been modified by schedule_timeout? > > > > But this does not change the syscall registers, so it is restarted in > > the

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-09 Thread Nick Piggin
On Fri, Mar 09, 2007 at 10:38:35AM +0100, Thomas Gleixner wrote: > On Fri, 2007-03-09 at 06:10 +0100, Nick Piggin wrote: > > > i think that's quite right. I'm wondering why this never came up before? > > > But your fix is not complete i think: > > > > > > > + restart->arg2 = time; >

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-09 Thread Thomas Gleixner
On Fri, 2007-03-09 at 06:10 +0100, Nick Piggin wrote: > > i think that's quite right. I'm wondering why this never came up before? > > But your fix is not complete i think: > > > > > + restart->arg2 = time; > > > + return -ERESTART_RESTARTBLOCK; > > > + } > > > >

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-09 Thread Thomas Gleixner
On Fri, 2007-03-09 at 06:10 +0100, Nick Piggin wrote: i think that's quite right. I'm wondering why this never came up before? But your fix is not complete i think: + restart-arg2 = time; + return -ERESTART_RESTARTBLOCK; + } 'time' here is

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-09 Thread Nick Piggin
On Fri, Mar 09, 2007 at 10:38:35AM +0100, Thomas Gleixner wrote: On Fri, 2007-03-09 at 06:10 +0100, Nick Piggin wrote: i think that's quite right. I'm wondering why this never came up before? But your fix is not complete i think: + restart-arg2 = time; +

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-09 Thread Thomas Gleixner
On Fri, 2007-03-09 at 13:24 +0100, Nick Piggin wrote: 'time' here is relative, so the restarted syscall will do a /full/ wait again. But it has been modified by schedule_timeout? But this does not change the syscall registers, so it is restarted in the same way. We need a

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Nick Piggin
On Fri, Mar 09, 2007 at 12:02:31AM +0100, Thomas Gleixner wrote: > On Thu, 2007-03-08 at 18:29 +0100, Ingo Molnar wrote: > > * Nick Piggin <[EMAIL PROTECTED]> wrote: > > > > > Hi Ingo, > > > > > > I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, > > > it tests whether the

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Nick Piggin
On Thu, Mar 08, 2007 at 06:29:02PM +0100, Ingo Molnar wrote: > > * Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Hi Ingo, > > > > I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, > > it tests whether the SA_RESTART flag works for the sem_wait operation. > > > > I see

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Thomas Gleixner
On Thu, 2007-03-08 at 18:29 +0100, Ingo Molnar wrote: > * Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Hi Ingo, > > > > I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, > > it tests whether the SA_RESTART flag works for the sem_wait operation. Not sure, whether the testcase

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Ingo Molnar
* Nick Piggin <[EMAIL PROTECTED]> wrote: > Hi Ingo, > > I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, > it tests whether the SA_RESTART flag works for the sem_wait operation. > > I see sem_wait is implemented with futex_wait, so I wonder whether we > can make it

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Ingo Molnar
* Nick Piggin [EMAIL PROTECTED] wrote: Hi Ingo, I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, it tests whether the SA_RESTART flag works for the sem_wait operation. I see sem_wait is implemented with futex_wait, so I wonder whether we can make it restartable? Am

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Thomas Gleixner
On Thu, 2007-03-08 at 18:29 +0100, Ingo Molnar wrote: * Nick Piggin [EMAIL PROTECTED] wrote: Hi Ingo, I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, it tests whether the SA_RESTART flag works for the sem_wait operation. Not sure, whether the testcase is correct

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Nick Piggin
On Thu, Mar 08, 2007 at 06:29:02PM +0100, Ingo Molnar wrote: * Nick Piggin [EMAIL PROTECTED] wrote: Hi Ingo, I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, it tests whether the SA_RESTART flag works for the sem_wait operation. I see sem_wait is implemented

Re: [rfc][patch] futex: restartable futex_wait?

2007-03-08 Thread Nick Piggin
On Fri, Mar 09, 2007 at 12:02:31AM +0100, Thomas Gleixner wrote: On Thu, 2007-03-08 at 18:29 +0100, Ingo Molnar wrote: * Nick Piggin [EMAIL PROTECTED] wrote: Hi Ingo, I'm seeing an LTP test fail for ltp test sigaction_16_24. Basically, it tests whether the SA_RESTART flag works