From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755484Ab0IWOBu (ORCPT ); Thu, 23 Sep 2010 10:01:50 -0400 Received: from mtagate6.uk.ibm.com ([194.196.100.166]:42847 "EHLO mtagate6.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755465Ab0IWOBs (ORCPT ); Thu, 23 Sep 2010 10:01:48 -0400 Subject: [RFC][PATCH 06/10] taskstats: Add thread group ID to taskstats structure From: Michael Holzheu Reply-To: holzheu@linux.vnet.ibm.com To: Shailabh Nagar , Andrew Morton , Venkatesh Pallipadi , Peter Zijlstra , Suresh Siddha , John stultz , Thomas Gleixner , Oleg Nesterov , Balbir Singh , Ingo Molnar , Heiko Carstens , Martin Schwidefsky Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1285249681.1837.28.camel@holzheu-laptop> References: <1285249681.1837.28.camel@holzheu-laptop> Content-Type: text/plain; charset="us-ascii" Organization: IBM Date: Thu, 23 Sep 2010 16:01:39 +0200 Message-ID: <1285250499.1837.90.camel@holzheu-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Subject: [PATCH] taskstats: Add thread group ID to taskstats structure From: Michael Holzheu The tgit 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;