1. 01 4月, 2009 5 次提交
    • G
      sched: Print sched_group::__cpu_power in sched_domain_debug · 46e0bb9c
      Gautham R Shenoy 提交于
      Impact: extend debug info /proc/sched_debug
      
      If the user changes the value of the sched_mc/smt_power_savings sysfs
      tunable, it'll trigger a rebuilding of the whole sched_domain tree,
      with the SD_POWERSAVINGS_BALANCE flag set at certain levels.
      
      As a result, there would be a change in the __cpu_power of sched_groups
      in the sched_domain hierarchy.
      
      Print the __cpu_power values for each sched_group in sched_domain_debug
      to help verify this change and correlate it with the change in the
      load-balancing behavior.
      Signed-off-by: NGautham R Shenoy <ego@in.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20090330045520.2869.24777.stgit@sofia.in.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      46e0bb9c
    • B
      cpuacct: add per-cgroup utime/stime statistics · ef12fefa
      Bharata B Rao 提交于
      Add per-cgroup cpuacct controller statistics like the system and user
      time consumed by the group of tasks.
      
      Changelog:
      
      v7
      - Changed the name of the statistic from utime to user and from stime to
        system so that in future we could easily add other statistics like irq,
        softirq, steal times etc easily.
      
      v6
      - Fixed a bug in the error path of cpuacct_create() (pointed by Li Zefan).
      
      v5
      - In cpuacct_stats_show(), use cputime64_to_clock_t() since we are
        operating on a 64bit variable here.
      
      v4
      - Remove comments in cpuacct_update_stats() which explained why rcu_read_lock()
        was needed (as per Peter Zijlstra's review comments).
      - Don't say that percpu_counter_read() is broken in Documentation/cpuacct.txt
        as per KAMEZAWA Hiroyuki's review comments.
      
      v3
      - Fix a small race in the cpuacct hierarchy walk.
      
      v2
      - stime and utime now exported in clock_t units instead of msecs.
      - Addressed the code review comments from Balbir and Li Zefan.
      - Moved to -tip tree.
      
      v1
      - Moved the stime/utime accounting to cpuacct controller.
      
      Earlier versions
      - http://lkml.org/lkml/2009/2/25/129Signed-off-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Signed-off-by: NBalaji Rao <balajirrao@gmail.com>
      Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
      Cc: Paul Menage <menage@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Reviewed-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Tested-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      LKML-Reference: <20090331043222.GA4093@in.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ef12fefa
    • H
      posixtimers, sched: Fix posix clock monotonicity · c5f8d995
      Hidetoshi Seto 提交于
      Impact: Regression fix (against clock_gettime() backwarding bug)
      
      This patch re-introduces a couple of functions, task_sched_runtime
      and thread_group_sched_runtime, which was once removed at the
      time of 2.6.28-rc1.
      
      These functions protect the sampling of thread/process clock with
      rq lock.  This rq lock is required not to update rq->clock during
      the sampling.
      
      i.e.
        The clock_gettime() may return
         ((accounted runtime before update) + (delta after update))
        that is less than what it should be.
      
      v2 -> v3:
      	- Rename static helper function __task_delta_exec()
      	  to do_task_delta_exec() since -tip tree already has
      	  a __task_delta_exec() of different version.
      
      v1 -> v2:
      	- Revises comments of function and patch description.
      	- Add note about accuracy of thread group's runtime.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: stable@kernel.org	[2.6.28.x][2.6.29.x]
      LKML-Reference: <49D1CC93.4080401@jp.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c5f8d995
    • R
      sched_rt: don't allocate cpumask in fastpath · 13b8bd0a
      Rusty Russell 提交于
      Impact: cleanup
      
      As pointed out by Steven Rostedt.  Since the arg in question is
      unused, we simply change cpupri_find() to accept NULL.
      Reported-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      LKML-Reference: <200903251501.22664.rusty@rustcorp.com.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      13b8bd0a
    • B
      cpuacct: make cpuacct hierarchy walk in cpuacct_charge() safe when rcupreempt is used -v2 · a18b83b7
      Bharata B Rao 提交于
      Impact: fix cgroups race under rcu-preempt
      
      cpuacct_charge() obtains task's ca and does a hierarchy walk upwards.
      This can race with the task's movement between cgroups. This race
      can cause an access to freed ca pointer in cpuacct_charge() or access
      to invalid cgroups pointer of the task. This will not happen with rcu or
      tree rcu as cpuacct_charge() is called with preemption disabled. However if
      rcupreempt is used, the race is seen. Thanks to Li Zefan for explaining this.
      
      Fix this race by explicitly protecting ca and the hierarchy walk with
      rcu_read_lock().
      
      Changes for v2:
      
       - Update patch descrition (as per Li Zefan's review comments).
      
       - Remove comments in cpuacct_charge() which explained why rcu_read_lock()
         was needed (as per Peter Zijlstra's review comments).
      Signed-off-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Paul Menage <menage@google.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Tested-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a18b83b7
  2. 31 3月, 2009 2 次提交
  3. 16 2月, 2009 1 次提交
    • I
      lockdep: annotate reclaim context (__GFP_NOFS), fix · 6700ec65
      Ingo Molnar 提交于
      Impact: fix build warning
      
      Fix:
      
        mm/vmscan.c: In function ‘kswapd’:
        mm/vmscan.c:1969: warning: ISO C90 forbids mixed declarations and code
      
      node_to_cpumask_ptr(cpumask, pgdat->node_id), has a side-effect: it
      defines the 'cpumask' local variable as well, so it has to go into
      the variable definition section.
      
      Sidenote: it might make sense to make this purpose of these macros
      more apparent, by naming them the standard way, such as:
      
        DEFINE_node_to_cpumask_ptr(cpumask, pgdat->node_id);
      
      (But that is outside the scope of this patch.)
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Nick Piggin <npiggin@suse.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6700ec65
  4. 15 2月, 2009 25 次提交
  5. 08 2月, 2009 1 次提交
  6. 07 2月, 2009 6 次提交