blob: 3d3a97d9399d8925a8ea0cf81b2c43bec6bb25e5 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Ingo Molnar370c9132017-02-08 18:51:35 +01002#ifndef _LINUX_SCHED_NOHZ_H
3#define _LINUX_SCHED_NOHZ_H
4
Ingo Molnar752b3ca2017-02-03 11:12:59 +01005/*
Ingo Molnar86d35af2017-07-05 10:14:38 +02006 * This is the interface between the scheduler and nohz/dynticks:
Ingo Molnar752b3ca2017-02-03 11:12:59 +01007 */
8
9#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
10extern void cpu_load_update_nohz_start(void);
11extern void cpu_load_update_nohz_stop(void);
12#else
13static inline void cpu_load_update_nohz_start(void) { }
14static inline void cpu_load_update_nohz_stop(void) { }
15#endif
16
17#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
18extern void nohz_balance_enter_idle(int cpu);
19extern void set_cpu_sd_state_idle(void);
20extern int get_nohz_timer_target(void);
21#else
22static inline void nohz_balance_enter_idle(int cpu) { }
23static inline void set_cpu_sd_state_idle(void) { }
24#endif
25
26#ifdef CONFIG_NO_HZ_COMMON
Frederic Weisbecker3c85d6d2017-06-19 04:12:00 +020027void calc_load_nohz_start(void);
28void calc_load_nohz_stop(void);
Ingo Molnar752b3ca2017-02-03 11:12:59 +010029#else
Frederic Weisbecker3c85d6d2017-06-19 04:12:00 +020030static inline void calc_load_nohz_start(void) { }
31static inline void calc_load_nohz_stop(void) { }
Ingo Molnar752b3ca2017-02-03 11:12:59 +010032#endif /* CONFIG_NO_HZ_COMMON */
33
34#if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP)
35extern void wake_up_nohz_cpu(int cpu);
36#else
37static inline void wake_up_nohz_cpu(int cpu) { }
38#endif
39
40#ifdef CONFIG_NO_HZ_FULL
41extern u64 scheduler_tick_max_deferment(void);
42#endif
43
Ingo Molnar370c9132017-02-08 18:51:35 +010044#endif /* _LINUX_SCHED_NOHZ_H */