Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
From: Con Kolivas (kernel_at_kolivas.org)
Date: 07/14/05
- Previous message: Egry Gábor: "[PATCH 3/19] Kconfig I18N: lxdialog"
- In reply to: Linus Torvalds: "Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt"
- Next in thread: George Anzinger: "Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt"
- Reply: George Anzinger: "Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Linus Torvalds <torvalds@osdl.org> Date: Thu, 14 Jul 2005 09:54:51 +1000
On Thu, 14 Jul 2005 05:10, Linus Torvalds wrote:
> On Wed, 13 Jul 2005, Vojtech Pavlik wrote:
> > No, but 1/1000Hz = 1000000ns, while 1/864Hz = 1157407.407ns. If you have
> > a counter that counts the ticks in nanoseconds (xtime ...), the first
> > will be exact, the second will be accumulating an error.
>
> It's not even that we have a counter like that, it's the simple fact that
> we have a standard interface to user space that is based on milli-, micro-
> and nanoseconds.
>
> (For "poll()", "struct timeval" and "struct timespec" respectively).
>
> It's totally pointless saying that we can do 864 Hz "exactly", when the
> fact is that all the timeouts we ever get from user space aren't in that
> format. So the only thing that matters is how close to a millisecond we
> can get, not how close to some random number.
That may be the case but when I've measured the actual delay of schedule
timeout when using nanosleep from userspace, the average at 1000Hz was 1.4ms
+/- 1.5 sd . When we're expecting a sleep of "up to 1ms" we're getting 50%
longer than the longest expected. Purely mathematically the accuracy of
changing HZ from 1000 -> 864 will not bring with it any significant change to
the accuracy. This can easily be measured as well to confirm.
Using schedule timeout as an argument against it doesn't hold for me.
Vojtech's comment of :
> "No, but 1/1000Hz = 1000000ns, while 1/864Hz = 1157407.407ns. If you have a
> counter that counts the ticks in nanoseconds (xtime ...), the first will be
> exact, the second will be accumulating an error."
is probably the most valid argument against such a funky number.
Cheers,
Con
-
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/
- application/pgp-signature attachment: stored
- Previous message: Egry Gábor: "[PATCH 3/19] Kconfig I18N: lxdialog"
- In reply to: Linus Torvalds: "Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt"
- Next in thread: George Anzinger: "Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt"
- Reply: George Anzinger: "Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|