2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-30 23:28:55 -07:00
|
|
|
|
2006-07-14 00:24:41 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2011-07-26 16:09:06 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-25 01:48:55 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-12-06 20:33:20 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 08:14:31 +00:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 08:14:31 +00:00
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-14 19:44:52 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-08 17:42:22 +01:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-11-14 19:46:02 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-11-14 19:46:02 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-10 09:51:34 +00:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2007-04-25 19:08:35 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2015-01-16 22:09:00 +01:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2009-07-10 09:51:34 +00:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:51 -08:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2007-04-25 19:08:35 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-30 03:03:11 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2015-01-16 22:09:00 +01:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-30 03:03:11 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-30 03:03:11 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2009-07-10 09:51:34 +00:00
|
|
|
|
2006-07-30 03:03:11 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-30 03:03:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-30 03:03:11 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-30 03:03:10 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-07-30 03:03:10 -07:00
|
|
|
|
2006-09-30 23:28:55 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:41 -07:00
|
|
|
|
2007-07-15 23:40:48 -07:00
|
|
|
|
|
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
2006-07-14 00:24:41 -07:00
|
|
|
|
2006-09-30 23:28:58 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-10-28 10:38:54 -07:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-10-28 10:38:54 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-28 10:38:54 -07:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-10-28 10:38:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-10-28 10:38:54 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:41 -07:00
|
|
|
|
2007-07-15 23:40:48 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-07-14 00:24:41 -07:00
|
|
|
|
2006-10-28 10:38:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2007-10-19 23:10:43 +02:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-10-28 10:38:54 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-28 10:38:53 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-28 10:38:53 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2011-06-27 16:18:11 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2013-11-12 15:11:23 -08:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2011-08-03 16:21:04 -07:00
|
|
|
|
|
|
|
|
|
2013-11-12 15:11:23 -08:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2013-11-12 15:11:23 -08:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-03 16:21:04 -07:00
|
|
|
|
2011-08-03 16:21:05 -07:00
|
|
|
|
2011-08-03 16:21:04 -07:00
|
|
|
|
2011-06-27 16:18:11 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2011-06-27 16:18:11 -07:00
|
|
|
|
2011-08-03 16:21:04 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2011-08-03 16:21:04 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-12 15:11:23 -08:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-13 21:20:25 +10:30
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
taskstats: use better ifdef for alignment
Commit 4be2c95d ("taskstats: pad taskstats netlink response for aligment
issues on ia64") added a null field to align the taskstats structure but
the discussion centered around ia64. The issue exists on other platforms
with inefficient unaligned access and adding them piecemeal would be an
unmaintainable mess.
This patch uses Dave Miller's suggestion of using a combination of
CONFIG_64BIT && !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to determine
whether alignment is needed.
Note that this will cause breakage on those platforms with applications
like iotop which had hard-coded offsets into the packet to access the
taskstats structure.
The message seen on systems without the alignment fixes looks like: kernel
unaligned access to 0xe000023879dca9bc, ip=0xa000000100133d10
The addresses may vary but resolve to locations inside __delayacct_add_tsk.
iotop makes what I'd call unreasonable assumptions about the contents of a
netlink genetlink packet containing generic attributes. They're typed and
have headers that specify value lengths, so the client can (should)
identify and skip the ones the client doesn't understand.
The kernel, as of version 2.6.36, presented a packet like so:
+--------------------------------+
| genlmsghdr - 4 bytes |
+--------------------------------+
| NLA header - 4 bytes | /* Aggregate header */
+-+------------------------------+
| | NLA header - 4 bytes | /* PID header */
| +------------------------------+
| | pid/tgid - 4 bytes |
| +------------------------------+
| | NLA header - 4 bytes | /* stats header */
| + -----------------------------+ <- oops. aligned on 4 byte boundary
| | struct taskstats - 328 bytes |
+-+------------------------------+
The iotop code expects that the kernel will behave as it did then,
assuming that the packet format is set in stone. The format is set in
stone, but the packet offsets are not. There's nothing in the packet
format that guarantees that the packet will be sent in exactly the same
way. The attribute contents are set (or versioned) and the aggregate
contents are set but they can be anywhere in the packet.
The issue here isn't that an unaligned structure gets passed to userspace,
it's that the NLA infrastructure has something of a weakness: The 4 byte
attribute header may force the payload to be unaligned. The taskstats
structure is created at an unaligned location and then 64-bit values are
operated on inside the kernel, so the unaligned access warnings gets
spewed everywhere.
It's possible to use the unaligned access API to operate on the structure
in the kernel but it seems like a wasted effort to work around userspace
code that isn't following the packet format. Any new additions would also
need the be worked around. It's a maintenance nightmare.
The conclusion of the earlier discussion seemed to be "ok fine, if we have
to break it, don't break it on arches that don't have the problem." Dave
pointed out that the unaligned access problem doesn't only exist on ia64,
but also on other 64-bit arches that don't have efficient unaligned access
and it should be fixed there as well. The committed version of the patch
and this addition keep with the conclusion of that discussion not to break
it unnecessarily, which the pid padding and the packet padding fixes did
do. x86_64 and powerpc don't suffer this problem so they shouldn't suffer
the solution. Other 64-bit architectures do and will, though.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reported-by: David S. Miller <davem@davemloft.net>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Florian Mickler <florian@mickler.org>
Cc: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-12 17:00:48 -08:00
|
|
|
|
2010-12-21 17:24:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2006-12-06 20:36:53 -08:00
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2006-12-06 20:36:53 -08:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:53 -08:00
|
|
|
|
2010-12-21 17:24:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:53 -08:00
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
|
|
|
|
|
2010-12-21 17:24:30 -08:00
|
|
|
|
2013-11-12 15:11:22 -08:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2013-11-12 15:11:22 -08:00
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2013-11-12 15:11:22 -08:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2013-11-12 15:11:22 -08:00
|
|
|
|
2006-12-06 20:36:53 -08:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:53 -08:00
|
|
|
|
|
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-28 12:52:22 -04:00
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-28 12:52:22 -04:00
|
|
|
|
|
|
|
|
|
2007-11-14 17:00:37 -08:00
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
2007-11-14 17:00:37 -08:00
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
2007-11-14 17:00:37 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
2007-11-14 17:00:37 -08:00
|
|
|
|
|
|
|
|
|
2012-07-30 14:42:49 -07:00
|
|
|
|
2012-10-04 17:16:52 -07:00
|
|
|
|
2012-07-30 14:42:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-14 17:00:37 -08:00
|
|
|
|
|
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
2014-10-31 01:22:04 -04:00
|
|
|
|
2007-11-14 17:00:37 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
|
|
|
|
|
2009-07-10 09:51:34 +00:00
|
|
|
|
2007-11-14 17:00:37 -08:00
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
2012-08-28 12:52:22 -04:00
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
|
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2009-01-01 10:12:28 +10:30
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-21 17:24:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2010-12-21 17:24:30 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
2009-07-10 09:51:34 +00:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-21 17:24:30 -08:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
2010-10-27 15:34:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-12-06 20:36:51 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:51 -08:00
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-30 22:07:15 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-21 17:24:30 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-12-06 20:36:52 -08:00
|
|
|
|
2006-10-30 22:07:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-17 12:30:27 -05:00
|
|
|
|
2006-12-06 20:36:51 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-12-06 20:36:53 -08:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2012-02-07 17:56:49 -08:00
|
|
|
|
|
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
2006-12-06 20:36:54 -08:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-12-06 20:36:51 -08:00
|
|
|
|
2006-07-14 00:24:44 -07:00
|
|
|
|
2006-12-06 20:36:55 -08:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-14 17:14:46 +01:00
|
|
|
|
2013-11-14 17:14:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add cgroupstats
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: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 23:39:44 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
2007-05-06 14:49:57 -07:00
|
|
|
|
2006-07-14 00:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-19 15:19:31 +01:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-23 16:43:27 -07:00
|
|
|
|
2006-07-14 00:24:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|