On Thu, 14 Jul 2005, Alan Cox wrote: > > I suspect the problem for some of this is that people think of jiffies > as incrementing by 1. If HZ is right then jiffies can be in nS, it just > won't increment by 1. No, jiffies _cannot_ be in nS, because of the fact that then it doesn't fit in a word any more. A lot of things want timeouts in the tens of minutes, and a jiffy clock that tries to ne in nS just screws that up entirely, and forces people to use u64. Which is much more expensive to compare on 32-bit architectures due to nasty atomicity issues. So you want to keep the "normal" timeout 32-bit. In ten years we may not care any more. For the forseeable future we definitely do. > Its also why jiffies() is better on some platforms > because many machines can answer "what time is it" far more accurately > than they can set interrupts. That's not what "jiffies" are about. If you want accurate time, use something else, like gettimeofday. The timeouts are _only_ relevant on the scale of a timer interrupt, since by definition that's what we're waiting for. So accuracy is a total non-issue. The only kind of accuracy we care about is "how often can the timer ticks happen". Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Dmitry Torokhov <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Lee Revell <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Andrew Morton <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Chris Wedgwood <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: dean gaudet <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Chris Wedgwood <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: dean gaudet <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Lee Revell <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Vojtech Pavlik <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: john stultz <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Alan Cox <[email protected]>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Prev by Date: Re: [rfc patch 2/2] direct-io: remove address alignment check
- Next by Date: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Previous by thread: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Next by thread: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Index(es):