blob: 028d17b918a7e28b902715e2bb4706952ec5815c [file] [log] [blame]
Ingo Molnar370c9132017-02-08 18:51:35 +01001#ifndef _LINUX_SCHED_NOHZ_H
2#define _LINUX_SCHED_NOHZ_H
3
Ingo Molnar752b3ca2017-02-03 11:12:59 +01004/*
Ingo Molnar86d35af2017-07-05 10:14:38 +02005 * This is the interface between the scheduler and nohz/dynticks:
Ingo Molnar752b3ca2017-02-03 11:12:59 +01006 */
7
8#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
9extern void cpu_load_update_nohz_start(void);
10extern void cpu_load_update_nohz_stop(void);
11#else
12static inline void cpu_load_update_nohz_start(void) { }
13static inline void cpu_load_update_nohz_stop(void) { }
14#endif
15
16#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
17extern void nohz_balance_enter_idle(int cpu);
18extern void set_cpu_sd_state_idle(void);
19extern int get_nohz_timer_target(void);
20#else
21static inline void nohz_balance_enter_idle(int cpu) { }
22static inline void set_cpu_sd_state_idle(void) { }
23#endif
24
25#ifdef CONFIG_NO_HZ_COMMON
Frederic Weisbecker3c85d6d2017-06-19 04:12:00 +020026void calc_load_nohz_start(void);
27void calc_load_nohz_stop(void);
Ingo Molnar752b3ca2017-02-03 11:12:59 +010028#else
Frederic Weisbecker3c85d6d2017-06-19 04:12:00 +020029static inline void calc_load_nohz_start(void) { }
30static inline void calc_load_nohz_stop(void) { }
Ingo Molnar752b3ca2017-02-03 11:12:59 +010031#endif /* CONFIG_NO_HZ_COMMON */
32
33#if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP)
34extern void wake_up_nohz_cpu(int cpu);
35#else
36static inline void wake_up_nohz_cpu(int cpu) { }
37#endif
38
39#ifdef CONFIG_NO_HZ_FULL
40extern u64 scheduler_tick_max_deferment(void);
41#endif
42
Ingo Molnar370c9132017-02-08 18:51:35 +010043#endif /* _LINUX_SCHED_NOHZ_H */