[PATCH 1/2] sched/fair: make update_curr_fair() update whole hierarhy
From: Kirill Tkhai
Date: Tue May 26 2015 - 09:31:56 EST
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@xxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/