Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932940Ab3DFQrG (ORCPT ); Sat, 6 Apr 2013 12:47:06 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:58937 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765068Ab3DFQqS (ORCPT ); Sat, 6 Apr 2013 12:46:18 -0400 From: Frederic Weisbecker To: Ingo Molnar Cc: LKML , Frederic Weisbecker , Alessio Igor Bogani , Andrew Morton , Chris Metcalf , Christoph Lameter , Geoff Levand , Gilad Ben Yossef , Hakan Akkan , Li Zhong , Namhyung Kim , "Paul E. McKenney" , Paul Gortmaker , Peter Zijlstra , Steven Rostedt , Thomas Gleixner , Paul Turner , Mike Galbraith Subject: [PATCH 5/7] sched: Update rq clock before idle balancing Date: Sat, 6 Apr 2013 18:45:58 +0200 Message-Id: <1365266760-24725-6-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1365266760-24725-1-git-send-email-fweisbec@gmail.com> References: <1365266760-24725-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1755 Lines: 47 idle_balance() is called from schedule() right before we schedule the idle task. It needs to record the idle timestamp at that time and for this the rq clock must be accurate. If the CPU is running tickless we need to update the rq clock manually. Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Li Zhong Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Paul Turner Cc: Mike Galbraith --- kernel/sched/fair.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fdff363..f90e1d8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5216,6 +5216,7 @@ void idle_balance(int this_cpu, struct rq *this_rq) int pulled_task = 0; unsigned long next_balance = jiffies + HZ; + update_nohz_rq_clock(this_rq); this_rq->idle_stamp = this_rq->clock; if (this_rq->avg_idle < sysctl_sched_migration_cost) -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/