Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393883

Re: [PATCH] sched/fair: Update rq clock before updating nohz cpu load

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] sched/fair: Update rq clock before updating nohz cpu load
Date 2016-05-04 03:10 +0200
Message-ID <ruTu9-2bn-5@gated-at.bofh.it> (permalink)
References <ruOut-5TD-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-05-04 3:46 GMT+08:00 Matt Fleming <matt@codeblueprint.co.uk>:
> If we're accessing rq_clock() (e.g. in sched_avg_update()) we should
> update the rq clock before calling cpu_load_update(), otherwise any
> time calculations will be stale.
>
> All other paths currently call update_rq_clock().
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
> Cc: Mel Gorman <mgorman@techsingularity.net>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Rik van Riel <riel@redhat.com>
> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>

Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com>

> ---
>  kernel/sched/fair.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index b8a33abce650..aa9ba82f0d7c 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4723,6 +4723,7 @@ void cpu_load_update_nohz_stop(void)
>
>         load = weighted_cpuload(cpu_of(this_rq));
>         raw_spin_lock(&this_rq->lock);
> +       update_rq_clock(this_rq);
>         cpu_load_update_nohz(this_rq, curr_jiffies, load);
>         raw_spin_unlock(&this_rq->lock);
>  }
> --
> 2.7.3
>



-- 
Regards,
Wanpeng Li

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] sched/fair: Update rq clock before updating nohz cpu load Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-03 21:50 +0200
  Re: [PATCH] sched/fair: Update rq clock before updating nohz cpu load Wanpeng Li <kernellwp@gmail.com> - 2016-05-04 03:10 +0200
  [tip:sched/core] sched/fair: Update rq clock before updating nohz  CPU load tip-bot for Matt Fleming <tipbot@zytor.com> - 2016-05-05 11:50 +0200

csiph-web