1. 03 1月, 2013 1 次提交
  2. 27 11月, 2012 1 次提交
    • J
      cpuidle: Measure idle state durations with monotonic clock · a474a515
      Julius Werner 提交于
      Many cpuidle drivers measure their time spent in an idle state by
      reading the wallclock time before and after idling and calculating the
      difference. This leads to erroneous results when the wallclock time gets
      updated by another processor in the meantime, adding that clock
      adjustment to the idle state's time counter.
      
      If the clock adjustment was negative, the result is even worse due to an
      erroneous cast from int to unsigned long long of the last_residency
      variable. The negative 32 bit integer will zero-extend and result in a
      forward time jump of roughly four billion milliseconds or 1.3 hours on
      the idle state residency counter.
      
      This patch changes all affected cpuidle drivers to either use the
      monotonic clock for their measurements or make use of the generic time
      measurement wrapper in cpuidle.c, which was already working correctly.
      Some superfluous CLIs/STIs in the ACPI code are removed (interrupts
      should always already be disabled before entering the idle function, and
      not get reenabled until the generic wrapper has performed its second
      measurement). It also removes the erroneous cast, making sure that
      negative residency values are applied correctly even though they should
      not appear anymore.
      Signed-off-by: NJulius Werner <jwerner@chromium.org>
      Reviewed-by: NPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Tested-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a474a515
  3. 27 9月, 2012 1 次提交
  4. 18 8月, 2012 1 次提交
  5. 06 7月, 2012 1 次提交
  6. 06 6月, 2012 1 次提交
  7. 22 3月, 2012 1 次提交
  8. 16 2月, 2012 1 次提交
  9. 14 2月, 2012 1 次提交
  10. 27 1月, 2012 1 次提交
  11. 20 1月, 2012 1 次提交
  12. 18 1月, 2012 4 次提交
  13. 17 1月, 2012 1 次提交
    • S
      intel_idle: fix API misuse · 39a74fde
      Shaohua Li 提交于
      smp_call_function() only lets all other CPUs execute a specific function,
      while we expect all CPUs do in intel_idle.  Without the fix, we could have
      one cpu which has auto_demotion enabled or has no broadcast timer setup.
      Usually we don't see impact because auto demotion just harms power and the
      intel_idle init is called in CPU 0, where boradcast timer delivers
      interrupt, but this still could be a problem.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      39a74fde
  14. 07 11月, 2011 3 次提交
  15. 01 11月, 2011 1 次提交
  16. 01 3月, 2011 1 次提交
  17. 18 2月, 2011 2 次提交
  18. 25 1月, 2011 1 次提交
  19. 13 1月, 2011 5 次提交
    • T
      cpuidle/x86/perf: fix power:cpu_idle double end events and throw cpu_idle... · f77cfe4e
      Thomas Renninger 提交于
      cpuidle/x86/perf: fix power:cpu_idle double end events and throw cpu_idle events from the cpuidle layer
      
      Currently intel_idle and acpi_idle driver show double cpu_idle "exit idle"
      events -> this patch fixes it and makes cpu_idle events throwing less complex.
      
      It also introduces cpu_idle events for all architectures which use
      the cpuidle subsystem, namely:
        - arch/arm/mach-at91/cpuidle.c
        - arch/arm/mach-davinci/cpuidle.c
        - arch/arm/mach-kirkwood/cpuidle.c
        - arch/arm/mach-omap2/cpuidle34xx.c
        - arch/drivers/acpi/processor_idle.c (for all cases, not only mwait)
        - arch/x86/kernel/process.c (did throw events before, but was a mess)
        - drivers/idle/intel_idle.c (did throw events before)
      
      Convention should be:
      Fire cpu_idle events inside the current pm_idle function (not somewhere
      down the the callee tree) to keep things easy.
      
      Current possible pm_idle functions in X86:
      c1e_idle, poll_idle, cpuidle_idle_call, mwait_idle, default_idle
      -> this is really easy is now.
      
      This affects userspace:
      The type field of the cpu_idle power event can now direclty get
      mapped to:
      /sys/devices/system/cpu/cpuX/cpuidle/stateX/{name,desc,usage,time,...}
      instead of throwing very CPU/mwait specific values.
      This change is not visible for the intel_idle driver.
      For the acpi_idle driver it should only be visible if the vendor
      misses out C-states in his BIOS.
      Another (perf timechart) patch reads out cpuidle info of cpu_idle
      events from:
      /sys/.../cpuidle/stateX/*, then the cpuidle events are mapped
      to the correct C-/cpuidle state again, even if e.g. vendors miss
      out C-states in their BIOS and for example only export C1 and C3.
      -> everything is fine.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      CC: Robert Schoene <robert.schoene@tu-dresden.de>
      CC: Jean Pihet <j-pihet@ti.com>
      CC: Arjan van de Ven <arjan@linux.intel.com>
      CC: Ingo Molnar <mingo@elte.hu>
      CC: Frederic Weisbecker <fweisbec@gmail.com>
      CC: linux-pm@lists.linux-foundation.org
      CC: linux-acpi@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      CC: linux-perf-users@vger.kernel.org
      CC: linux-omap@vger.kernel.org
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f77cfe4e
    • S
      intel_idle: open broadcast clock event · 2a2d31c8
      Shaohua Li 提交于
      Intel_idle driver uses CLOCK_EVT_NOTIFY_BROADCAST_ENTER
      CLOCK_EVT_NOTIFY_BROADCAST_EXIT
      for broadcast clock events. The _ENTER/_EXIT doesn't really open broadcast clock
      events, please see processor_idle.c for an example. In some situation, this will
      cause boot hang, because some CPUs enters idle but local APIC timer stalls.
      Reported-and-tested-by: NYan Zheng <zheng.z.yan@intel.com>
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      cc: stable@kernel.org
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2a2d31c8
    • L
      956d033f
    • T
      ACPI, intel_idle: Cleanup idle= internal variables · d1896049
      Thomas Renninger 提交于
      Having four variables for the same thing:
        idle_halt, idle_nomwait, force_mwait and boot_option_idle_overrides
      is rather confusing and unnecessary complex.
      
      if idle= boot param is passed, only set up one variable:
      boot_option_idle_overrides
      
      Introduces following functional changes/fixes:
        - intel_idle driver does not register if any idle=xy
          boot param is passed.
        - processor_idle.c will also not register a cpuidle driver
          and get active if idle=halt is passed.
          Before a cpuidle driver with one (C1, halt) state got registered
          Now the default_idle function will be used which finally uses
          the same idle call to enter sleep state (safe_halt()), but
          without registering a whole cpuidle driver.
      
      That means idle= param will always avoid cpuidle drivers to register
      with one exception (same behavior as before):
      idle=nomwait
      may still register acpi_idle cpuidle driver, but C1 will not use
      mwait, but hlt. This can be a workaround for IO based deeper sleep
      states where C1 mwait causes problems.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      cc: x86@kernel.org
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d1896049
    • L
      ddbd550d
  20. 04 1月, 2011 2 次提交
  21. 02 12月, 2010 1 次提交
  22. 27 10月, 2010 1 次提交
  23. 23 10月, 2010 1 次提交
  24. 16 10月, 2010 2 次提交
  25. 09 10月, 2010 1 次提交
  26. 01 10月, 2010 1 次提交
  27. 29 9月, 2010 2 次提交