aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 31cc02ebc54e..eb8567610295 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1221,9 +1221,15 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
1221#ifdef CONFIG_NO_HZ_FULL 1221#ifdef CONFIG_NO_HZ_FULL
1222 if (prev_nr < 2 && rq->nr_running >= 2) { 1222 if (prev_nr < 2 && rq->nr_running >= 2) {
1223 if (tick_nohz_full_cpu(rq->cpu)) { 1223 if (tick_nohz_full_cpu(rq->cpu)) {
1224 /* Order rq->nr_running write against the IPI */ 1224 /*
1225 smp_wmb(); 1225 * Tick is needed if more than one task runs on a CPU.
1226 smp_send_reschedule(rq->cpu); 1226 * Send the target an IPI to kick it out of nohz mode.
1227 *
1228 * We assume that IPI implies full memory barrier and the
1229 * new value of rq->nr_running is visible on reception
1230 * from the target.
1231 */
1232 tick_nohz_full_kick_cpu(rq->cpu);
1227 } 1233 }
1228 } 1234 }
1229#endif 1235#endif