Hi, On Tuesday 18. March 2008, john stultz wrote:I didn't looked at the code, what I meant was moving it close to it, so it's done at the same time. You could use a shift (e.g. SHIFT_HZ for non NO_HZ), to scale these value up a little. It's not cruft, littering the code with unnecessary static variables is IMO worse. In OO terms this would be an abstract base class, the actual implementation only needs to provide a few functions and otherwise doesn't really have to worry about all the details. Splitting the structure is certainly an option, but hiding related variables as static is IMO not a good choice. Well, here are some ideas where I think it might be useful, it would make it possible to chain clocks with different frequencies: - SMP systems with slighty different clock frequencies. - instead of deactivating an unstable tsc clock, delay activation until we know it's stable. - deactivate a tsc (which stops during sleep) before sleep and resync when needed. - use different clocks for timer purposes (e.g. jiffies and a slow clock). (The last point would make IMO more acceptable to use hrtimer for more trivial purposes, if it were at least possible to select the used clock.) The extra resolution is still there, as it doesn't make any sense to use a shift larger than 32. NTP_SCALE_SHIFT is a constant and a very simple shift, which produces better code. There are two ways to use the nsec value here: 1. nsec_now = (((cycle_new - cycle_last) * mult) + nsec) >> shift 2. nsec_now = ((cycle_new - cycle_last) * mult) >> shift + nsec >> NTP_SCALE_SHIFT Both do the same under the condition that the gettime operation is not significantly shorter than 1nsec, but the second version can generate slightly better code. I intended to use the first for xtime_nsec, but instead the value is still splitted at every timer interrupt. For the raw time please at least get rid of the splitting of raw_nsec in update_wall_time(). From the monotonic_raw value you only need the tv_sec part and the tv_nsec part can be calculated as above. bye, Roman --
| Lee Revell | Re: [RFC][PATCH] cpuidle: avoid singing capacitors |
| Ingo Molnar | [bug] latest -git boot hang |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Christoph Hellwig | Re: 2.6.24-rc6-mm1 |
git: | |
| Imran M Yousuf | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Dan Zwell | [PATCH] Color support added to git-add--interactive. |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Petr Vandrovec | Re: Fwd: [OT] Re: Git via a proxy server? |
| Lars Hansson | Re: Code signing in OpenBSD |
| Richard Stallman | Real men don't attack straw men |
| Pau | acer aspire one dmesg? |
| Henning Brauer | Re: About Xen: maybe a reiterative question but .. |
| Jarek Poplawski | Re: loaded router, excessive getnstimeofday in oprofile |
| Julius Volz | [PATCH RFC 20/24] IPVS: Add validity checks when adding/editing v6 services |
| Bruno | [PATCH 1/2] r8169: WoL fixes |
| Corey Hickey | [PATCH 01/10] Preparatory refactoring part 1. |
