diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-20 17:14:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-23 07:59:54 -0400 |
commit | 68fa61c026057a39d6ccb850aa8785043afbee02 (patch) | |
tree | aa8a96849d4bd9b1e46c602d398cda0e72d4115c /include | |
parent | ab8177bc53e8ae3a3ba6d200ce2c2dae263f7ee5 (diff) |
hrtimers: Reorder clock bases
The ordering of the clock bases is historical due to the
CLOCK_REALTIME and CLOCK_MONOTONIC constants. Now the hrtimer bases
have their own enumeration due to the gap between CLOCK_MONOTONIC and
CLOCK_BOOTTIME. So we can be more clever as most timers end up on the
CLOCK_MONOTONIC base due to the virtue of POSIX declaring that
relative CLOCK_REALTIME timers are not affected by time changes. In
desktop environments this is slowly changing as applications switch to
absolute timers, but I've observed empty CLOCK_REALTIME bases often
enough. There is no performance penalty or overhead when
CLOCK_REALTIME timers are active, but in case they are not we don't
skip over a full cache line.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hrtimer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 771c95802edc..51932e5acf7c 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -153,8 +153,8 @@ struct hrtimer_clock_base { | |||
153 | }; | 153 | }; |
154 | 154 | ||
155 | enum hrtimer_base_type { | 155 | enum hrtimer_base_type { |
156 | HRTIMER_BASE_REALTIME, | ||
157 | HRTIMER_BASE_MONOTONIC, | 156 | HRTIMER_BASE_MONOTONIC, |
157 | HRTIMER_BASE_REALTIME, | ||
158 | HRTIMER_BASE_BOOTTIME, | 158 | HRTIMER_BASE_BOOTTIME, |
159 | HRTIMER_MAX_CLOCK_BASES, | 159 | HRTIMER_MAX_CLOCK_BASES, |
160 | }; | 160 | }; |