Skip to content

Commit 5acac1b

Browse files
committed
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>
1 parent 1b3f828 commit 5acac1b

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎include/linux/tick.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@ extern struct cpumask *tick_get_broadcast_oneshot_mask(void);
104104
extern void tick_clock_notify(void);
105105
extern int tick_check_oneshot_change(int allow_nohz);
106106
extern struct tick_sched *tick_get_tick_sched(int cpu);
107-
extern void tick_check_idle(void);
107+
extern void tick_irq_enter(void);
108108
extern int tick_oneshot_mode_active(void);
109109
# ifndef arch_needs_cpu
110110
# define arch_needs_cpu(cpu) (0)
111111
# endif
112112
# else
113113
static inline void tick_clock_notify(void) { }
114114
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) { }
116116
static inline int tick_oneshot_mode_active(void) { return 0; }
117117
# endif
118118

@@ -121,7 +121,7 @@ static inline void tick_init(void) { }
121121
static inline void tick_cancel_sched_timer(int cpu) { }
122122
static inline void tick_clock_notify(void) { }
123123
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) { }
125125
static inline int tick_oneshot_mode_active(void) { return 0; }
126126
#endif /* !CONFIG_GENERIC_CLOCKEVENTS */
127127

‎kernel/softirq.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ void irq_enter(void)
318318
* here, as softirq will be serviced on return from interrupt.
319319
*/
320320
local_bh_disable();
321-
tick_check_idle();
321+
tick_irq_enter();
322322
_local_bh_enable();
323323
}
324324

‎kernel/time/tick-sched.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ static void tick_nohz_kick_tick(struct tick_sched *ts, ktime_t now)
10231023
#endif
10241024
}
10251025

1026-
static inline void tick_check_nohz_this_cpu(void)
1026+
static inline void tick_nohz_irq_enter(void)
10271027
{
10281028
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
10291029
ktime_t now;
@@ -1042,17 +1042,17 @@ static inline void tick_check_nohz_this_cpu(void)
10421042
#else
10431043

10441044
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) { }
10461046

10471047
#endif /* CONFIG_NO_HZ_COMMON */
10481048

10491049
/*
10501050
* Called from irq_enter to notify about the possible interruption of idle()
10511051
*/
1052-
void tick_check_idle(void)
1052+
void tick_irq_enter(void)
10531053
{
10541054
tick_check_oneshot_broadcast_this_cpu();
1055-
tick_check_nohz_this_cpu();
1055+
tick_nohz_irq_enter();
10561056
}
10571057

10581058
/*

0 commit comments

Comments
 (0)