lkml.org 
[lkml]   [2005]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i386: Selectable Frequency of the Timer Interrupt


On Thu, 14 Jul 2005, Russell King wrote:
>
> Umm. Except, according to your description of what it's supposed to
> do, the above code can have an accumulating error.

No. It can have a local drift, but the point is, the error never gets
worse - it _stays_ local.

There's no point in polling twice in immediate succession just because a
sleep overslept. That's like a security guard testing each door twice for
being locked, just because he overslept one round. Pointless.

But what matters is that you don't let your local errors accumulate into
the big picture.

Now, if somebody wants to make nicer helper functions so that you can say

timeout = ms_from_now(500);

or something instead of saying "timeout = jiffies + HZ/2", then hey, go
wild. At that point it's just syntactic sugar, and maybe it's worth it.

Linus
-
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: 2009-11-18 23:46    [from the cache]
©2003-2011 Jasper Spaans