lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANRm+Cy9pq9+L2qGS0fApskQrDRbOGPupNYP5ou0Tn9NL2TN2Q@mail.gmail.com>
Date:	Wed, 4 May 2016 09:07:00 +0800
From:	Wanpeng Li <kernellwp@...il.com>
To:	Matt Fleming <matt@...eblueprint.co.uk>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Mike Galbraith <umgwanakikbuti@...il.com>,
	Mel Gorman <mgorman@...hsingularity.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH] sched/fair: Update rq clock before updating nohz cpu load

2016-05-04 3:46 GMT+08:00 Matt Fleming <matt@...eblueprint.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@...radead.org>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Mike Galbraith <umgwanakikbuti@...il.com>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Rik van Riel <riel@...hat.com>
> Signed-off-by: Matt Fleming <matt@...eblueprint.co.uk>

Reviewed-by: Wanpeng Li <wanpeng.li@...mail.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ