[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-92509b732baf14c59ca702307270cfaa3a585ae7@git.kernel.org>
Date: Sat, 14 Jan 2017 04:41:15 -0800
From: tip-bot for Matt Fleming <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: torvalds@...ux-foundation.org, hpa@...or.com,
umgwanakikbuti@...il.com, efault@....de, yuyang.du@...el.com,
sergey.senozhatsky.work@...il.com, peterz@...radead.org,
fweisbec@...il.com, pmladek@...e.com, luca.abeni@...tn.it,
mgorman@...hsingularity.net, byungchul.park@....com,
linux-kernel@...r.kernel.org, wanpeng.li@...mail.com,
tglx@...utronix.de, riel@...hat.com, jack@...e.cz,
mingo@...nel.org, matt@...eblueprint.co.uk
Subject: [tip:sched/core] sched/core: Reset RQCF_ACT_SKIP before unpinning
rq->lock
Commit-ID: 92509b732baf14c59ca702307270cfaa3a585ae7
Gitweb: http://git.kernel.org/tip/92509b732baf14c59ca702307270cfaa3a585ae7
Author: Matt Fleming <matt@...eblueprint.co.uk>
AuthorDate: Wed, 21 Sep 2016 14:38:11 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sat, 14 Jan 2017 11:29:31 +0100
sched/core: Reset RQCF_ACT_SKIP before unpinning rq->lock
rq_clock() is called from sched_info_{depart,arrive}() after resetting
RQCF_ACT_SKIP but prior to a call to update_rq_clock().
In preparation for pending patches that check whether the rq clock has
been updated inside of a pin context before rq_clock() is called, move
the reset of rq->clock_skip_update immediately before unpinning the rq
lock.
This will avoid the new warnings which check if update_rq_clock() is
being actively skipped.
Signed-off-by: Matt Fleming <matt@...eblueprint.co.uk>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Byungchul Park <byungchul.park@....com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Jan Kara <jack@...e.cz>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Luca Abeni <luca.abeni@...tn.it>
Cc: Mel Gorman <mgorman@...hsingularity.net>
Cc: Mike Galbraith <efault@....de>
Cc: Mike Galbraith <umgwanakikbuti@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Petr Mladek <pmladek@...e.com>
Cc: Rik van Riel <riel@...hat.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Wanpeng Li <wanpeng.li@...mail.com>
Cc: Yuyang Du <yuyang.du@...el.com>
Link: http://lkml.kernel.org/r/20160921133813.31976-6-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/core.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 41df935..311460b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2887,6 +2887,9 @@ context_switch(struct rq *rq, struct task_struct *prev,
prev->active_mm = NULL;
rq->prev_mm = oldmm;
}
+
+ rq->clock_skip_update = 0;
+
/*
* Since the runqueue lock will be released by the next
* task (which is an invalid locking op but in the case
@@ -3392,7 +3395,6 @@ static void __sched notrace __schedule(bool preempt)
next = pick_next_task(rq, prev, &rf);
clear_tsk_need_resched(prev);
clear_preempt_need_resched();
- rq->clock_skip_update = 0;
if (likely(prev != next)) {
rq->nr_switches++;
@@ -3402,6 +3404,7 @@ static void __sched notrace __schedule(bool preempt)
trace_sched_switch(preempt, prev, next);
rq = context_switch(rq, prev, next, &rf); /* unlocks the rq */
} else {
+ rq->clock_skip_update = 0;
rq_unpin_lock(rq, &rf);
raw_spin_unlock_irq(&rq->lock);
}
Powered by blists - more mailing lists