提交 1bd8a72b 编写于 作者: J Joseph Qi 提交者: Caspar Zhang

alinux: psi: using cpuacct_cgrp_id under CONFIG_CGROUP_CPUACCT

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: Nkbuild test robot <lkp@intel.com>
Fixes: 1f49a738 ("alinux: psi: Support PSI under cgroup v1")
Signed-off-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: NXunlei Pang <xlpang@linux.alibaba.com>
上级 43f57d41
...@@ -729,7 +729,11 @@ static struct psi_group *iterate_groups(struct task_struct *task, void **iter) ...@@ -729,7 +729,11 @@ static struct psi_group *iterate_groups(struct task_struct *task, void **iter)
if (static_branch_likely(&psi_v1_disabled)) if (static_branch_likely(&psi_v1_disabled))
cgroup = task->cgroups->dfl_cgrp; cgroup = task->cgroups->dfl_cgrp;
else else
#ifdef CONFIG_CGROUP_CPUACCT
cgroup = task_cgroup(task, cpuacct_cgrp_id); cgroup = task_cgroup(task, cpuacct_cgrp_id);
#else
cgroup = NULL;
#endif
} else if (*iter == &psi_system) } else if (*iter == &psi_system)
return NULL; return NULL;
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册