* [PATCH 3.9 repost] cputime: Fix accounting on multi-threaded processes
@ 2013-04-04 8:57 Stanislaw Gruszka
2013-04-10 9:25 ` [tip:sched/urgent] sched/cputime: " tip-bot for Stanislaw Gruszka
0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2013-04-04 8:57 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra
Cc: Frederic Weisbecker, Oleg Nesterov, Thomas Gleixner, 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>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
---
This patch fixes 3.8 -> 3.9 regression, please apply.
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
* [tip:sched/urgent] sched/cputime: Fix accounting on multi-threaded processes
2013-04-04 8:57 [PATCH 3.9 repost] cputime: Fix accounting on multi-threaded processes Stanislaw Gruszka
@ 2013-04-10 9:25 ` tip-bot for Stanislaw Gruszka
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Stanislaw Gruszka @ 2013-04-10 9:25 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, peterz, fweisbec, tglx, oleg, sgruszka
Commit-ID: e614b3332a4f3f264a26da28e5a1f4cc3aea3974
Gitweb: http://git.kernel.org/tip/e614b3332a4f3f264a26da28e5a1f4cc3aea3974
Author: Stanislaw Gruszka <sgruszka@redhat.com>
AuthorDate: Thu, 4 Apr 2013 10:57:48 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 8 Apr 2013 17:40:52 +0200
sched/cputime: Fix accounting on multi-threaded processes
Recent commit 6fac4829 ("cputime: Use accessors to read task
cputime stats") introduced a bug, where we account many times
the cputime of the first thread, instead of cputimes of all
the different threads.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130404085740.GA2495@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/cputime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-10 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04 8:57 [PATCH 3.9 repost] cputime: Fix accounting on multi-threaded processes Stanislaw Gruszka
2013-04-10 9:25 ` [tip:sched/urgent] sched/cputime: " tip-bot for Stanislaw Gruszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome