[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1258895770.28730.528.camel@laptop>
Date: Sun, 22 Nov 2009 14:16:10 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Mike Galbraith <efault@....de>
Cc: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch] sched: add the other missing clock update to
migrate_task()
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@....de>
> Cc: Ingo Molnar <mingo@...e.hu>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists