From: Mike Galbraith Date: Fri, 11 Sep 2009 10:01:17 +0000 (+0200) Subject: sched: Complete buddy switches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3cb63d527f76e25dbccce4f577f21aecfa2abac7;p=openwrt%2Fstaging%2Fblogic.git sched: Complete buddy switches Add a NEXT_BUDDY feature flag to aid in debugging. Signed-off-by: Mike Galbraith Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index cea5b82242ee..4f6356e70ad6 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -1501,7 +1501,8 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync) */ if (sched_feat(LAST_BUDDY) && likely(se->on_rq && curr != rq->idle)) set_last_buddy(se); - set_next_buddy(pse); + if (sched_feat(NEXT_BUDDY)) + set_next_buddy(pse); /* * We can come here with TIF_NEED_RESCHED already set from new task diff --git a/kernel/sched_features.h b/kernel/sched_features.h index 07c8250b404c..6174c1233993 100644 --- a/kernel/sched_features.h +++ b/kernel/sched_features.h @@ -14,5 +14,6 @@ SCHED_FEAT(LB_WAKEUP_UPDATE, 1) SCHED_FEAT(ASYM_EFF_LOAD, 1) SCHED_FEAT(WAKEUP_SYNC, 0) SCHED_FEAT(WAKEUP_OVERLAP, 0) +SCHED_FEAT(NEXT_BUDDY, 1) SCHED_FEAT(LAST_BUDDY, 1) SCHED_FEAT(OWNER_SPIN, 1)