[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160921133813.31976-4-matt@codeblueprint.co.uk>
Date: Wed, 21 Sep 2016 14:38:09 +0100
From: Matt Fleming <matt@...eblueprint.co.uk>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>
Cc: Byungchul Park <byungchul.park@....com>,
Frederic Weisbecker <fweisbec@...il.com>,
Luca Abeni <luca.abeni@...tn.it>,
Rik van Riel <riel@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Wanpeng Li <wanpeng.li@...mail.com>,
Yuyang Du <yuyang.du@...el.com>,
Petr Mladek <pmladek@...e.com>, Jan Kara <jack@...e.cz>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
linux-kernel@...r.kernel.org,
Mel Gorman <mgorman@...hsingularity.net>,
Mike Galbraith <umgwanakikbuti@...il.com>,
Matt Fleming <matt@...eblueprint.co.uk>
Subject: [PATCH v2 3/7] sched/fair: Update rq clock in task_hot()
When determining whether or not a task is likely to be cache hot based
on its execution start time, we need to ensure the runqueue task clock
is accurate and up to date.
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Mel Gorman <mgorman@...hsingularity.net>
Cc: Mike Galbraith <umgwanakikbuti@...il.com>
Signed-off-by: Matt Fleming <matt@...eblueprint.co.uk>
---
kernel/sched/fair.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7f8a61e97599..85ca4ddab0d3 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6096,6 +6096,7 @@ static int task_hot(struct task_struct *p, struct lb_env *env)
if (sysctl_sched_migration_cost == 0)
return 0;
+ update_rq_clock(env->src_rq);
delta = rq_clock_task(env->src_rq) - p->se.exec_start;
return delta < (s64)sysctl_sched_migration_cost;
--
2.9.3
Powered by blists - more mailing lists