diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2014-03-18 16:12:53 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2014-06-16 10:26:55 -0400 |
commit | fd2ac4f4a65a7f34b0bc6433fcca1192d7ba8b8e (patch) | |
tree | d94e0e43888defe2ca13797889cd011b6dc9774c | |
parent | 53c5fa16b4c843f1df91f7498e3c7bf95e0eaefa (diff) |
nohz: Use nohz own full kick on 2nd task enqueue
Now that we have a nohz full remote kick based on irq work, lets use
it to notify a CPU that it's exiting single task mode.
This unbloats a bit the scheduler IPI that the nohz code was abusing
for its cool "callable anywhere/anytime" properties.
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
-rw-r--r-- | kernel/sched/core.c | 5 | ||||
-rw-r--r-- | kernel/sched/sched.h | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index feb54965e16f..13f5857a15ba 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1574,9 +1574,7 @@ void scheduler_ipi(void) | |||
1574 | */ | 1574 | */ |
1575 | preempt_fold_need_resched(); | 1575 | preempt_fold_need_resched(); |
1576 | 1576 | ||
1577 | if (llist_empty(&this_rq()->wake_list) | 1577 | if (llist_empty(&this_rq()->wake_list) && !got_nohz_idle_kick()) |
1578 | && !tick_nohz_full_cpu(smp_processor_id()) | ||
1579 | && !got_nohz_idle_kick()) | ||
1580 | return; | 1578 | return; |
1581 | 1579 | ||
1582 | /* | 1580 | /* |
@@ -1593,7 +1591,6 @@ void scheduler_ipi(void) | |||
1593 | * somewhat pessimize the simple resched case. | 1591 | * somewhat pessimize the simple resched case. |
1594 | */ | 1592 | */ |
1595 | irq_enter(); | 1593 | irq_enter(); |
1596 | tick_nohz_full_check(); | ||
1597 | sched_ttwu_pending(); | 1594 | sched_ttwu_pending(); |
1598 | 1595 | ||
1599 | /* | 1596 | /* |
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 31cc02ebc54e..599a72aff5ea 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -1223,7 +1223,7 @@ static inline void add_nr_running(struct rq *rq, unsigned count) | |||
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 | /* Order rq->nr_running write against the IPI */ |
1225 | smp_wmb(); | 1225 | smp_wmb(); |
1226 | smp_send_reschedule(rq->cpu); | 1226 | tick_nohz_full_kick_cpu(rq->cpu); |
1227 | } | 1227 | } |
1228 | } | 1228 | } |
1229 | #endif | 1229 | #endif |