diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-20 07:05:15 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-23 07:59:54 -0400 |
commit | ab8177bc53e8ae3a3ba6d200ce2c2dae263f7ee5 (patch) | |
tree | c8b370496497b4f96d6a17da906bdd9314e9a090 /include/linux/hrtimer.h | |
parent | f24444b01bf6c51c300fd3ffc73423383d747882 (diff) |
hrtimers: Avoid touching inactive timer bases
Instead of iterating over all possible timer bases avoid it by marking
the active bases in the cpu base.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index cc5f5f51db10..771c95802edc 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -143,7 +143,8 @@ struct hrtimer_sleeper { | |||
143 | */ | 143 | */ |
144 | struct hrtimer_clock_base { | 144 | struct hrtimer_clock_base { |
145 | struct hrtimer_cpu_base *cpu_base; | 145 | struct hrtimer_cpu_base *cpu_base; |
146 | clockid_t index; | 146 | int index; |
147 | clockid_t clockid; | ||
147 | struct timerqueue_head active; | 148 | struct timerqueue_head active; |
148 | ktime_t resolution; | 149 | ktime_t resolution; |
149 | ktime_t (*get_time)(void); | 150 | ktime_t (*get_time)(void); |
@@ -162,7 +163,7 @@ enum hrtimer_base_type { | |||
162 | * struct hrtimer_cpu_base - the per cpu clock bases | 163 | * struct hrtimer_cpu_base - the per cpu clock bases |
163 | * @lock: lock protecting the base and associated clock bases | 164 | * @lock: lock protecting the base and associated clock bases |
164 | * and timers | 165 | * and timers |
165 | * @clock_base: array of clock bases for this cpu | 166 | * @active_bases: Bitfield to mark bases with active timers |
166 | * @expires_next: absolute time of the next event which was scheduled | 167 | * @expires_next: absolute time of the next event which was scheduled |
167 | * via clock_set_next_event() | 168 | * via clock_set_next_event() |
168 | * @hres_active: State of high resolution mode | 169 | * @hres_active: State of high resolution mode |
@@ -171,9 +172,11 @@ enum hrtimer_base_type { | |||
171 | * @nr_retries: Total number of hrtimer interrupt retries | 172 | * @nr_retries: Total number of hrtimer interrupt retries |
172 | * @nr_hangs: Total number of hrtimer interrupt hangs | 173 | * @nr_hangs: Total number of hrtimer interrupt hangs |
173 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | 174 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
175 | * @clock_base: array of clock bases for this cpu | ||
174 | */ | 176 | */ |
175 | struct hrtimer_cpu_base { | 177 | struct hrtimer_cpu_base { |
176 | raw_spinlock_t lock; | 178 | raw_spinlock_t lock; |
179 | unsigned long active_bases; | ||
177 | #ifdef CONFIG_HIGH_RES_TIMERS | 180 | #ifdef CONFIG_HIGH_RES_TIMERS |
178 | ktime_t expires_next; | 181 | ktime_t expires_next; |
179 | int hres_active; | 182 | int hres_active; |