diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hrtimer.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 6 | ||||
| -rw-r--r-- | include/linux/sched/sysctl.h | 12 | ||||
| -rw-r--r-- | include/linux/timer.h | 9 |
4 files changed, 12 insertions, 17 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 5db055821ef3..69551020bb97 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -163,6 +163,7 @@ enum hrtimer_base_type { | |||
| 163 | * @cpu: cpu number | 163 | * @cpu: cpu number |
| 164 | * @active_bases: Bitfield to mark bases with active timers | 164 | * @active_bases: Bitfield to mark bases with active timers |
| 165 | * @clock_was_set_seq: Sequence counter of clock was set events | 165 | * @clock_was_set_seq: Sequence counter of clock was set events |
| 166 | * @migration_enabled: The migration of hrtimers to other cpus is enabled | ||
| 166 | * @expires_next: absolute time of the next event which was scheduled | 167 | * @expires_next: absolute time of the next event which was scheduled |
| 167 | * via clock_set_next_event() | 168 | * via clock_set_next_event() |
| 168 | * @next_timer: Pointer to the first expiring timer | 169 | * @next_timer: Pointer to the first expiring timer |
| @@ -186,6 +187,7 @@ struct hrtimer_cpu_base { | |||
| 186 | unsigned int cpu; | 187 | unsigned int cpu; |
| 187 | unsigned int active_bases; | 188 | unsigned int active_bases; |
| 188 | unsigned int clock_was_set_seq; | 189 | unsigned int clock_was_set_seq; |
| 190 | bool migration_enabled; | ||
| 189 | #ifdef CONFIG_HIGH_RES_TIMERS | 191 | #ifdef CONFIG_HIGH_RES_TIMERS |
| 190 | unsigned int in_hrtirq : 1, | 192 | unsigned int in_hrtirq : 1, |
| 191 | hres_active : 1, | 193 | hres_active : 1, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 26a2e6122734..d7151460b0cf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -335,14 +335,10 @@ extern int runqueue_is_locked(int cpu); | |||
| 335 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | 335 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) |
| 336 | extern void nohz_balance_enter_idle(int cpu); | 336 | extern void nohz_balance_enter_idle(int cpu); |
| 337 | extern void set_cpu_sd_state_idle(void); | 337 | extern void set_cpu_sd_state_idle(void); |
| 338 | extern int get_nohz_timer_target(int pinned); | 338 | extern int get_nohz_timer_target(void); |
| 339 | #else | 339 | #else |
| 340 | static inline void nohz_balance_enter_idle(int cpu) { } | 340 | static inline void nohz_balance_enter_idle(int cpu) { } |
| 341 | static inline void set_cpu_sd_state_idle(void) { } | 341 | static inline void set_cpu_sd_state_idle(void) { } |
| 342 | static inline int get_nohz_timer_target(int pinned) | ||
| 343 | { | ||
| 344 | return smp_processor_id(); | ||
| 345 | } | ||
| 346 | #endif | 342 | #endif |
| 347 | 343 | ||
| 348 | /* | 344 | /* |
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h index 596a0e007c62..c9e4731cf10b 100644 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h | |||
| @@ -57,24 +57,12 @@ extern unsigned int sysctl_numa_balancing_scan_size; | |||
| 57 | extern unsigned int sysctl_sched_migration_cost; | 57 | extern unsigned int sysctl_sched_migration_cost; |
| 58 | extern unsigned int sysctl_sched_nr_migrate; | 58 | extern unsigned int sysctl_sched_nr_migrate; |
| 59 | extern unsigned int sysctl_sched_time_avg; | 59 | extern unsigned int sysctl_sched_time_avg; |
| 60 | extern unsigned int sysctl_timer_migration; | ||
| 61 | extern unsigned int sysctl_sched_shares_window; | 60 | extern unsigned int sysctl_sched_shares_window; |
| 62 | 61 | ||
| 63 | int sched_proc_update_handler(struct ctl_table *table, int write, | 62 | int sched_proc_update_handler(struct ctl_table *table, int write, |
| 64 | void __user *buffer, size_t *length, | 63 | void __user *buffer, size_t *length, |
| 65 | loff_t *ppos); | 64 | loff_t *ppos); |
| 66 | #endif | 65 | #endif |
| 67 | #ifdef CONFIG_SCHED_DEBUG | ||
| 68 | static inline unsigned int get_sysctl_timer_migration(void) | ||
| 69 | { | ||
| 70 | return sysctl_timer_migration; | ||
| 71 | } | ||
| 72 | #else | ||
| 73 | static inline unsigned int get_sysctl_timer_migration(void) | ||
| 74 | { | ||
| 75 | return 1; | ||
| 76 | } | ||
| 77 | #endif | ||
| 78 | 66 | ||
| 79 | /* | 67 | /* |
| 80 | * control realtime throttling: | 68 | * control realtime throttling: |
diff --git a/include/linux/timer.h b/include/linux/timer.h index ff0689b6e297..61aa61dc410c 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -238,6 +238,15 @@ extern void run_local_timers(void); | |||
| 238 | struct hrtimer; | 238 | struct hrtimer; |
| 239 | extern enum hrtimer_restart it_real_fn(struct hrtimer *); | 239 | extern enum hrtimer_restart it_real_fn(struct hrtimer *); |
| 240 | 240 | ||
| 241 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) | ||
| 242 | #include <linux/sysctl.h> | ||
| 243 | |||
| 244 | extern unsigned int sysctl_timer_migration; | ||
| 245 | int timer_migration_handler(struct ctl_table *table, int write, | ||
| 246 | void __user *buffer, size_t *lenp, | ||
| 247 | loff_t *ppos); | ||
| 248 | #endif | ||
| 249 | |||
| 241 | unsigned long __round_jiffies(unsigned long j, int cpu); | 250 | unsigned long __round_jiffies(unsigned long j, int cpu); |
| 242 | unsigned long __round_jiffies_relative(unsigned long j, int cpu); | 251 | unsigned long __round_jiffies_relative(unsigned long j, int cpu); |
| 243 | unsigned long round_jiffies(unsigned long j); | 252 | unsigned long round_jiffies(unsigned long j); |
