* [PATCH 3.9] cputime: Fix accounting on multi-threaded processes
@ 2013-03-28 12:54 Stanislaw Gruszka
2013-03-28 13:31 ` Frederic Weisbecker
0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2013-03-28 12:54 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Ingo Molnar, Peter Zijlstra, Frederic Weisbecker, Oleg Nesterov,
linux-kernel
Recent commit 6fac4829 "cputime: Use accessors to read task cputime
stats" introduced a bug, that make we account many times cputime of
the first thread, instead of cputimes of all threads.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
kernel/sched/cputime.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index ed12cbb..e93cca9 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -310,7 +310,7 @@ void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)
t = tsk;
do {
- task_cputime(tsk, &utime, &stime);
+ task_cputime(t, &utime, &stime);
times->utime += utime;
times->stime += stime;
times->sum_exec_runtime += task_sched_runtime(t);
--
1.7.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 3.9] cputime: Fix accounting on multi-threaded processes
2013-03-28 12:54 [PATCH 3.9] cputime: Fix accounting on multi-threaded processes Stanislaw Gruszka
@ 2013-03-28 13:31 ` Frederic Weisbecker
0 siblings, 0 replies; 2+ messages in thread
From: Frederic Weisbecker @ 2013-03-28 13:31 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Oleg Nesterov,
linux-kernel
2013/3/28 Stanislaw Gruszka <sgruszka@redhat.com>:
> Recent commit 6fac4829 "cputime: Use accessors to read task cputime
> stats" introduced a bug, that make we account many times cputime of
> the first thread, instead of cputimes of all threads.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Nice catch!
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-28 13:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-28 12:54 [PATCH 3.9] cputime: Fix accounting on multi-threaded processes Stanislaw Gruszka
2013-03-28 13:31 ` Frederic Weisbecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®