aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJay Lan <jlan@engr.sgi.com>2006-10-01 02:28:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:29 -0400
commit9acc1853519a0473620d424105f9d49ea5b4e62e (patch)
treefd4d03bf82ea604e71f8e805e557023226c2dd42 /include/linux
parentf3cef7a99469afc159fec3a61b42dc7ca5b6824f (diff)
[PATCH] csa: Extended system accounting over taskstats
Add extended system accounting handling over taskstats interface. A CONFIG_TASK_XACCT flag is created to enable the extended accounting code. Signed-off-by: Jay Lan <jlan@sgi.com> Cc: Shailabh Nagar <nagar@watson.ibm.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Chris Sturtivant <csturtiv@sgi.com> Cc: Tony Ernst <tee@sgi.com> Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/taskstats.h11
-rw-r--r--include/linux/tsacct_kern.h9
2 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h
index af93a63a5092..3d2c304886b0 100644
--- a/include/linux/taskstats.h
+++ b/include/linux/taskstats.h
@@ -107,6 +107,17 @@ struct taskstats {
107 __u64 ac_minflt; /* Minor Page Fault */ 107 __u64 ac_minflt; /* Minor Page Fault */
108 __u64 ac_majflt; /* Major Page Fault */ 108 __u64 ac_majflt; /* Major Page Fault */
109 /* Basic Accounting Fields end */ 109 /* Basic Accounting Fields end */
110
111 /* Extended accounting fields start */
112 __u64 acct_rss_mem1; /* accumulated rss usage */
113 __u64 acct_vm_mem1; /* accumulated virtual memory usage */
114 __u64 hiwater_rss; /* High-watermark of RSS usage */
115 __u64 hiwater_vm; /* High-water virtual memory usage */
116 __u64 read_char; /* bytes read */
117 __u64 write_char; /* bytes written */
118 __u64 read_syscalls; /* read syscalls */
119 __u64 write_syscalls; /* write syscalls */
120 /* Extended accounting fields end */
110}; 121};
111 122
112 123
diff --git a/include/linux/tsacct_kern.h b/include/linux/tsacct_kern.h
index 7e8196a02118..74102dcae67a 100644
--- a/include/linux/tsacct_kern.h
+++ b/include/linux/tsacct_kern.h
@@ -16,4 +16,13 @@ static inline void bacct_add_tsk(struct taskstats *stats, struct task_struct *ts
16{} 16{}
17#endif /* CONFIG_TASKSTATS */ 17#endif /* CONFIG_TASKSTATS */
18 18
19#ifdef CONFIG_TASK_XACCT
20extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
21#else
22static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
23{}
24#endif /* CONFIG_TASK_XACCT */
25
19#endif 26#endif
27
28