[PATCH OLK-5.10 V1 1/2] sched/fair: Fix the condition in overload_clear

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAQWPQ ----------------------------------------- In the overload_clear function, there is a bug when setting the overload_cpus, that is, when the steal_task feature is globally enabled and rq->cfs.h_nr_running is less than 2, the need_clear should be set to true. Fixes: 433c0b725642 ("sched/fair: Count the number of tasks marked as steal_task on cfs_rq") Signed-off-by: Cheng Yu <serein.chengyu@huawei.com> --- kernel/sched/fair.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 38841d1d640a..a518d636f07f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4492,11 +4492,10 @@ static void overload_clear(struct rq *rq) if (!steal_enabled()) return; - if (!group_steal_used() && rq->cfs.h_nr_running >= 2) - return; + if (rq->cfs.h_nr_running < 2) + need_clear = true; - if (group_steal_used() && - (rq->cfs.h_nr_running < 2 || rq->cfs.steal_h_nr_running == 0)) + if (group_steal_used() && rq->cfs.steal_h_nr_running < 1) need_clear = true; if (!need_clear) -- 2.25.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,转换为PR失败! 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3... 失败原因:补丁集缺失封面信息 建议解决方法:请提供补丁集并重新发送您的补丁集到邮件列表 FeedBack: The patch(es) which you have sent to kernel@openeuler.org has been converted to PR failed! Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3... Failed Reason: the cover of the patches is missing Suggest Solution: please checkout and apply the patches' cover and send all again
participants (2)
-
Cheng Yu
-
patchwork bot