Re: [patch] change futex_wait() to hrtimers

From: Ingo Molnar
Date: Mon Mar 12 2007 - 07:20:41 EST



* Nick Piggin <npiggin@xxxxxxx> wrote:

> > even if this means more work for you (i'm sorry about that!) i'm
> > quite sure we should take Sebastien's hrtimers based implementation
> > of futex_wait(), and use the nanosleep method to restart it. There's
> > no point in further tweaking the imprecise approach: whenever some
> > timeout needs to be restarted, it's a candidate for hrtimers.
>
> Absolute timeout is needed, sure. But once that is done, hrtimers does
> not fix a bug, does it?

the issue is this: your fix reduces the effects of the bug but it is
still fundamentally incomplete because of the use of timer_list. So
instead of trying to fix the bug the wrong way, please try to fix it the
right way, ontop of an already existing and tested patch, ok? That also
enables the other neat stuff Thomas talked about.

> > until then, glibc already handles timeouts and restarts it manually.
>
> It isn't timeout handling that is buggy, but EINTR behaviour. And
> glibc does not handle that here.

hm. I'm wondering how this wasnt noticed sooner - this futex_wait
behavior has been there for like forever.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/