From: Peter Zijlstra <peterz@infradead.org>
To: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch] sched: add the other missing clock update to migrate_task()
Date: Sun, 22 Nov 2009 14:16:10 +0100 [thread overview]
Message-ID: <1258895770.28730.528.camel@laptop> (raw)
In-Reply-To: <1258891879.14325.36.camel@marge.simson.net>
On Sun, 2009-11-22 at 13:11 +0100, Mike Galbraith wrote:
> 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;
> }
We should make double_rq_lock() and double_lock_balance() behave
equivalent wrt update_rq_clock().
Current, depending on CONFIG_PREEMPT, double_lock_balance() already
updates both rq clocks.
next prev parent reply other threads:[~2009-11-22 13:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-22 12:11 [patch] sched: add the other missing clock update to migrate_task() Mike Galbraith
2009-11-22 13:16 ` Peter Zijlstra [this message]
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=1258895770.28730.528.camel@laptop \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--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