From: Joseph Qi joseph.qi@linux.alibaba.com
maillist inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8QUNW
Reference: https://github.com/alibaba/cloud-kernel/commit/1bd8a72b11818535b18984227ec1d...
----------------------------------------------
This is to fix the build error if CONFIG_CGROUP_CPUACCT is not enabled. kernel/sched/psi.c: In function 'iterate_groups': kernel/sched/psi.c:732:31: error: 'cpuacct_cgrp_id' undeclared (first use in this function); did you mean 'cpuacct_charge'?
Reported-by: kbuild test robot lkp@intel.com Fixes: 1f49a7385032 ("alinux: psi: Support PSI under cgroup v1") Signed-off-by: Joseph Qi joseph.qi@linux.alibaba.com Reviewed-by: Xunlei Pang xlpang@linux.alibaba.com Conflict: kernel/sched/psi.c Signed-off-by: Lu Jialin lujialin4@huawei.com --- kernel/sched/psi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 6fe674bee440..f6995017addf 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -886,6 +886,7 @@ static inline struct psi_group *task_psi_group(struct task_struct *task) { #ifdef CONFIG_CGROUPS if (static_branch_likely(&psi_cgroups_enabled)) { +#ifdef CONFIG_CGORUP_CPUACCT if (!cgroup_subsys_on_dfl(cpuacct_cgrp_subsys)) { if (static_branch_likely(&psi_v1_disabled)) return &psi_system; @@ -893,6 +894,7 @@ static inline struct psi_group *task_psi_group(struct task_struct *task) return cgroup_psi(task_cgroup(task, cpuacct_cgrp_id)); } else return cgroup_psi(task_dfl_cgroup(task)); +#endif } #endif return &psi_system;