From: tip-bot for Frederic Weisbecker <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
peterz@infradead.org, efault@gmx.de, pjt@google.com,
zhong@linux.vnet.ibm.com, fweisbec@gmail.com,
rostedt@goodmis.org, tglx@linutronix.de
Subject: [tip:sched/core] sched: Update rq clock before calling check_preempt_curr()
Date: Tue, 28 May 2013 06:10:36 -0700 [thread overview]
Message-ID: <tip-1ad4ec0dc740c4183acd6d6e367ca52b28e4fa94@git.kernel.org> (raw)
In-Reply-To: <1365724262-20142-4-git-send-email-fweisbec@gmail.com>
Commit-ID: 1ad4ec0dc740c4183acd6d6e367ca52b28e4fa94
Gitweb: http://git.kernel.org/tip/1ad4ec0dc740c4183acd6d6e367ca52b28e4fa94
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Fri, 12 Apr 2013 01:51:00 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 28 May 2013 09:40:24 +0200
sched: Update rq clock before calling check_preempt_curr()
check_preempt_curr() of fair class needs an uptodate sched clock
value to update runtime stats of the current task of the target's rq.
When a task is woken up, activate_task() is usually called right before
ttwu_do_wakeup() unless the task is still in the runqueue. In the latter
case we need to update the rq clock explicitly because activate_task()
isn't here to do the job for us.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Turner <pjt@google.com>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1365724262-20142-4-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7bf0418..46d0017 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1365,6 +1365,8 @@ static int ttwu_remote(struct task_struct *p, int wake_flags)
rq = __task_rq_lock(p);
if (p->on_rq) {
+ /* check_preempt_curr() may use rq clock */
+ update_rq_clock(rq);
ttwu_do_wakeup(rq, p, wake_flags);
ret = 1;
}
next prev parent reply other threads:[~2013-05-28 13:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 23:50 [RFC GIT PULL] sched; Fix a few missing rq clock updates Frederic Weisbecker
2013-04-11 23:50 ` [PATCH 1/5] sched: Update rq clock before migrating tasks out of dying CPU Frederic Weisbecker
2013-05-28 13:08 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2013-04-11 23:50 ` [PATCH 2/5] sched: Update rq clock before setting fair group shares Frederic Weisbecker
2013-05-28 13:09 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2013-04-11 23:51 ` [PATCH 3/5] sched: Update rq clock before calling check_preempt_curr() Frederic Weisbecker
2013-05-28 13:10 ` tip-bot for Frederic Weisbecker [this message]
2013-04-11 23:51 ` [PATCH 4/5] sched: Update rq clock earlier in unthrottle_cfs_rq Frederic Weisbecker
2013-05-28 13:11 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2013-04-11 23:51 ` [PATCH 5/5] sched: Use an accessor to read rq clock Frederic Weisbecker
2013-05-28 13:13 ` [tip:sched/core] sched: Use an accessor to read the " tip-bot for Frederic Weisbecker
2013-05-14 11:57 ` [RFC GIT PULL] sched; Fix a few missing rq clock updates Peter Zijlstra
2013-05-14 12:46 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-1ad4ec0dc740c4183acd6d6e367ca52b28e4fa94@git.kernel.org \
--to=tipbot@zytor.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=zhong@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).