sched/headers: Move the NOHZ APIs from <linux/sched.h> to <linux/sched/nohz.h>
[linux-2.6/btrfs-unstable.git] / include / linux / sched / nohz.h
blob9471f0736a3a0a092ff6195254165ea532b8907e
1 #ifndef _LINUX_SCHED_NOHZ_H
2 #define _LINUX_SCHED_NOHZ_H
4 #include <linux/sched.h>
6 /*
7 * This is the interface between the scheduler and nohz/dyntics:
8 */
10 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
11 extern void cpu_load_update_nohz_start(void);
12 extern void cpu_load_update_nohz_stop(void);
13 #else
14 static inline void cpu_load_update_nohz_start(void) { }
15 static inline void cpu_load_update_nohz_stop(void) { }
16 #endif
18 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
19 extern void nohz_balance_enter_idle(int cpu);
20 extern void set_cpu_sd_state_idle(void);
21 extern int get_nohz_timer_target(void);
22 #else
23 static inline void nohz_balance_enter_idle(int cpu) { }
24 static inline void set_cpu_sd_state_idle(void) { }
25 #endif
27 #ifdef CONFIG_NO_HZ_COMMON
28 void calc_load_enter_idle(void);
29 void calc_load_exit_idle(void);
30 #else
31 static inline void calc_load_enter_idle(void) { }
32 static inline void calc_load_exit_idle(void) { }
33 #endif /* CONFIG_NO_HZ_COMMON */
35 #if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP)
36 extern void wake_up_nohz_cpu(int cpu);
37 #else
38 static inline void wake_up_nohz_cpu(int cpu) { }
39 #endif
41 #ifdef CONFIG_NO_HZ_FULL
42 extern u64 scheduler_tick_max_deferment(void);
43 #endif
45 #endif /* _LINUX_SCHED_NOHZ_H */