Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Thu, 11 Nov 2010 18:03:55 +0100 | From | Michael Holzheu <> | Subject | [RFC][PATCH v2 3/7] taskstats: Add thread group ID to taskstats structure |
| |
From: Michael Holzheu <holzheu@linux.vnet.ibm.com>
The tgid is important for aggregating threads in user space. Therefore we add the tgid to the taskstats structure.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> --- include/linux/taskstats.h | 1 + kernel/tsacct.c | 1 + 2 files changed, 2 insertions(+)
--- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h @@ -167,6 +167,7 @@ struct taskstats { /* Timestamp where data has been collected in ns since boot time */ __u64 time_ns; + __u32 ac_tgid; /* Thread group ID */ }; --- a/kernel/tsacct.c +++ b/kernel/tsacct.c @@ -56,6 +56,7 @@ void bacct_add_tsk(struct taskstats *sta stats->ac_nice = task_nice(tsk); stats->ac_sched = tsk->policy; stats->ac_pid = tsk->pid; + stats->ac_tgid = tsk->tgid; rcu_read_lock(); tcred = __task_cred(tsk); stats->ac_uid = tcred->uid;
| ![\](/images/icornerr.gif) |