1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * rtg qos interface 4 * 5 * Copyright (c) 2022-2023 Huawei Technologies Co., Ltd. 6 */ 7 8 #ifndef __RTG_QOS_H 9 #define __RTG_QOS_H 10 11 #ifdef CONFIG_SCHED_RTG_QOS 12 #include <linux/sched/rtg_ctrl.h> 13 14 enum qos_manipulate_type { 15 QOS_APPLY = 1, 16 QOS_LEAVE, 17 QOS_MAX_NR, 18 }; 19 20 #define NR_QOS 5 21 #define RTG_QOS_NUM_MAX 10 22 23 struct rtg_authority; 24 25 int qos_apply(struct rtg_qos_data *data); 26 int qos_leave(struct rtg_qos_data *data); 27 28 void qos_pause(struct rtg_authority *auth); 29 void qos_resume(struct rtg_authority *auth); 30 31 void init_task_qos(struct task_struct *p); 32 void sched_exit_qos_list(struct task_struct *p); 33 34 typedef int (*rtg_qos_manipulate_func)(struct rtg_qos_data *data); 35 #endif 36 37 #endif /* __RTG_QOS_H */ 38