[patch 10/15] sched: (fixlet) dont update shares twice on on_rq parent

From: Paul Turner
Date: Tue Mar 22 2011 - 23:12:52 EST

In dequeue_task_fair() we bail on dequeue when we encounter a parenting entity
with additional weight. However, we perform a double shares update on this
entity since we continue the shares update traversal from that point, despite
dequeue_entity() having already updated its queuing cfs_rq.

Avoid this by starting from the parent when we resume.

Signed-off-by: Paul Turner <pjt@xxxxxxxxxx>
kernel/sched_fair.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Index: tip/kernel/sched_fair.c
--- tip.orig/kernel/sched_fair.c
+++ tip/kernel/sched_fair.c
@@ -1683,8 +1683,10 @@ static void dequeue_task_fair(struct rq
/* Don't dequeue parent if it has other entities besides us */
- if (cfs_rq->load.weight)
+ if (cfs_rq->load.weight) {
+ se = parent_entity(se);
+ }

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/