From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Roland McGrath <roland@redhat.com>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Vitaly Mayatskikh <vmayatsk@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] wait_task_zombie: do not use thread_group_cputime()
Date: Mon, 15 Jun 2009 23:26:51 +0200 [thread overview]
Message-ID: <20090615212651.GA22759@redhat.com> (raw)
There is no reason for thread_group_cputime() in wait_task_zombie(),
there must be no other threads.
This call was previously needed to collect the per-cpu data which
we do not have any longer.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
--- PTRACE/kernel/exit.c~2_WAIT_NO_TG 2009-06-15 22:26:02.000000000 +0200
+++ PTRACE/kernel/exit.c 2009-06-15 23:06:45.000000000 +0200
@@ -1192,7 +1192,6 @@ static int wait_task_zombie(struct wait_
if (likely(!traced) && likely(!task_detached(p))) {
struct signal_struct *psig;
struct signal_struct *sig;
- struct task_cputime cputime;
/*
* The resource counters for the group leader are in its
@@ -1208,23 +1207,20 @@ static int wait_task_zombie(struct wait_
* need to protect the access to parent->signal fields,
* as other threads in the parent group can be right
* here reaping other children at the same time.
- *
- * We use thread_group_cputime() to get times for the thread
- * group, which consolidates times for all threads in the
- * group including the group leader.
*/
- thread_group_cputime(p, &cputime);
spin_lock_irq(&p->real_parent->sighand->siglock);
psig = p->real_parent->signal;
sig = p->signal;
psig->cutime =
cputime_add(psig->cutime,
- cputime_add(cputime.utime,
- sig->cutime));
+ cputime_add(p->utime,
+ cputime_add(sig->utime,
+ sig->cutime)));
psig->cstime =
cputime_add(psig->cstime,
- cputime_add(cputime.stime,
- sig->cstime));
+ cputime_add(p->stime,
+ cputime_add(sig->stime,
+ sig->cstime)));
psig->cgtime =
cputime_add(psig->cgtime,
cputime_add(p->gtime,
next reply other threads:[~2009-06-15 21:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 21:26 Oleg Nesterov [this message]
2009-06-16 0:47 ` [PATCH 2/2] wait_task_zombie: do not use thread_group_cputime() Roland McGrath
2009-06-17 8:13 ` Stanislaw Gruszka
2009-06-17 12:23 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090615212651.GA22759@redhat.com \
--to=oleg@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=sgruszka@redhat.com \
--cc=vmayatsk@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox