[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>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <linux/taskstats_kern.h>
|
||||
#include <linux/tsacct_kern.h>
|
||||
#include <linux/delayacct.h>
|
||||
#include <linux/tsacct_kern.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <net/genetlink.h>
|
||||
@@ -204,6 +205,9 @@ static int fill_pid(pid_t pid, struct task_struct *pidtsk,
|
||||
stats->version = TASKSTATS_VERSION;
|
||||
bacct_add_tsk(stats, tsk);
|
||||
|
||||
/* fill in extended acct fields */
|
||||
xacct_add_tsk(stats, tsk);
|
||||
|
||||
/* Define err: label here if needed */
|
||||
put_task_struct(tsk);
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user