1. 26 7月, 2008 1 次提交
  2. 24 5月, 2008 1 次提交
  3. 30 4月, 2008 1 次提交
    • P
      Use find_task_by_vpid in taskstats · cb41d6d0
      Pavel Emelyanov 提交于
      The pid to lookup a task by is passed inside taskstats code via genetlink
      message.
      
      Since netlink packets are now processed in the context of the sending task,
      this is correct to lookup the task with find_task_by_vpid() here.
      
      Besides, I fix the call to fill_pid() from taskstats_exit(), since the
      tsk->pid is not required in fill_pid() in this case, and the pid field on
      task_struct is going to be deprecated as well.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Cc: Jonathan Lim <jlim@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cb41d6d0
  4. 15 11月, 2007 1 次提交
  5. 20 10月, 2007 2 次提交
    • R
      Fix misspellings of "system", "controller", "interrupt" and "necessary". · 3a4fa0a2
      Robert P. J. Day 提交于
      Fix the various misspellings of "system", controller", "interrupt" and
      "[un]necessary".
      Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      3a4fa0a2
    • B
      Add cgroupstats · 846c7bb0
      Balbir Singh 提交于
      This patch is inspired by the discussion at
      http://lkml.org/lkml/2007/4/11/187 and implements per cgroup statistics
      as suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263.  The
      patch is on top of 2.6.21-mm1 with Paul's cgroups v9 patches (forward
      ported)
      
      This patch implements per cgroup statistics infrastructure and re-uses
      code from the taskstats interface.  A new set of cgroup operations are
      registered with commands and attributes.  It should be very easy to
      *extend* per cgroup statistics, by adding members to the cgroupstats
      structure.
      
      The current model for cgroupstats is a pull, a push model (to post
      statistics on interesting events), should be very easy to add.  Currently
      user space requests for statistics by passing the cgroup file
      descriptor.  Statistics about the state of all the tasks in the cgroup
      is returned to user space.
      
      TODO's/NOTE:
      
      This patch provides an infrastructure for implementing cgroup statistics.
      Based on the needs of each controller, we can incrementally add more statistics,
      event based support for notification of statistics, accumulation of taskstats
      into cgroup statistics in the future.
      
      Sample output
      
      # ./cgroupstats -C /cgroup/a
      sleeping 2, blocked 0, running 1, stopped 0, uninterruptible 0
      
      # ./cgroupstats -C /cgroup/
      sleeping 154, blocked 0, running 0, stopped 0, uninterruptible 0
      
      If the approach looks good, I'll enhance and post the user space utility for
      the same
      
      Feedback, comments, test results are always welcome!
      
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Cc: Paul Menage <menage@google.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      846c7bb0
  6. 17 10月, 2007 1 次提交
  7. 17 7月, 2007 1 次提交
    • M
      taskstats: add context-switch counters · b663a79c
      Maxim Uvarov 提交于
      Make available to the user the following task and process performance
      statistics:
      
      	* Involuntary Context Switches (task_struct->nivcsw)
      	* Voluntary Context Switches (task_struct->nvcsw)
      
      Statistics information is available from:
      	1. taskstats interface (Documentation/accounting/)
      	2. /proc/PID/status (task only).
      
      This data is useful for detecting hyperactivity patterns between processes.
      
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: NMaxim Uvarov <muvarov@ru.mvista.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Cc: Jonathan Lim <jlim@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b663a79c
  8. 08 5月, 2007 1 次提交
  9. 26 4月, 2007 1 次提交
  10. 08 12月, 2006 8 次提交
  11. 03 12月, 2006 3 次提交
  12. 01 11月, 2006 1 次提交
  13. 30 10月, 2006 2 次提交
  14. 29 10月, 2006 4 次提交
  15. 01 10月, 2006 3 次提交
  16. 23 9月, 2006 1 次提交
  17. 01 8月, 2006 2 次提交
  18. 15 7月, 2006 5 次提交
    • S
      [PATCH] Remove down_write() from taskstats code invoked on the exit() path · bb129994
      Shailabh Nagar 提交于
      In send_cpu_listeners(), which is called on the exit path, a down_write()
      was protecting operations like skb_clone() and genlmsg_unicast() that do
      GFP_KERNEL allocations.  If the oom-killer decides to kill tasks to satisfy
      the allocations,the exit of those tasks could block on the same semphore.
      
      The down_write() was only needed to allow removal of invalid listeners from
      the listener list.  The patch converts the down_write to a down_read and
      defers the removal to a separate critical region.  This ensures that even
      if the oom-killer is called, no other task's exit is blocked as it can
      still acquire another down_read.
      
      Thanks to Andrew Morton & Herbert Xu for pointing out the oom related
      pitfalls, and to Chandra Seetharaman for suggesting this fix instead of
      using something more complex like RCU.
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: NShailabh Nagar <nagar@watson.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bb129994
    • S
      [PATCH] per-task delay accounting taskstats interface: control exit data through cpumasks · f9fd8914
      Shailabh Nagar 提交于
      On systems with a large number of cpus, with even a modest rate of tasks
      exiting per cpu, the volume of taskstats data sent on thread exit can
      overflow a userspace listener's buffers.
      
      One approach to avoiding overflow is to allow listeners to get data for a
      limited and specific set of cpus.  By scaling the number of listeners
      and/or the cpus they monitor, userspace can handle the statistical data
      overload more gracefully.
      
      In this patch, each listener registers to listen to a specific set of cpus
      by specifying a cpumask.  The interest is recorded per-cpu.  When a task
      exits on a cpu, its taskstats data is unicast to each listener interested
      in that cpu.
      
      Thanks to Andrew Morton for pointing out the various scalability and
      general concerns of previous attempts and for suggesting this design.
      
      [akpm@osdl.org: build fix]
      Signed-off-by: NShailabh Nagar <nagar@watson.ibm.com>
      Signed-off-by: NBalbir Singh <balbir@in.ibm.com>
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f9fd8914
    • S
      [PATCH] delay accounting taskstats interface send tgid once · ad4ecbcb
      Shailabh Nagar 提交于
      Send per-tgid data only once during exit of a thread group instead of once
      with each member thread exit.
      
      Currently, when a thread exits, besides its per-tid data, the per-tgid data
      of its thread group is also sent out, if its thread group is non-empty.
      The per-tgid data sent consists of the sum of per-tid stats for all
      *remaining* threads of the thread group.
      
      This patch modifies this sending in two ways:
      
      - the per-tgid data is sent only when the last thread of a thread group
        exits.  This cuts down heavily on the overhead of sending/receiving
        per-tgid data, especially when other exploiters of the taskstats
        interface aren't interested in per-tgid stats
      
      - the semantics of the per-tgid data sent are changed.  Instead of being
        the sum of per-tid data for remaining threads, the value now sent is the
        true total accumalated statistics for all threads that are/were part of
        the thread group.
      
      The patch also addresses a minor issue where failure of one accounting
      subsystem to fill in the taskstats structure was causing the send of
      taskstats to not be sent at all.
      
      The patch has been tested for stability and run cerberus for over 4 hours
      on an SMP.
      
      [akpm@osdl.org: bugfixes]
      Signed-off-by: NShailabh Nagar <nagar@watson.ibm.com>
      Signed-off-by: NBalbir Singh <balbir@in.ibm.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ad4ecbcb
    • S
      [PATCH] per-task-delay-accounting: delay accounting usage of taskstats interface · 6f44993f
      Shailabh Nagar 提交于
      Usage of taskstats interface by delay accounting.
      Signed-off-by: NShailabh Nagar <nagar@us.ibm.com>
      Signed-off-by: NBalbir Singh <balbir@in.ibm.com>
      Cc: Jes Sorensen <jes@sgi.com>
      Cc: Peter Chubb <peterc@gelato.unsw.edu.au>
      Cc: Erich Focht <efocht@ess.nec.de>
      Cc: Levent Serinol <lserinol@gmail.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6f44993f
    • S
      [PATCH] per-task-delay-accounting: taskstats interface · c757249a
      Shailabh Nagar 提交于
      Create a "taskstats" interface based on generic netlink (NETLINK_GENERIC
      family), for getting statistics of tasks and thread groups during their
      lifetime and when they exit.  The interface is intended for use by multiple
      accounting packages though it is being created in the context of delay
      accounting.
      
      This patch creates the interface without populating the fields of the data
      that is sent to the user in response to a command or upon the exit of a task.
      Each accounting package interested in using taskstats has to provide an
      additional patch to add its stats to the common structure.
      
      [akpm@osdl.org: cleanups, Kconfig fix]
      Signed-off-by: NShailabh Nagar <nagar@us.ibm.com>
      Signed-off-by: NBalbir Singh <balbir@in.ibm.com>
      Cc: Jes Sorensen <jes@sgi.com>
      Cc: Peter Chubb <peterc@gelato.unsw.edu.au>
      Cc: Erich Focht <efocht@ess.nec.de>
      Cc: Levent Serinol <lserinol@gmail.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c757249a