mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
wait_task_zombie: do not use thread_group_cputime()
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> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Roland McGrath <roland@redhat.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Vitaly Mayatskikh <vmayatsk@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e49612544c
commit
77d1ef7956
1 changed files with 6 additions and 10 deletions
|
@ -1191,7 +1191,6 @@ static int wait_task_zombie(struct task_struct *p, int options,
|
||||||
if (likely(!traced)) {
|
if (likely(!traced)) {
|
||||||
struct signal_struct *psig;
|
struct signal_struct *psig;
|
||||||
struct signal_struct *sig;
|
struct signal_struct *sig;
|
||||||
struct task_cputime cputime;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The resource counters for the group leader are in its
|
* The resource counters for the group leader are in its
|
||||||
|
@ -1207,23 +1206,20 @@ static int wait_task_zombie(struct task_struct *p, int options,
|
||||||
* need to protect the access to parent->signal fields,
|
* need to protect the access to parent->signal fields,
|
||||||
* as other threads in the parent group can be right
|
* as other threads in the parent group can be right
|
||||||
* here reaping other children at the same time.
|
* 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);
|
spin_lock_irq(&p->real_parent->sighand->siglock);
|
||||||
psig = p->real_parent->signal;
|
psig = p->real_parent->signal;
|
||||||
sig = p->signal;
|
sig = p->signal;
|
||||||
psig->cutime =
|
psig->cutime =
|
||||||
cputime_add(psig->cutime,
|
cputime_add(psig->cutime,
|
||||||
cputime_add(cputime.utime,
|
cputime_add(p->utime,
|
||||||
sig->cutime));
|
cputime_add(sig->utime,
|
||||||
|
sig->cutime)));
|
||||||
psig->cstime =
|
psig->cstime =
|
||||||
cputime_add(psig->cstime,
|
cputime_add(psig->cstime,
|
||||||
cputime_add(cputime.stime,
|
cputime_add(p->stime,
|
||||||
sig->cstime));
|
cputime_add(sig->stime,
|
||||||
|
sig->cstime)));
|
||||||
psig->cgtime =
|
psig->cgtime =
|
||||||
cputime_add(psig->cgtime,
|
cputime_add(psig->cgtime,
|
||||||
cputime_add(p->gtime,
|
cputime_add(p->gtime,
|
||||||
|
|
Loading…
Reference in a new issue