sched: fair: Add strict skip buddy support

Skip buddy i.e task called yield() is always skipped and the
next entity is selected to run irrespective of the unfairness.

Change-Id: Ia9b9fbe46917152b58dc6406c718eb1cfb3b0fb2
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
tirimbino
Maria Yu 6 years ago
parent 2e04b40c96
commit 6f58caae21
  1. 3
      kernel/sched/fair.c
  2. 6
      kernel/sched/features.h

@ -4247,7 +4247,8 @@ pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr)
second = curr;
}
if (second && wakeup_preempt_entity(second, left) < 1)
if (second && (sched_feat(STRICT_SKIP_BUDDY) ||
wakeup_preempt_entity(second, left) < 1))
se = second;
}

@ -26,6 +26,12 @@ SCHED_FEAT(NEXT_BUDDY, false)
*/
SCHED_FEAT(LAST_BUDDY, true)
/*
* skip buddy i.e task called yield() is always skipped and the
* next entity is selected to run irrespective of the vruntime
*/
SCHED_FEAT(STRICT_SKIP_BUDDY, true)
/*
* Consider buddies to be cache hot, decreases the likelyness of a
* cache buddy being migrated away, increases cache locality.

Loading…
Cancel
Save