nohz: Use nohz own full kick on 2nd task enqueue
authorFrederic Weisbecker <fweisbec@gmail.com>
Tue, 18 Mar 2014 20:12:53 +0000 (21:12 +0100)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 16 Jun 2014 14:26:55 +0000 (16:26 +0200)
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>
kernel/sched/core.c
kernel/sched/sched.h

index feb54965e16f9c96e873efac8b291717c3b92d1d..13f5857a15bae964fd03a7db0f70ff6eb3ae3d2f 100644 (file)
@@ -1574,9 +1574,7 @@ void scheduler_ipi(void)
         */
        preempt_fold_need_resched();
 
-       if (llist_empty(&this_rq()->wake_list)
-                       && !tick_nohz_full_cpu(smp_processor_id())
-                       && !got_nohz_idle_kick())
+       if (llist_empty(&this_rq()->wake_list) && !got_nohz_idle_kick())
                return;
 
        /*
@@ -1593,7 +1591,6 @@ void scheduler_ipi(void)
         * somewhat pessimize the simple resched case.
         */
        irq_enter();
-       tick_nohz_full_check();
        sched_ttwu_pending();
 
        /*
index 31cc02ebc54ed82f5bf3f62fae879a1c0343a97d..599a72aff5ea2186e53963ad3c95e85ba400e1a9 100644 (file)
@@ -1223,7 +1223,7 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
                if (tick_nohz_full_cpu(rq->cpu)) {
                        /* Order rq->nr_running write against the IPI */
                        smp_wmb();
-                       smp_send_reschedule(rq->cpu);
+                       tick_nohz_full_kick_cpu(rq->cpu);
                }
        }
 #endif