Skip to content

Commit

Permalink
hrtimers: Make struct hrtimer_cpu_base layout less stupid
Browse files Browse the repository at this point in the history
In the HIGHRES=y case we access the members at the end of struct
hrtimer_cpu_base first and then the one at the beginning. Move the
hrtimer data to front, so we have linear progressing access.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Peter Zijlstra <[email protected]>
  • Loading branch information
KAGA-KOKO committed May 23, 2011
1 parent 9ec2690 commit f24444b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/hrtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ enum hrtimer_base_type {
*/
struct hrtimer_cpu_base {
raw_spinlock_t lock;
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
#ifdef CONFIG_HIGH_RES_TIMERS
ktime_t expires_next;
int hres_active;
Expand All @@ -184,6 +183,7 @@ struct hrtimer_cpu_base {
unsigned long nr_hangs;
ktime_t max_hang_time;
#endif
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
};

static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
Expand Down

0 comments on commit f24444b

Please sign in to comment.