lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46F23550.6050209@linux.vnet.ibm.com>
Date:	Thu, 20 Sep 2007 14:24:40 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Guillaume Chazarain <guichaz@...oo.fr>,
	Jonathan Lim <jlim@....com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jay Lan <jlan@...ulhu.engr.sgi.com>,
	Oleg Nesterov <oleg@...sign.ru>,
	Michael Neuling <mikey@...ling.org>
Subject: Re: Add all thread stats for TASKSTATS_CMD_ATTR_TGID (v5)

Andrew Morton wrote:
> On Tue, 18 Sep 2007 00:23:39 +0200 Guillaume Chazarain <guichaz@...oo.fr> wrote:
> 
>> TASKSTATS_CMD_ATTR_TGID used to return only the delay accounting stats, not
>> the basic and extended accounting.  With this patch,
>> TASKSTATS_CMD_ATTR_TGID also aggregates the accounting info for all threads
>> of a thread group.  This makes TASKSTATS_CMD_ATTR_TGID usable in a similar
>> fashion to TASKSTATS_CMD_ATTR_PID, for commands like iotop -P
>> (http://guichaz.free.fr/misc/iotop.py).
> 
> This patch conflicts somewhat with
> add-scaled-time-to-taskstats-based-process-accounting.patch
> 
> I fixed it up like this:
> 
> void bacct_add_tsk(struct taskstats *stats, struct task_struct *task)
> {
> 	if (task->flags & PF_SUPERPRIV)
> 		stats->ac_flag |= ASU;
> 	if (task->flags & PF_DUMPCORE)
> 		stats->ac_flag |= ACORE;
> 	if (task->flags & PF_SIGNALED)
> 		stats->ac_flag |= AXSIG;
> 	if (thread_group_leader(task) && (task->flags & PF_FORKNOEXEC))
> 		/*
> 		 * Threads are created by do_fork() and don't exec but not in
> 		 * the AFORK sense, as the latter involves fork(2).
> 		 */
> 		stats->ac_flag |= AFORK;
> 
> 	stats->ac_utimescaled +=
> 		cputime_to_msecs(task->utimescaled) * USEC_PER_MSEC;
> 	stats->ac_stimescaled +=
> 		cputime_to_msecs(task->stimescaled) * USEC_PER_MSEC;
> 	stats->ac_utime	 += cputime_to_msecs(task->utime) * USEC_PER_MSEC;
> 	stats->ac_stime	 += cputime_to_msecs(task->stime) * USEC_PER_MSEC;
> 	stats->ac_minflt += task->min_flt;
> 	stats->ac_majflt += task->maj_flt;
> }
> 
> (note the s/=/+=/ in there) but it all needs reviewing and checking and
> testing please.

Andrew,

Thanks for reviewing the patchset, this patch is on my review and test
queue (which has gotten rather long of late). I'll test it further and
get back.


-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ