Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tick: Rename tick_check_idle() to tick_irq_enter()

This makes the code more symetric against the existing tick functions
called on irq exit: tick_irq_exit() and tick_nohz_irq_exit().

These function are also symetric as they mirror each other's action:
we start to account idle time on irq exit and we stop this accounting
on irq entry. Also the tick is stopped on irq exit and timekeeping
catches up with the tickless time elapsed until we reach irq entry.

This rename was suggested by Peter Zijlstra a long while ago but it
got forgotten in the mass.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alex Shi <alex.shi@linaro.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Kevin Hilman <khilman@linaro.org>
Link: http://lkml.kernel.org/r/1387320692-28460-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

+8 -8
+3 -3
include/linux/tick.h
··· 104 104 extern void tick_clock_notify(void); 105 105 extern int tick_check_oneshot_change(int allow_nohz); 106 106 extern struct tick_sched *tick_get_tick_sched(int cpu); 107 - extern void tick_check_idle(void); 107 + extern void tick_irq_enter(void); 108 108 extern int tick_oneshot_mode_active(void); 109 109 # ifndef arch_needs_cpu 110 110 # define arch_needs_cpu(cpu) (0) ··· 112 112 # else 113 113 static inline void tick_clock_notify(void) { } 114 114 static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } 115 - static inline void tick_check_idle(void) { } 115 + static inline void tick_irq_enter(void) { } 116 116 static inline int tick_oneshot_mode_active(void) { return 0; } 117 117 # endif 118 118 ··· 121 121 static inline void tick_cancel_sched_timer(int cpu) { } 122 122 static inline void tick_clock_notify(void) { } 123 123 static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } 124 - static inline void tick_check_idle(void) { } 124 + static inline void tick_irq_enter(void) { } 125 125 static inline int tick_oneshot_mode_active(void) { return 0; } 126 126 #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ 127 127
+1 -1
kernel/softirq.c
··· 318 318 * here, as softirq will be serviced on return from interrupt. 319 319 */ 320 320 local_bh_disable(); 321 - tick_check_idle(); 321 + tick_irq_enter(); 322 322 _local_bh_enable(); 323 323 } 324 324
+4 -4
kernel/time/tick-sched.c
··· 1023 1023 #endif 1024 1024 } 1025 1025 1026 - static inline void tick_check_nohz_this_cpu(void) 1026 + static inline void tick_nohz_irq_enter(void) 1027 1027 { 1028 1028 struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); 1029 1029 ktime_t now; ··· 1042 1042 #else 1043 1043 1044 1044 static inline void tick_nohz_switch_to_nohz(void) { } 1045 - static inline void tick_check_nohz_this_cpu(void) { } 1045 + static inline void tick_nohz_irq_enter(void) { } 1046 1046 1047 1047 #endif /* CONFIG_NO_HZ_COMMON */ 1048 1048 1049 1049 /* 1050 1050 * Called from irq_enter to notify about the possible interruption of idle() 1051 1051 */ 1052 - void tick_check_idle(void) 1052 + void tick_irq_enter(void) 1053 1053 { 1054 1054 tick_check_oneshot_broadcast_this_cpu(); 1055 - tick_check_nohz_this_cpu(); 1055 + tick_nohz_irq_enter(); 1056 1056 } 1057 1057 1058 1058 /*