diff options
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/sched.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 889904dd6d77..eb363aa5d83c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/mutex.h> | 5 | #include <linux/mutex.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/stop_machine.h> | 7 | #include <linux/stop_machine.h> |
8 | #include <linux/tick.h> | ||
8 | 9 | ||
9 | #include "cpupri.h" | 10 | #include "cpupri.h" |
10 | 11 | ||
@@ -1106,6 +1107,16 @@ static inline u64 steal_ticks(u64 steal) | |||
1106 | static inline void inc_nr_running(struct rq *rq) | 1107 | static inline void inc_nr_running(struct rq *rq) |
1107 | { | 1108 | { |
1108 | rq->nr_running++; | 1109 | rq->nr_running++; |
1110 | |||
1111 | #ifdef CONFIG_NO_HZ_FULL | ||
1112 | if (rq->nr_running == 2) { | ||
1113 | if (tick_nohz_full_cpu(rq->cpu)) { | ||
1114 | /* Order rq->nr_running write against the IPI */ | ||
1115 | smp_wmb(); | ||
1116 | smp_send_reschedule(rq->cpu); | ||
1117 | } | ||
1118 | } | ||
1119 | #endif | ||
1109 | } | 1120 | } |
1110 | 1121 | ||
1111 | static inline void dec_nr_running(struct rq *rq) | 1122 | static inline void dec_nr_running(struct rq *rq) |