From: Wenyu Huang huangwenyu5@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB7FU1
--------------------------------
In enqueue_entity, it assigns rq_clock(rq) to a cfs_rq when this cfs_rq is throttled by QOS, which causes SCHED_WARN_ON(cfs_rq->throttled_clock) in throttle_cfs_rq. So we add a "cfs_rq->throttled != QOS_THROTTLED" check to avoid assign rq_clock to the cfs_rq throttled by QOS.
Fixes: 926b9b0cd97e ("sched: Throttle qos cfs_rq when current cpu is running online task") Signed-off-by: Wenyu Huang huangwenyu5@huawei.com Signed-off-by: Liu Kai liukai284@huawei.com --- kernel/sched/fair.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2bf8b64182c5..7835353a583b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5453,13 +5453,19 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) if (!throttled_hierarchy(cfs_rq)) { list_add_leaf_cfs_rq(cfs_rq); } else { +#ifdef CONFIG_QOS_SCHED + if (cfs_rq->throttled != QOS_THROTTLED) { +#endif #ifdef CONFIG_CFS_BANDWIDTH - struct rq *rq = rq_of(cfs_rq); + struct rq *rq = rq_of(cfs_rq);
- if (cfs_rq_throttled(cfs_rq) && !cfs_rq->throttled_clock) - cfs_rq->throttled_clock = rq_clock(rq); - if (!cfs_rq->throttled_clock_self) - cfs_rq->throttled_clock_self = rq_clock(rq); + if (cfs_rq_throttled(cfs_rq) && !cfs_rq->throttled_clock) + cfs_rq->throttled_clock = rq_clock(rq); + if (!cfs_rq->throttled_clock_self) + cfs_rq->throttled_clock_self = rq_clock(rq); +#endif +#ifdef CONFIG_QOS_SCHED + } #endif } }
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/13950 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/V...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/13950 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/V...