diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/perf_event.h | 6 | ||||
| -rw-r--r-- | include/linux/posix-timers.h | 2 | ||||
| -rw-r--r-- | include/linux/rcupdate.h | 7 | ||||
| -rw-r--r-- | include/linux/sched.h | 19 | ||||
| -rw-r--r-- | include/linux/tick.h | 25 |
5 files changed, 49 insertions, 10 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index e0373d26c244..f463a46424e2 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -788,6 +788,12 @@ static inline int __perf_event_disable(void *info) { return -1; } | |||
| 788 | static inline void perf_event_task_tick(void) { } | 788 | static inline void perf_event_task_tick(void) { } |
| 789 | #endif | 789 | #endif |
| 790 | 790 | ||
| 791 | #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_NO_HZ_FULL) | ||
| 792 | extern bool perf_event_can_stop_tick(void); | ||
| 793 | #else | ||
| 794 | static inline bool perf_event_can_stop_tick(void) { return true; } | ||
| 795 | #endif | ||
| 796 | |||
| 791 | #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) | 797 | #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) |
| 792 | extern void perf_restore_debug_store(void); | 798 | extern void perf_restore_debug_store(void); |
| 793 | #else | 799 | #else |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 60bac697a91b..7794d75ed155 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
| @@ -123,6 +123,8 @@ void run_posix_cpu_timers(struct task_struct *task); | |||
| 123 | void posix_cpu_timers_exit(struct task_struct *task); | 123 | void posix_cpu_timers_exit(struct task_struct *task); |
| 124 | void posix_cpu_timers_exit_group(struct task_struct *task); | 124 | void posix_cpu_timers_exit_group(struct task_struct *task); |
| 125 | 125 | ||
| 126 | bool posix_cpu_timers_can_stop_tick(struct task_struct *tsk); | ||
| 127 | |||
| 126 | void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx, | 128 | void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx, |
| 127 | cputime_t *newval, cputime_t *oldval); | 129 | cputime_t *newval, cputime_t *oldval); |
| 128 | 130 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 9ed2c9a4de45..4ccd68e49b00 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -1000,4 +1000,11 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 1000 | #define kfree_rcu(ptr, rcu_head) \ | 1000 | #define kfree_rcu(ptr, rcu_head) \ |
| 1001 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) | 1001 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) |
| 1002 | 1002 | ||
| 1003 | #ifdef CONFIG_RCU_NOCB_CPU | ||
| 1004 | extern bool rcu_is_nocb_cpu(int cpu); | ||
| 1005 | #else | ||
| 1006 | static inline bool rcu_is_nocb_cpu(int cpu) { return false; } | ||
| 1007 | #endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */ | ||
| 1008 | |||
| 1009 | |||
| 1003 | #endif /* __LINUX_RCUPDATE_H */ | 1010 | #endif /* __LINUX_RCUPDATE_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6f950048b6e9..4800e9d1864c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -231,7 +231,7 @@ extern void init_idle_bootup_task(struct task_struct *idle); | |||
| 231 | 231 | ||
| 232 | extern int runqueue_is_locked(int cpu); | 232 | extern int runqueue_is_locked(int cpu); |
| 233 | 233 | ||
| 234 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 234 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) |
| 235 | extern void nohz_balance_enter_idle(int cpu); | 235 | extern void nohz_balance_enter_idle(int cpu); |
| 236 | extern void set_cpu_sd_state_idle(void); | 236 | extern void set_cpu_sd_state_idle(void); |
| 237 | extern int get_nohz_timer_target(void); | 237 | extern int get_nohz_timer_target(void); |
| @@ -1764,13 +1764,13 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p, | |||
| 1764 | } | 1764 | } |
| 1765 | #endif | 1765 | #endif |
| 1766 | 1766 | ||
| 1767 | #ifdef CONFIG_NO_HZ | 1767 | #ifdef CONFIG_NO_HZ_COMMON |
| 1768 | void calc_load_enter_idle(void); | 1768 | void calc_load_enter_idle(void); |
| 1769 | void calc_load_exit_idle(void); | 1769 | void calc_load_exit_idle(void); |
| 1770 | #else | 1770 | #else |
| 1771 | static inline void calc_load_enter_idle(void) { } | 1771 | static inline void calc_load_enter_idle(void) { } |
| 1772 | static inline void calc_load_exit_idle(void) { } | 1772 | static inline void calc_load_exit_idle(void) { } |
| 1773 | #endif /* CONFIG_NO_HZ */ | 1773 | #endif /* CONFIG_NO_HZ_COMMON */ |
| 1774 | 1774 | ||
| 1775 | #ifndef CONFIG_CPUMASK_OFFSTACK | 1775 | #ifndef CONFIG_CPUMASK_OFFSTACK |
| 1776 | static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | 1776 | static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) |
| @@ -1856,10 +1856,17 @@ extern void idle_task_exit(void); | |||
| 1856 | static inline void idle_task_exit(void) {} | 1856 | static inline void idle_task_exit(void) {} |
| 1857 | #endif | 1857 | #endif |
| 1858 | 1858 | ||
| 1859 | #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) | 1859 | #if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP) |
| 1860 | extern void wake_up_idle_cpu(int cpu); | 1860 | extern void wake_up_nohz_cpu(int cpu); |
| 1861 | #else | 1861 | #else |
| 1862 | static inline void wake_up_idle_cpu(int cpu) { } | 1862 | static inline void wake_up_nohz_cpu(int cpu) { } |
| 1863 | #endif | ||
| 1864 | |||
| 1865 | #ifdef CONFIG_NO_HZ_FULL | ||
| 1866 | extern bool sched_can_stop_tick(void); | ||
| 1867 | extern u64 scheduler_tick_max_deferment(void); | ||
| 1868 | #else | ||
| 1869 | static inline bool sched_can_stop_tick(void) { return false; } | ||
| 1863 | #endif | 1870 | #endif |
| 1864 | 1871 | ||
| 1865 | #ifdef CONFIG_SCHED_AUTOGROUP | 1872 | #ifdef CONFIG_SCHED_AUTOGROUP |
diff --git a/include/linux/tick.h b/include/linux/tick.h index 553272e6af55..9180f4b85e6d 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
| @@ -82,7 +82,7 @@ extern int tick_program_event(ktime_t expires, int force); | |||
| 82 | extern void tick_setup_sched_timer(void); | 82 | extern void tick_setup_sched_timer(void); |
| 83 | # endif | 83 | # endif |
| 84 | 84 | ||
| 85 | # if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS | 85 | # if defined CONFIG_NO_HZ_COMMON || defined CONFIG_HIGH_RES_TIMERS |
| 86 | extern void tick_cancel_sched_timer(int cpu); | 86 | extern void tick_cancel_sched_timer(int cpu); |
| 87 | # else | 87 | # else |
| 88 | static inline void tick_cancel_sched_timer(int cpu) { } | 88 | static inline void tick_cancel_sched_timer(int cpu) { } |
| @@ -123,7 +123,7 @@ static inline void tick_check_idle(int cpu) { } | |||
| 123 | static inline int tick_oneshot_mode_active(void) { return 0; } | 123 | static inline int tick_oneshot_mode_active(void) { return 0; } |
| 124 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | 124 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ |
| 125 | 125 | ||
| 126 | # ifdef CONFIG_NO_HZ | 126 | # ifdef CONFIG_NO_HZ_COMMON |
| 127 | DECLARE_PER_CPU(struct tick_sched, tick_cpu_sched); | 127 | DECLARE_PER_CPU(struct tick_sched, tick_cpu_sched); |
| 128 | 128 | ||
| 129 | static inline int tick_nohz_tick_stopped(void) | 129 | static inline int tick_nohz_tick_stopped(void) |
| @@ -138,7 +138,7 @@ extern ktime_t tick_nohz_get_sleep_length(void); | |||
| 138 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 138 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
| 139 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); | 139 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); |
| 140 | 140 | ||
| 141 | # else /* !CONFIG_NO_HZ */ | 141 | # else /* !CONFIG_NO_HZ_COMMON */ |
| 142 | static inline int tick_nohz_tick_stopped(void) | 142 | static inline int tick_nohz_tick_stopped(void) |
| 143 | { | 143 | { |
| 144 | return 0; | 144 | return 0; |
| @@ -155,7 +155,24 @@ static inline ktime_t tick_nohz_get_sleep_length(void) | |||
| 155 | } | 155 | } |
| 156 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } | 156 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } |
| 157 | static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } | 157 | static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } |
| 158 | # endif /* !NO_HZ */ | 158 | # endif /* !CONFIG_NO_HZ_COMMON */ |
| 159 | |||
| 160 | #ifdef CONFIG_NO_HZ_FULL | ||
| 161 | extern void tick_nohz_init(void); | ||
| 162 | extern int tick_nohz_full_cpu(int cpu); | ||
| 163 | extern void tick_nohz_full_check(void); | ||
| 164 | extern void tick_nohz_full_kick(void); | ||
| 165 | extern void tick_nohz_full_kick_all(void); | ||
| 166 | extern void tick_nohz_task_switch(struct task_struct *tsk); | ||
| 167 | #else | ||
| 168 | static inline void tick_nohz_init(void) { } | ||
| 169 | static inline int tick_nohz_full_cpu(int cpu) { return 0; } | ||
| 170 | static inline void tick_nohz_full_check(void) { } | ||
| 171 | static inline void tick_nohz_full_kick(void) { } | ||
| 172 | static inline void tick_nohz_full_kick_all(void) { } | ||
| 173 | static inline void tick_nohz_task_switch(struct task_struct *tsk) { } | ||
| 174 | #endif | ||
| 175 | |||
| 159 | 176 | ||
| 160 | # ifdef CONFIG_CPU_IDLE_GOV_MENU | 177 | # ifdef CONFIG_CPU_IDLE_GOV_MENU |
| 161 | extern void menu_hrtimer_cancel(void); | 178 | extern void menu_hrtimer_cancel(void); |
