From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757273AbcEEJmy (ORCPT ); Thu, 5 May 2016 05:42:54 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44244 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756728AbcEEJmv (ORCPT ); Thu, 5 May 2016 05:42:51 -0400 Date: Thu, 5 May 2016 02:42:09 -0700 From: tip-bot for Matt Fleming Message-ID: Cc: matt@codeblueprint.co.uk, torvalds@linux-foundation.org, mingo@kernel.org, riel@redhat.com, mgorman@techsingularity.net, efault@gmx.de, peterz@infradead.org, hpa@zytor.com, umgwanakikbuti@gmail.com, wanpeng.li@hotmail.com, linux-kernel@vger.kernel.org, fweisbec@gmail.com, tglx@linutronix.de Reply-To: umgwanakikbuti@gmail.com, wanpeng.li@hotmail.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, fweisbec@gmail.com, hpa@zytor.com, peterz@infradead.org, efault@gmx.de, matt@codeblueprint.co.uk, torvalds@linux-foundation.org, mingo@kernel.org, riel@redhat.com, mgorman@techsingularity.net In-Reply-To: <1462304814-11715-1-git-send-email-matt@codeblueprint.co.uk> References: <1462304814-11715-1-git-send-email-matt@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/fair: Update rq clock before updating nohz CPU load Git-Commit-ID: b52fad2db5d792d89975cebf2fe1646a7af28ed0 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b52fad2db5d792d89975cebf2fe1646a7af28ed0 Gitweb: http://git.kernel.org/tip/b52fad2db5d792d89975cebf2fe1646a7af28ed0 Author: Matt Fleming AuthorDate: Tue, 3 May 2016 20:46:54 +0100 Committer: Ingo Molnar CommitDate: Thu, 5 May 2016 09:41:09 +0200 sched/fair: Update rq clock before updating nohz CPU load 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(). Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Wanpeng Li Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1462304814-11715-1-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8c381a6..7a00c7c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4724,6 +4724,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); }