[patch 1/1] sched: update_curr versus correct cfs_rq in check_preempt_wakeup

From: Paul Turner
Date: Fri Jul 01 2011 - 20:55:37 EST


We update_curr() versus the current entity as the preemption decision is based
on the relative vruntime. However, update_curr() is not hierarchical and in
the group scheduling case find_matching_se() will have us making the
comparison on a cfs_rq different to the one just updated.

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

Index: tip2/kernel/sched_fair.c
===================================================================
--- tip2.orig/kernel/sched_fair.c
+++ tip2/kernel/sched_fair.c
@@ -1919,8 +1919,8 @@ static void check_preempt_wakeup(struct
if (!sched_feat(WAKEUP_PREEMPT))
return;

- update_curr(cfs_rq);
find_matching_se(&se, &pse);
+ update_curr(cfs_rq_of(se));
BUG_ON(!pse);
if (wakeup_preempt_entity(se, pse) == 1) {
/*


--
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/