[PATCH v2 6/6] sched/fair: Always trigger resched at the end of a protected period

Vincent Guittot posted 6 patches 3 months ago
There is a newer version of this series
[PATCH v2 6/6] sched/fair: Always trigger resched at the end of a protected period
Posted by Vincent Guittot 3 months ago
Always trigger a resched after a protected period even if the entity is
still eligible. It can happen that an entity remains eligible at the end
of the protected period but must let an entity with a shorter slice to run
in order to keep its lag shorter than slice. This is particulalry true
with run to parity which tries to maximize the lag.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 58f25f0be25f..debcc136f1c8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1188,7 +1188,7 @@ static inline bool resched_next_quantum(struct cfs_rq *cfs_rq, struct sched_enti
 	if (protect_slice(curr))
 		return false;
 
-	return !entity_eligible(cfs_rq, curr);
+	return true;
 }
 
 /*
-- 
2.43.0