From: Kirill Tkhai <ktkhai@odin.com>
To: <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
Mohammed Naser <mnaser@vexxhost.com>,
"Ingo Molnar" <mingo@kernel.org>, Kirill Tkhai <tkhai@yandex.ru>
Subject: [PATCH 1/2] sched/fair: make update_curr_fair() update whole hierarhy
Date: Tue, 26 May 2015 14:50:01 +0300 [thread overview]
Message-ID: <1432641001.6866.58.camel@odin.com> (raw)
This patch makes update_curr_fair() similar to update_curr_rt(),
which updates runtime on whole hierarhy. We need that in next
patch.
Signed-off-by: Kirill Tkhai <ktkhai@odin.com>
---
kernel/sched/fair.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d597aea..ece94af 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -729,7 +729,18 @@ static void update_curr(struct cfs_rq *cfs_rq)
static void update_curr_fair(struct rq *rq)
{
- update_curr(cfs_rq_of(&rq->curr->se));
+ struct task_struct *curr = rq->curr;
+ struct sched_entity *se;
+ struct cfs_rq *cfs_rq;
+
+ if (curr->sched_class != &fair_sched_class)
+ return;
+ se = &curr->se;
+ for_each_sched_entity(se) {
+ cfs_rq = cfs_rq_of(se);
+ update_curr(cfs_rq);
+ }
+
}
static inline void
reply other threads:[~2015-05-26 13:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1432641001.6866.58.camel@odin.com \
--to=ktkhai@odin.com \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mnaser@vexxhost.com \
--cc=peterz@infradead.org \
--cc=tkhai@yandex.ru \
/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