1. 08 9月, 2011 1 次提交
    • M
      nohz: Fix update_ts_time_stat idle accounting · 6beea0cd
      Michal Hocko 提交于
      update_ts_time_stat currently updates idle time even if we are in
      iowait loop at the moment. The only real users of the idle counter
      (via get_cpu_idle_time_us) are CPU governors and they expect to get
      cumulative time for both idle and iowait times.
      The value (idle_sleeptime) is also printed to userspace by print_cpu
      but it prints both idle and iowait times so the idle part is misleading.
      
      Let's clean this up and fix update_ts_time_stat to account both counters
      properly and update consumers of idle to consider iowait time as well.
      If we do this we might use get_cpu_{idle,iowait}_time_us from other
      contexts as well and we will get expected values.
      Signed-off-by: NMichal Hocko <mhocko@suse.cz>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Link: http://lkml.kernel.org/r/e9c909c221a8da402c4da07e4cd968c3218f8eb1.1314172057.git.mhocko@suse.czSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      6beea0cd
  2. 17 3月, 2011 4 次提交
  3. 26 1月, 2011 1 次提交
  4. 10 4月, 2010 1 次提交
  5. 01 4月, 2010 1 次提交
  6. 25 11月, 2009 1 次提交
  7. 18 11月, 2009 1 次提交
  8. 05 8月, 2009 1 次提交
  9. 07 7月, 2009 2 次提交
  10. 24 6月, 2009 1 次提交
    • T
      percpu: clean up percpu variable definitions · 245b2e70
      Tejun Heo 提交于
      Percpu variable definition is about to be updated such that all percpu
      symbols including the static ones must be unique.  Update percpu
      variable definitions accordingly.
      
      * as,cfq: rename ioc_count uniquely
      
      * cpufreq: rename cpu_dbs_info uniquely
      
      * xen: move nesting_count out of xen_evtchn_do_upcall() and rename it
      
      * mm: move ratelimits out of balance_dirty_pages_ratelimited_nr() and
        rename it
      
      * ipv4,6: rename cookie_scratch uniquely
      
      * x86 perf_counter: rename prev_left to pmc_prev_left, irq_entry to
        pmc_irq_entry and nmi_entry to pmc_nmi_entry
      
      * perf_counter: rename disable_count to perf_disable_count
      
      * ftrace: rename test_event_disable to ftrace_test_event_disable
      
      * kmemleak: rename test_pointer to kmemleak_test_pointer
      
      * mce: rename next_interval to mce_next_interval
      
      [ Impact: percpu usage cleanups, no duplicate static percpu var names ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      245b2e70
  11. 15 6月, 2009 2 次提交
  12. 27 5月, 2009 1 次提交
    • M
      [CPUFREQ] fix timer teardown in conservative governor · b253d2b2
      Mathieu Desnoyers 提交于
      * Rafael J. Wysocki (rjw@sisk.pl) wrote:
      > This message has been generated automatically as a part of a report
      > of regressions introduced between 2.6.28 and 2.6.29.
      >
      > The following bug entry is on the current list of known regressions
      > introduced between 2.6.28 and 2.6.29.  Please verify if it still should
      > be listed and let me know (either way).
      >
      >
      > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13186
      > Subject		: cpufreq timer teardown problem
      > Submitter	: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      > Date		: 2009-04-23 14:00 (24 days old)
      > References	: http://marc.info/?l=linux-kernel&m=124049523515036&w=4
      > Handled-By	: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      > Patch		: http://patchwork.kernel.org/patch/19754/
      > 		  http://patchwork.kernel.org/patch/19753/
      >
      
      (re-send with updated changelog)
      
      cpufreq fix timer teardown in conservative governor
      
      The problem is that dbs_timer_exit() uses cancel_delayed_work() when it should
      use cancel_delayed_work_sync(). cancel_delayed_work() does not wait for the
      workqueue handler to exit.
      
      The ondemand governor does not seem to be affected because the
      "if (!dbs_info->enable)" check at the beginning of the workqueue handler returns
      immediately without rescheduling the work. The conservative governor in
      2.6.30-rc has the same check as the ondemand governor, which makes things
      usually run smoothly. However, if the governor is quickly stopped and then
      started, this could lead to the following race :
      
      dbs_enable could be reenabled and multiple do_dbs_timer handlers would run.
      This is why a synchronized teardown is required.
      
      Depends on patch
      cpufreq: remove rwsem lock from CPUFREQ_GOV_STOP call
      
      The following patch applies to 2.6.30-rc2. Stable kernels have a similar
      issue which should also be fixed, but the code changed between 2.6.29
      and 2.6.30, so this patch only applies to 2.6.30-rc.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: gregkh@suse.de
      CC: stable@kernel.org
      CC: cpufreq@vger.kernel.org
      CC: Ingo Molnar <mingo@elte.hu>
      CC: rjw@sisk.pl
      CC: Ben Slusky <sluskyb@paranoiacs.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      b253d2b2
  13. 25 2月, 2009 7 次提交
  14. 06 1月, 2009 1 次提交
  15. 10 10月, 2008 2 次提交
    • S
      [CPUFREQ] Don't export governors for default governor · c4d14bc0
      Sven Wegener 提交于
      We don't need to export the governors for use as the default governor,
      because the default governor will be built-in anyway and we can access
      the symbol directly.
      
      This also fixes the following sparse warnings:
      
      drivers/cpufreq/cpufreq_conservative.c:578:25: warning: symbol 'cpufreq_gov_conservative' was not declared. Should it be static?
      drivers/cpufreq/cpufreq_ondemand.c:582:25: warning: symbol 'cpufreq_gov_ondemand' was not declared. Should it be static?
      drivers/cpufreq/cpufreq_performance.c:39:25: warning: symbol 'cpufreq_gov_performance' was not declared. Should it be static?
      drivers/cpufreq/cpufreq_powersave.c:38:25: warning: symbol 'cpufreq_gov_powersave' was not declared. Should it be static?
      drivers/cpufreq/cpufreq_userspace.c:190:25: warning: symbol 'cpufreq_gov_userspace' was not declared. Should it be static?
      Signed-off-by: NSven Wegener <sven.wegener@stealer.net>
      Signed-off-by: NDave Jones <davej@redhat.com>
      c4d14bc0
    • B
      [CPUFREQ] use deferrable delayed work init in conservative governor · 8217e4f4
      Ben Slusky 提交于
      Venki Pallipadi made a similar change to the ondemand governor a while
      back (in commit 28287033). It seems to
      work just as well in the conservative governor, leading to fewer wakeups
      as reported by powertop.
      Signed-off-by: NBen Slusky <sluskyb@paranoiacs.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      8217e4f4
  16. 09 8月, 2008 1 次提交
  17. 24 5月, 2008 1 次提交
  18. 18 1月, 2008 1 次提交
    • J
      cpufreq: Initialise default governor before use · 6915719b
      Johannes Weiner 提交于
      When the cpufreq driver starts up at boot time, it calls into the default
      governor which might not be initialised yet.  This hurts when the
      governor's worker function relies on memory that is not yet set up by its
      init function.
      
      This migrates all governors from module_init() to fs_initcall() when being
      the default, as was already done in cpufreq_performance when it was the
      only possible choice.  The performance governor is always initialized early
      because it might be used as fallback even when not being the default.
      
      Fixes at least one actual oops where ondemand is the default governor and
      cpufreq_governor_dbs() uses the uninitialised kondemand_wq work-queue
      during boot-time.
      Signed-off-by: NJohannes Weiner <hannes@saeurebad.de>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6915719b
  19. 23 10月, 2007 2 次提交
  20. 05 10月, 2007 1 次提交
    • T
      [CPUFREQ] allow ondemand and conservative cpufreq governors to be used as default · 1c256245
      Thomas Renninger 提交于
      Depending on the transition latency of the HW for cpufreq switches, the
      ondemand or conservative governor cannot be used with certain cpufreq
      drivers.  Still the ondemand should be the default governor on a wide range
      of systems.  This patch allows this and lets the governor fallback to the
      performance governor at cpufreq driver load time, if the driver does not
      support fast enough frequency switching.
      
      Main benefit is that on e.g.  installation or other systems without
      userspace support a working dynamic cpufreq support can be achieved on most
      systems by simply loading the cpufreq driver.  This is especially essential
      for recent x86(_64) laptop hardware which may rely on working dynamic
      cpufreq OS support.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Bryan Wu <bryan.wu@analog.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      1c256245
  21. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  22. 11 2月, 2007 1 次提交
  23. 22 11月, 2006 1 次提交
  24. 07 11月, 2006 1 次提交
  25. 21 10月, 2006 1 次提交
  26. 26 7月, 2006 1 次提交
    • A
      [PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare · 153d7f3f
      Arjan van de Ven 提交于
      The patch below moves the cpu hotplugging higher up in the cpufreq
      layering; this is needed to avoid recursive taking of the cpu hotplug
      lock and to otherwise detangle the mess.
      
      The new rules are:
      1. you must do lock_cpu_hotplug() around the following functions:
         __cpufreq_driver_target
         __cpufreq_governor (for CPUFREQ_GOV_LIMITS operation only)
         __cpufreq_set_policy
      2. governer methods (.governer) must NOT take the lock_cpu_hotplug()
         lock in any way; they are called with the lock taken already
      3. if your governer spawns a thread that does things, like calling
         __cpufreq_driver_target, your thread must honor rule #1.
      4. the policy lock and other cpufreq internal locks nest within
         the lock_cpu_hotplug() lock.
      
      I'm not entirely happy about how the __cpufreq_governor rule ended up
      (conditional locking rule depending on the argument) but basically all
      callers pass this as a constant so it's not too horrible.
      
      The patch also removes the cpufreq_governor() function since during the
      locking audit it turned out to be entirely unused (so no need to fix it)
      
      The patch works on my testbox, but it could use more testing
      (otoh... it can't be much worse than the current code)
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      153d7f3f
  27. 23 6月, 2006 1 次提交
    • A
      [PATCH] cpufreq build fix · 138a0128
      Andrew Morton 提交于
      drivers/cpufreq/cpufreq_ondemand.c: In function 'do_dbs_timer':
      drivers/cpufreq/cpufreq_ondemand.c:374: warning: implicit declaration of function 'lock_cpu_hotplug'
      drivers/cpufreq/cpufreq_ondemand.c:381: warning: implicit declaration of function 'unlock_cpu_hotplug'
      drivers/cpufreq/cpufreq_conservative.c: In function 'do_dbs_timer':
      drivers/cpufreq/cpufreq_conservative.c:425: warning: implicit declaration of function 'lock_cpu_hotplug'
      drivers/cpufreq/cpufreq_conservative.c:432: warning: implicit declaration of function 'unlock_cpu_hotplug'
      
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      138a0128