]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'pm-cpuidle'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 20 Jan 2016 23:43:21 +0000 (00:43 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 20 Jan 2016 23:43:21 +0000 (00:43 +0100)
* pm-cpuidle:
  cpuidle: menu: Avoid pointless checks in menu_select()
  sched / idle: Drop default_idle_call() fallback from call_cpuidle()
  cpuidle: Don't enable all governors by default
  cpuidle: Default to ladder governor on ticking systems
  time: nohz: Expose tick_nohz_enabled
  cpuidle: menu: Fix menu_select() for CPUIDLE_DRIVER_STATE_START == 0

1  2 
kernel/time/tick-sched.c

diff --combined kernel/time/tick-sched.c
index 9cc20af58c76300111f23a007b9fd5ad0c8bd60b,edfea95c39db13a50714d75490855684e4c70fb6..9d7a053545f5aca7a324f3530ee52ca9dac413f8
@@@ -143,7 -143,7 +143,7 @@@ static void tick_sched_handle(struct ti
         * when we go busy again does not account too much ticks.
         */
        if (ts->tick_stopped) {
 -              touch_softlockup_watchdog();
 +              touch_softlockup_watchdog_sched();
                if (is_idle_task(current))
                        ts->idle_jiffies++;
        }
@@@ -387,7 -387,7 +387,7 @@@ void __init tick_nohz_init(void
  /*
   * NO HZ enabled ?
   */
static int tick_nohz_enabled __read_mostly  = 1;
int tick_nohz_enabled __read_mostly = 1;
  unsigned long tick_nohz_active  __read_mostly;
  /*
   * Enable / Disable tickless mode
@@@ -430,7 -430,7 +430,7 @@@ static void tick_nohz_update_jiffies(kt
        tick_do_update_jiffies64(now);
        local_irq_restore(flags);
  
 -      touch_softlockup_watchdog();
 +      touch_softlockup_watchdog_sched();
  }
  
  /*
@@@ -603,31 -603,15 +603,31 @@@ static ktime_t tick_nohz_stop_sched_tic
  
        /*
         * If the tick is due in the next period, keep it ticking or
 -       * restart it proper.
 +       * force prod the timer.
         */
        delta = next_tick - basemono;
        if (delta <= (u64)TICK_NSEC) {
                tick.tv64 = 0;
 +              /*
 +               * We've not stopped the tick yet, and there's a timer in the
 +               * next period, so no point in stopping it either, bail.
 +               */
                if (!ts->tick_stopped)
                        goto out;
 +
 +              /*
 +               * If, OTOH, we did stop it, but there's a pending (expired)
 +               * timer reprogram the timer hardware to fire now.
 +               *
 +               * We will not restart the tick proper, just prod the timer
 +               * hardware into firing an interrupt to process the pending
 +               * timers. Just like tick_irq_exit() will not restart the tick
 +               * for 'normal' interrupts.
 +               *
 +               * Only once we exit the idle loop will we re-enable the tick,
 +               * see tick_nohz_idle_exit().
 +               */
                if (delta == 0) {
 -                      /* Tick is stopped, but required now. Enforce it */
                        tick_nohz_restart(ts, now);
                        goto out;
                }
@@@ -710,14 -694,14 +710,14 @@@ out
        return tick;
  }
  
 -static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
 +static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now, int active)
  {
        /* Update jiffies first */
        tick_do_update_jiffies64(now);
 -      update_cpu_load_nohz();
 +      update_cpu_load_nohz(active);
  
        calc_load_exit_idle();
 -      touch_softlockup_watchdog();
 +      touch_softlockup_watchdog_sched();
        /*
         * Cancel the scheduled timer and restore the tick
         */
@@@ -741,7 -725,7 +741,7 @@@ static void tick_nohz_full_update_tick(
        if (can_stop_full_tick())
                tick_nohz_stop_sched_tick(ts, ktime_get(), cpu);
        else if (ts->tick_stopped)
 -              tick_nohz_restart_sched_tick(ts, ktime_get());
 +              tick_nohz_restart_sched_tick(ts, ktime_get(), 1);
  #endif
  }
  
@@@ -891,7 -875,7 +891,7 @@@ static void tick_nohz_account_idle_tick
  #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
        unsigned long ticks;
  
 -      if (vtime_accounting_enabled())
 +      if (vtime_accounting_cpu_enabled())
                return;
        /*
         * We stopped the tick in idle. Update process times would miss the
@@@ -932,7 -916,7 +932,7 @@@ void tick_nohz_idle_exit(void
                tick_nohz_stop_idle(ts, now);
  
        if (ts->tick_stopped) {
 -              tick_nohz_restart_sched_tick(ts, now);
 +              tick_nohz_restart_sched_tick(ts, now, 0);
                tick_nohz_account_idle_ticks(ts);
        }