On Thu, 14 Jul 2005, Linus Torvalds wrote: > > But what you can do is to have HZ at some reasonably high value (ie in the > kHz range), and then slow down the system clock to conserve energy, and > increment jiffies by 16 or 32 when in "slow clock mode". Btw, it doesn't have to even be a slow-down due to the kernels decision. In a VM environment, the timer interrupt might be erratic, and the timer interrupt might read some hardware register (TSC or something) and use _that_ to increment jiffies by the "proper" amount. See? The point is that "jiffies" is useful exactly because it's very cheap to read portably (there are no portable high-performance alternatives) and because it has the right resolution to be useful in 32 bits. That doesn't mean that the code that updates it can't be clever. We already have code that updates it that is a lot more intelligent than 99% of the code that reads it: we update it in 64 bits under xtime_lock, even though most readers use a lock-less 32-bit read and only get a partial value - the part they care about. And this is a wonderful property that everybody seems to be ignoring, even though we have absolutely tons of code that just takes all of this goodness for granted. 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/
- 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: Alan Cox <[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
- Prev by Date: Re: [patch 2.6] remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c
- Next by Date: Re: [rfc patch 2/2] direct-io: remove address alignment check
- 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):