diff options
| author | Olav Haugan <ohaugan@codeaurora.org> | 2016-06-02 16:29:27 -0700 |
|---|---|---|
| committer | Olav Haugan <ohaugan@codeaurora.org> | 2016-09-24 11:00:00 -0700 |
| commit | ca2c4c65188206b0251a8d7576374847b45110e4 (patch) | |
| tree | 29a6f16af5e06ce8550dcae451708e56d4e50bc1 | |
| parent | 639c8ad52d59e7b9447b15c0e9a2ceaa533ad854 (diff) | |
sched/tick: Ensure timers does not get queued on isolated cpus
Timers should not be queued on isolated cpus. Instead try to find
other cpus to queue timer on.
Change-Id: I5d849dfd29aa5bb594454473768d7db1da258028
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
| -rw-r--r-- | include/linux/tick.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h index 5bf3ddade19c..1732697ea419 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -161,7 +161,15 @@ extern void __tick_nohz_task_switch(void); #else static inline int housekeeping_any_cpu(void) { - return smp_processor_id(); + cpumask_t available; + int cpu; + + cpumask_andnot(&available, cpu_online_mask, cpu_isolated_mask); + cpu = cpumask_any(&available); + if (cpu >= nr_cpu_ids) + cpu = smp_processor_id(); + + return cpu; } static inline bool tick_nohz_full_enabled(void) { return false; } static inline bool tick_nohz_full_cpu(int cpu) { return false; } @@ -187,7 +195,7 @@ static inline bool is_housekeeping_cpu(int cpu) if (tick_nohz_full_enabled()) return cpumask_test_cpu(cpu, housekeeping_mask); #endif - return true; + return !cpu_isolated(cpu); } static inline void housekeeping_affine(struct task_struct *t) |
