From: Mike Galbraith <efault@gmx.de>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>, Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [patch] sched: add the other missing clock update to migrate_task()
Date: Sun, 22 Nov 2009 13:11:19 +0100 [thread overview]
Message-ID: <1258891879.14325.36.camel@marge.simson.net> (raw)
sched: add the other missing clock update to migrate_task()
When calling set_task_cpu(), we must update both runqueue clocks in order
to get an accurate clock offset. Add it.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
---
kernel/sched.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -2126,6 +2126,7 @@ migrate_task(struct task_struct *p, int
*/
if (!p->se.on_rq && !task_running(rq, p)) {
update_rq_clock(rq);
+ update_rq_clock(cpu_rq(dest_cpu));
set_task_cpu(p, dest_cpu);
return 0;
}
next reply other threads:[~2009-11-22 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-22 12:11 Mike Galbraith [this message]
2009-11-22 13:16 ` [patch] sched: add the other missing clock update to migrate_task() Peter Zijlstra
2009-11-22 16:58 ` Mike Galbraith
2009-11-22 18:14 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1258891879.14325.36.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox