From 6e639c8c25042045e06773c1501c8ae512dcbd3b Mon Sep 17 00:00:00 2001 From: edwardcaoyue Date: Thu, 13 Mar 2025 21:58:05 +0800 Subject: [PATCH] avoid rt qos Signed-off-by: edwardcaoyue --- qos_auth/auth_ctl/qos_ctrl.c | 6 ++++++ qos_auth/include/auth_ctrl.h | 1 + 2 files changed, 7 insertions(+) diff --git a/qos_auth/auth_ctl/qos_ctrl.c b/qos_auth/auth_ctl/qos_ctrl.c index 2304edf..73bc107 100644 --- a/qos_auth/auth_ctl/qos_ctrl.c +++ b/qos_auth/auth_ctl/qos_ctrl.c @@ -256,6 +256,12 @@ int qos_apply(struct qos_ctrl_data *data) qts = (struct qos_task_struct *) &p->qts; + if (rt_task(p) && qts->in_qos == NO_QOS) { + pr_err("[QOS_CTRL] can not apply qos for native rt task\n"); + ret = -ALREADY_RT_TASK; + goto out_unlock; + } + /* effective qos must in range [NO_QOS, NR_QOS) */ if (qts->in_qos != NO_QOS) { if (qts->in_qos == level) { diff --git a/qos_auth/include/auth_ctrl.h b/qos_auth/include/auth_ctrl.h index f2e04ee..7301cac 100644 --- a/qos_auth/include/auth_ctrl.h +++ b/qos_auth/include/auth_ctrl.h @@ -72,6 +72,7 @@ enum auth_err_no { PID_DUPLICATE, PID_NOT_EXIST, INVALID_AUTH, + ALREADY_RT_TASK, QOS_THREAD_NUM_EXCEED_LIMIT, }; -- Gitee