blob: 9471f0736a3a0a092ff6195254165ea532b8907e [file] [log] [blame]
Ingo Molnar370c9132017-02-08 18:51:35 +01001#ifndef _LINUX_SCHED_NOHZ_H
2#define _LINUX_SCHED_NOHZ_H
3
4#include <linux/sched.h>
5
Ingo Molnar752b3ca2017-02-03 11:12:59 +01006/*
7 * This is the interface between the scheduler and nohz/dyntics:
8 */
9
10#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
11extern void cpu_load_update_nohz_start(void);
12extern void cpu_load_update_nohz_stop(void);
13#else
14static inline void cpu_load_update_nohz_start(void) { }
15static inline void cpu_load_update_nohz_stop(void) { }
16#endif
17
18#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
19extern void nohz_balance_enter_idle(int cpu);
20extern void set_cpu_sd_state_idle(void);
21extern int get_nohz_timer_target(void);
22#else
23static inline void nohz_balance_enter_idle(int cpu) { }
24static inline void set_cpu_sd_state_idle(void) { }
25#endif
26
27#ifdef CONFIG_NO_HZ_COMMON
28void calc_load_enter_idle(void);
29void calc_load_exit_idle(void);
30#else
31static inline void calc_load_enter_idle(void) { }
32static inline void calc_load_exit_idle(void) { }
33#endif /* CONFIG_NO_HZ_COMMON */
34
35#if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP)
36extern void wake_up_nohz_cpu(int cpu);
37#else
38static inline void wake_up_nohz_cpu(int cpu) { }
39#endif
40
41#ifdef CONFIG_NO_HZ_FULL
42extern u64 scheduler_tick_max_deferment(void);
43#endif
44
Ingo Molnar370c9132017-02-08 18:51:35 +010045#endif /* _LINUX_SCHED_NOHZ_H */