-
Lev Makhlis authored
Add up resource usage counters for live and dead threads to show aggregate per-process usage in /proc/<pid>/stat. This mirrors the new getrusage() semantics. /proc/<pid>/task/<tid>/stat still has the per-thread usage. After moving the counter aggregation loop inside a task->sighand lock to avoid nasty race conditions, it has survived stress-testing with '(while true; do sleep 1 & done) & top -d 0.1' Signed-off-by: Lev Makhlis <mlev@despammed.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
9a349eb7