lkml.org 
[lkml]   [2007]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] change futex_wait() to hrtimers

* Nick Piggin <npiggin@suse.de> wrote:

> > i dont think we should try to do this. We should not and cannot do
> > anything about all of the artifacts that comes with the use of
> > relative timeouts and schedule_timeout().
> >
> > basically, using jiffies here (which schedule_timeout() does) is
> > /fundamentally/ imprecise. If you get many interrupts, rounding
> > errors sum up - and there's nothing we can do about it!
>
> Well I did convert futex_wait to an absolute timeout based version in
> the subsequent incremental patch. I think that is OK?

it still has the rounding artifacts: using timer_list there is no way to
do a precise long sleep based on many small sleeps.

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.

until then, glibc already handles timeouts and restarts it manually.

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

\
 
 \ /
  Last update: 2007-03-12 12:05    [W:0.104 / U:0.104 seconds]
©2003-2014 Jasper Spaans. Advertise on this site