1. 01 Apr, 2009 3 commits
    • Bharata B Rao's avatar
      cpuacct: add per-cgroup utime/stime statistics · ef12fefa
      Bharata B Rao authored
      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: default avatarBharata B Rao <bharata@linux.vnet.ibm.com>
      Signed-off-by: default avatarBalaji 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: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarBalbir Singh <balbir@linux.vnet.ibm.com>
      Tested-by: default avatarBalbir Singh <balbir@linux.vnet.ibm.com>
      LKML-Reference: <20090331043222.GA4093@in.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ef12fefa
    • Hidetoshi Seto's avatar
      posixtimers, sched: Fix posix clock monotonicity · c5f8d995
      Hidetoshi Seto authored
      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: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Acked-by: default avatarPeter 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: default avatarIngo Molnar <mingo@elte.hu>
      c5f8d995
    • Rusty Russell's avatar
      sched_rt: don't allocate cpumask in fastpath · 13b8bd0a
      Rusty Russell authored
      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: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      LKML-Reference: <200903251501.22664.rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      13b8bd0a
  2. 31 Mar, 2009 1 commit
  3. 30 Mar, 2009 2 commits
  4. 15 Feb, 2009 1 commit
    • Ingo Molnar's avatar
      lockdep: annotate reclaim context (__GFP_NOFS), fix · 6700ec65
      Ingo Molnar authored
      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: default avatarIngo Molnar <mingo@elte.hu>
      6700ec65
  5. 14 Feb, 2009 25 commits
  6. 07 Feb, 2009 7 commits
  7. 06 Feb, 2009 1 commit
    • Dave Kleikamp's avatar
      vfs: Don't call attach_nobh_buffers() with an empty list · d4cf109f
      Dave Kleikamp authored
      This is a modification of a patch by Bill Pemberton <wfp5p@virginia.edu>
      
      nobh_write_end() could call attach_nobh_buffers() with head == NULL.
      This would result in a trap when attach_nobh_buffers() attempted to
      access bh->b_this_page.
      
      This can be illustrated by running the writev01 testcase from LTP on jfs.
      
      This error was introduced by commit 5b41e74a "vfs: fix data leak in
      nobh_write_end()".  That patch did not take into account that if
      PageMappedToDisk() is true upon entry to nobh_write_begin(), then no
      buffers will be allocated for the page.  In that case, we won't have to
      worry about a failed write leaving unitialized data in the page.
      
      Of course, head != NULL implies !page_has_buffers(page), so no need to
      test both.
      Signed-off-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Dmitri Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4cf109f