aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorPaul Turner <pjt@google.com>2009-04-08 15:29:43 -0700
committerIngo Molnar <mingo@elte.hu>2009-04-09 08:19:08 +0200
commit002f128b473fb82f454654be5081b0919ee01ab2 (patch)
tree5425166733e7439257325e1f3f104fa48e416024 /kernel/sched_fair.c
parente3c8ca8336707062f3f7cb1cd7e6b3c753baccdd (diff)
sched: remove redundant hierarchy walk in check_preempt_wakeup
Impact: micro-optimization Under group scheduling we traverse up until we are at common siblings to make the wakeup comparison on. At this point however, they should have the same parent so continuing to check up the tree is redundant. Signed-off-by: Paul Turner <pjt@google.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <alpine.DEB.1.00.0904081520320.30317@kitami.corp.google.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 3816f217f11..5f9650e8fe7 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1487,17 +1487,10 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync)
find_matching_se(&se, &pse);
- while (se) {
- BUG_ON(!pse);
+ BUG_ON(!pse);
- if (wakeup_preempt_entity(se, pse) == 1) {
- resched_task(curr);
- break;
- }
-
- se = parent_entity(se);
- pse = parent_entity(pse);
- }
+ if (wakeup_preempt_entity(se, pse) == 1)
+ resched_task(curr);
}
static struct task_struct *pick_next_task_fair(struct rq *rq)