lkml.org 
[lkml]   [2012]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 19/27] nohz: Move nohz load balancer selection into idle logic
    Date
    [ ** BUGGY PATCH: I need to put more thinking into this ** ]

    We want the nohz load balancer to be an idle CPU, thus
    move that selection to strict dyntick idle logic.

    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Alessio Igor Bogani <abogani@kernel.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Chris Metcalf <cmetcalf@tilera.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Geoff Levand <geoff@infradead.org>
    Cc: Gilad Ben Yossef <gilad@benyossef.com>
    Cc: Hakan Akkan <hakanakkan@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    [ added movement of calc_load_exit_idle() ]
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    ---
    kernel/time/tick-sched.c | 11 ++++++-----
    1 files changed, 6 insertions(+), 5 deletions(-)

    diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
    index ab3aa14..164db94 100644
    --- a/kernel/time/tick-sched.c
    +++ b/kernel/time/tick-sched.c
    @@ -444,9 +444,6 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
    * the scheduler tick in nohz_restart_sched_tick.
    */
    if (!ts->tick_stopped) {
    - nohz_balance_enter_idle(cpu);
    - calc_load_enter_idle();
    -
    ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
    ts->tick_stopped = 1;
    }
    @@ -542,8 +539,11 @@ static void __tick_nohz_idle_enter(struct tick_sched *ts)
    ts->idle_expires = expires;
    }

    - if (!was_stopped && ts->tick_stopped)
    + if (!was_stopped && ts->tick_stopped) {
    ts->idle_jiffies = ts->last_jiffies;
    + nohz_balance_enter_idle(cpu);
    + calc_load_enter_idle();
    + }
    }
    }

    @@ -651,7 +651,6 @@ static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
    tick_do_update_jiffies64(now);
    update_cpu_load_nohz();

    - calc_load_exit_idle();
    touch_softlockup_watchdog();
    /*
    * Cancel the scheduled timer and restore the tick
    @@ -711,6 +710,8 @@ void tick_nohz_idle_exit(void)
    tick_nohz_stop_idle(cpu, now);

    if (ts->tick_stopped) {
    + nohz_balance_enter_idle(cpu);
    + calc_load_exit_idle();
    tick_nohz_restart_sched_tick(ts, now);
    tick_nohz_account_idle_ticks(ts);
    }
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2012-12-29 18:41    [W:5.162 / U:0.244 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site