diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-02-05 06:24:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-05 07:04:33 -0500 |
commit | 32bd671d6cbeda60dc73be77fa2b9037d9a9bfa0 (patch) | |
tree | 591c941b9f12ce9f3caefd112f0ada3c5fcc53ab /kernel/signal.c | |
parent | 83895147b702434e6f236deeca75211fd0e3da3a (diff) |
signal: re-add dead task accumulation stats.
We're going to split the process wide cpu accounting into two parts:
- clocks; which can take all the time they want since they run
from user context.
- timers; which need constant time tracing but can affort the overhead
because they're default off -- and rare.
The clock readout will go back to a full sum of the thread group, for this
we need to re-add the exit stats that were removed in the initial itimer
rework (f06febc9: timers: fix itimer/many thread hang).
Furthermore, since that full sum can be rather slow for large thread groups
and we have the complete dead task stats, revert the do_notify_parent time
computation.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index b6b36768b758..2a74fe87c0dd 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1367,7 +1367,6 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1367 | struct siginfo info; | 1367 | struct siginfo info; |
1368 | unsigned long flags; | 1368 | unsigned long flags; |
1369 | struct sighand_struct *psig; | 1369 | struct sighand_struct *psig; |
1370 | struct task_cputime cputime; | ||
1371 | int ret = sig; | 1370 | int ret = sig; |
1372 | 1371 | ||
1373 | BUG_ON(sig == -1); | 1372 | BUG_ON(sig == -1); |
@@ -1397,9 +1396,10 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1397 | info.si_uid = __task_cred(tsk)->uid; | 1396 | info.si_uid = __task_cred(tsk)->uid; |
1398 | rcu_read_unlock(); | 1397 | rcu_read_unlock(); |
1399 | 1398 | ||
1400 | thread_group_cputime(tsk, &cputime); | 1399 | info.si_utime = cputime_to_clock_t(cputime_add(tsk->utime, |
1401 | info.si_utime = cputime_to_jiffies(cputime.utime); | 1400 | tsk->signal->utime)); |
1402 | info.si_stime = cputime_to_jiffies(cputime.stime); | 1401 | info.si_stime = cputime_to_clock_t(cputime_add(tsk->stime, |
1402 | tsk->signal->stime)); | ||
1403 | 1403 | ||
1404 | info.si_status = tsk->exit_code & 0x7f; | 1404 | info.si_status = tsk->exit_code & 0x7f; |
1405 | if (tsk->exit_code & 0x80) | 1405 | if (tsk->exit_code & 0x80) |