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: <20101125142344.GA31508@redhat.com>
Date:	Thu, 25 Nov 2010 15:23:44 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Michael Holzheu <holzheu@...ux.vnet.ibm.com>
Cc:	Shailabh Nagar <nagar1234@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	John stultz <johnstul@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Roland McGrath <roland@...hat.com>,
	linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org
Subject: Re: [patch 1/4] taskstats: Introduce "struct cdata"

On 11/19, Michael Holzheu wrote:
>
> From: Michael Holzheu <holzheu@...ux.vnet.ibm.com>
>
> This patch introduces a new structure "struct cdata" that is used to
> store cumulative resource counters for dead child processes and threads.
>
> Note that there is one asymmetry:
> For "struct task_io_accounting" (ioc) there is no extra accounting field for
> dead threads. One field is used for both, dead processes and threads.
>
> This patch introduces no functional change.
>
> Signed-off-by: Michael Holzheu <holzheu@...ux.vnet.ibm.com>
> ---
>  fs/binfmt_elf.c           |    4 +-
>  fs/exec.c                 |    2 -
>  fs/proc/array.c           |   16 ++++----
>  include/linux/sched.h     |   22 +++++++----
>  kernel/exit.c             |   86 ++++++++++++++++++++++++----------------------
>  kernel/posix-cpu-timers.c |   12 +++---
>  kernel/sys.c              |   44 ++++++++++++-----------
>  7 files changed, 100 insertions(+), 86 deletions(-)

Looks good. In fact, to me it looks like a cleanup.

But. You seem to forgot to change kernel/signal.c, no?

And cosmetic nit,

>  void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)
>  {
> -	struct signal_struct *sig = tsk->signal;
> +	struct cdata *tcd = &tsk->signal->cdata_threads;
>  	struct task_struct *t;
>
> -	times->utime = sig->utime;
> -	times->stime = sig->stime;
> -	times->sum_exec_runtime = sig->sum_sched_runtime;
> +	times->utime = tcd->utime;
> +	times->stime = tcd->stime;
> +	times->sum_exec_runtime = tsk->signal->sum_sched_runtime;

Feel free to ignore, but I don't understand why you removed "sig".
Afaics,

	-     times->utime = sig->utime;
	-     times->stime = sig->stime;
	+     times->utime = sig->cdata_threads->utime;
	+     times->stime = sig->cdata_threads->stime;

looks a bit better.

Oleg.

--
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