From 781264d6ea93bcd2f4822ee955dd5192333c1e83 Mon Sep 17 00:00:00 2001 From: Cruz Zhao Date: Sun, 28 Apr 2024 16:47:50 +0800 Subject: [PATCH] anolis: sched/fair: fix underclass unscheduled after ID_ABSOLUTE_EXPEL turned off ANBZ: #8835 In function sync_min_vruntime(), expel_start and expel_spread will not be cleared if CONFIG_SCHED_SMT is off, which results that the priority of underclass will be much lower than other once ID_ABSOLUTE_EXPEL is turned off, because min_vruntime << min_under_vruntime + expel_spread after sync_min_vruntime(). To fix this problem, we clear expel_start and expel_spread in sync_min_vruntime() regardless of whether CONFIG_SCHED_SMT is on. Fixes: 52249b01d37b("anolis: sched/fair: introduce sched_feat ID_ABSOLUTE_EXPEL") Signed-off-by: Cruz Zhao --- kernel/sched/fair.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e47be26d4484..7f7bf703f630 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1953,7 +1953,6 @@ static inline void sync_min_vruntime(struct cfs_rq *cfs_rq) sync_up = true; } -#ifdef CONFIG_SCHED_SMT /* * Once min vruntime sync up, the expel penalty will be * included, just clear it. @@ -1962,7 +1961,6 @@ static inline void sync_min_vruntime(struct cfs_rq *cfs_rq) cfs_rq->expel_start = 0; cfs_rq->expel_spread = 0; } -#endif } static inline void update_under_min_vruntime(struct cfs_rq *cfs_rq) -- Gitee