[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160921133813.31976-2-matt@codeblueprint.co.uk>
Date: Wed, 21 Sep 2016 14:38:07 +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 1/7] sched/fair: Update the rq clock before detaching tasks
detach_task_cfs_rq() may indirectly call rq_clock() to inform the
cpufreq code that the rq utilisation has changed. In which case, we
need to update the rq clock.
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 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 986c10c25176..ab1cf3866a5b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8484,7 +8484,10 @@ static void detach_task_cfs_rq(struct task_struct *p)
{
struct sched_entity *se = &p->se;
struct cfs_rq *cfs_rq = cfs_rq_of(se);
- u64 now = cfs_rq_clock_task(cfs_rq);
+ u64 now;
+
+ update_rq_clock(task_rq(p));
+ now = cfs_rq_clock_task(cfs_rq);
if (!vruntime_normalized(p)) {
/*
--
2.9.3
Powered by blists - more mailing lists