blob: b36f4cf38111579a6af935d855315a8a0769d509 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_SCHED_NOHZ_H
3#define _LINUX_SCHED_NOHZ_H
4
5/*
6 * This is the interface between the scheduler and nohz/dynticks:
7 */
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 int get_nohz_timer_target(void);
20#else
21static inline void nohz_balance_enter_idle(int cpu) { }
22#endif
23
24#ifdef CONFIG_NO_HZ_COMMON
25void calc_load_nohz_start(void);
26void calc_load_nohz_stop(void);
27#else
28static inline void calc_load_nohz_start(void) { }
29static inline void calc_load_nohz_stop(void) { }
30#endif /* CONFIG_NO_HZ_COMMON */
31
32#if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP)
33extern void wake_up_nohz_cpu(int cpu);
34#else
35static inline void wake_up_nohz_cpu(int cpu) { }
36#endif
37
38#endif /* _LINUX_SCHED_NOHZ_H */