lkml.org 
[lkml]   [2007]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC] msleep() with hrtimers

* Roman Zippel <zippel@linux-m68k.org> wrote:

> > Here's another approach: a reimplementation of msleep() and
> > msleep_interruptible() using hrtimers. On a system without real
> > hrtimers this code will at least drop down to single-jiffy delays
> > much of the time (though not deterministically so). On my x86_64
> > system with Thomas's hrtimer/dyntick patch applied, msleep(1) gives
> > almost exactly what was asked for.
>
> One possible problem here is that setting up that timer can be
> considerably more expensive, for a relative timer you have to read the
> current time, which can be quite expensive (e.g. your machine now uses
> the PIT timer, because TSC was deemed unstable).

i dont think there's any significant overhead. The OLPC folks are pretty
sensitive to performance, so if there was any genuine measurable
overhead due to this, i'd expect them to report it. And even if there
_was_ overhead, it would be well worth its price, the legacies of HZ are
clearly biting the OLPC project here. The sooner we get rid of HZ
dependencies and HZ artifacts, the better.

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-07-16 13:51    [from the cache]
©2003-2011 Jasper Spaans