public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] sched/fair: make update_curr_fair() update whole hierarhy
@ 2015-05-26 11:50 Kirill Tkhai
  0 siblings, 0 replies; only message in thread
From: Kirill Tkhai @ 2015-05-26 11:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Konstantin Khlebnikov, Mohammed Naser,
	Ingo Molnar, Kirill Tkhai

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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-26 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-26 11:50 [PATCH 1/2] sched/fair: make update_curr_fair() update whole hierarhy Kirill Tkhai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox