[PATCH OLK-6.6] sched: qos sched support online task to preempt offline task

hulk inclusion category: feature bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBHNMR CVE: NA -------------------------------- Check_preempt_curr add a condition check to support online task with higher priority to preempt offline task. Signed-off-by: He Yujie <coka.heyujie@huawei.com> --- kernel/sched/fair.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7df2b07629c0..d8a6686774ea 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -155,6 +155,7 @@ static int hundred_thousand = 100000; static int __unthrottle_qos_cfs_rqs(int cpu); static int unthrottle_qos_cfs_rqs(int cpu); static bool qos_smt_expelled(int this_cpu); +static bool is_offline_task(struct task_struct *p); #endif #ifdef CONFIG_QOS_SCHED_SMT_EXPELLER @@ -9355,6 +9356,11 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ if (cse_is_idle != pse_is_idle) return; +#ifdef CONFIG_QOS_SCHED + if (unlikely(is_offline_task(curr) && !is_offline_task(p))) + goto preempt; +#endif + /* * BATCH and IDLE tasks do not preempt others. */ -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/14877 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/F... 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/14877 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/F...
participants (2)
-
He Yujie
-
patchwork bot