*** BLURB HERE ***
Joseph Qi (1): psi: using cpuacct_cgrp_id under CONFIG_CGROUP_CPUACCT
kernel/sched/psi.c | 4 ++++ 1 file changed, 4 insertions(+)
From: Joseph Qi joseph.qi@linux.alibaba.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4OF4N
------------------------------------------
Fix the build error if CONFIG_CGROUP_CPUACCT is not enabled.
Fixes: a885e3f9e457 ("psi: support psi under cgroup v1") Signed-off-by: Joseph Qi joseph.qi@linux.alibaba.com Reviewed-by: Xunlei Pang xlpang@linux.alibaba.com Signed-off-by: Chen Wandun chenwandun@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com Signed-off-by: Chen Ridong chenridong@huawei.com --- kernel/sched/psi.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 15192a436dd0..c66f64ab9f4e 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -1114,12 +1114,16 @@ static inline struct psi_group *task_psi_group(struct task_struct *task) #ifdef CONFIG_CGROUPS if (static_branch_likely(&psi_cgroups_enabled)) { if (task_is_in_psi_v1()) { +#if defined(CONFIG_CGROUP_CPUACCT) struct cgroup *cgroup;
rcu_read_lock(); cgroup = task_cgroup(task, cpuacct_cgrp_id); rcu_read_unlock(); return cgroup_psi(cgroup); +#else + return &psi_system; +#endif } return cgroup_psi(task_dfl_cgroup(task)); }
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/9354 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/X...
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/9354 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/X...