Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754765Ab0KKRIV (ORCPT ); Thu, 11 Nov 2010 12:08:21 -0500 Received: from mtagate4.uk.ibm.com ([194.196.100.164]:58689 "EHLO mtagate4.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754378Ab0KKRIS (ORCPT ); Thu, 11 Nov 2010 12:08:18 -0500 Message-Id: <20101111170814.601425734@linux.vnet.ibm.com> User-Agent: quilt/0.48-1 Date: Thu, 11 Nov 2010 18:03:55 +0100 From: Michael Holzheu To: Shailabh Nagar , Andrew Morton , Venkatesh Pallipadi , Suresh Siddha , Peter Zijlstra , Ingo Molnar , Oleg Nesterov , John stultz , Thomas Gleixner , Balbir Singh , Martin Schwidefsky , Heiko Carstens , Roland McGrath Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [RFC][PATCH v2 3/7] taskstats: Add thread group ID to taskstats structure References: <20101111170352.732381138@linux.vnet.ibm.com> Content-Disposition: inline; filename=03-taskstats-top-add-tgid.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1136 Lines: 37 From: Michael Holzheu The tgid is important for aggregating threads in user space. Therefore we add the tgid to the taskstats structure. Signed-off-by: Michael Holzheu --- 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/