mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 23:11:27 +00:00
nohz: Convert a few places to use local per cpu accesses
A few functions use remote per CPU access APIs when they deal with local values. Just do the right conversion to improve performance, code readability and debug checks. While at it, lets extend some of these function names with *_this_cpu() suffix in order to display their purpose more clearly. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
dc1ccc4815
commit
e8fcaa5c54
5 changed files with 25 additions and 34 deletions
|
@ -104,7 +104,7 @@ extern struct cpumask *tick_get_broadcast_oneshot_mask(void);
|
|||
extern void tick_clock_notify(void);
|
||||
extern int tick_check_oneshot_change(int allow_nohz);
|
||||
extern struct tick_sched *tick_get_tick_sched(int cpu);
|
||||
extern void tick_check_idle(int cpu);
|
||||
extern void tick_check_idle(void);
|
||||
extern int tick_oneshot_mode_active(void);
|
||||
# ifndef arch_needs_cpu
|
||||
# define arch_needs_cpu(cpu) (0)
|
||||
|
@ -112,7 +112,7 @@ extern int tick_oneshot_mode_active(void);
|
|||
# else
|
||||
static inline void tick_clock_notify(void) { }
|
||||
static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
|
||||
static inline void tick_check_idle(int cpu) { }
|
||||
static inline void tick_check_idle(void) { }
|
||||
static inline int tick_oneshot_mode_active(void) { return 0; }
|
||||
# endif
|
||||
|
||||
|
@ -121,7 +121,7 @@ static inline void tick_init(void) { }
|
|||
static inline void tick_cancel_sched_timer(int cpu) { }
|
||||
static inline void tick_clock_notify(void) { }
|
||||
static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
|
||||
static inline void tick_check_idle(int cpu) { }
|
||||
static inline void tick_check_idle(void) { }
|
||||
static inline int tick_oneshot_mode_active(void) { return 0; }
|
||||
#endif /* !CONFIG_GENERIC_CLOCKEVENTS */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue