[PATCH OLK-6.6 0/2] some fix about IFS

Pu Lehui (1): interference: Fix compilation issue Xu Kuohai (1): interference: Fix sub-cgroup can't show in cgroup v1 drivers/base/arch_topology.c | 1 + include/linux/cgroup.h | 4 ++++ init/init_task.c | 8 ++++++++ 3 files changed, 13 insertions(+) -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/16525 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/YFD... 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/16525 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/YFD...

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICAOAT -------------------------------- kernel test robot reported the following compilation error: drivers/base/arch_topology.c:811:2: error: implicit declaration of function 'cgroup_ifs_set_smt' [-Werror=implicit-function-declaration] Let's fix it by adding cgroup_ifs_set_smt related header file. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202505282112.qVJOB1Zd-lkp@intel.com/ Fixes: edff31302c6d ("interference: Add smt interference track support") Signed-off-by: Pu Lehui <pulehui@huawei.com> --- drivers/base/arch_topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index a26169094712..b776ba4127db 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -15,6 +15,7 @@ #include <linux/of.h> #include <linux/slab.h> #include <linux/sched/topology.h> +#include <linux/cgroup.h> #include <linux/cpuset.h> #include <linux/cpumask.h> #include <linux/init.h> -- 2.34.1

From: Xu Kuohai <xukuohai@huawei.com> hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICAOAT -------------------------------- Fix sub-cgroup can't show in cgroup v1 Signed-off-by: Xu Kuohai <xukuohai@huawei.com> Signed-off-by: Pu Lehui <pulehui@huawei.com> --- include/linux/cgroup.h | 4 ++++ init/init_task.c | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 256d04d28ea2..612a2547a4f9 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -895,6 +895,10 @@ static inline struct cgroup_ifs *cgroup_ifs(struct cgroup *cgrp) static inline struct cgroup_ifs *task_ifs(struct task_struct *task) { +#ifdef CONFIG_CGROUP_CPUACCT + if (!cgroup_subsys_on_dfl(cpuacct_cgrp_subsys)) + return cgroup_ifs(task_cgroup(task, cpuacct_cgrp_id)); +#endif return cgroup_ifs(task_dfl_cgroup(task)); } diff --git a/init/init_task.c b/init/init_task.c index 1adc17149558..275ae1f2ff1c 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -12,6 +12,7 @@ #include <linux/audit.h> #include <linux/numa.h> #include <linux/scs.h> +#include <linux/cgroup.h> #include <linux/uaccess.h> @@ -61,6 +62,10 @@ static struct task_struct_resvd init_task_struct_resvd = { .task = &init_task, }; +#ifdef CONFIG_CGROUP_IFS +static struct css_set dummy_css; +#endif + /* * Set up the first task table, touch at your own risk!. Base=0, * limit=0x1fffff (=2MB) @@ -168,6 +173,9 @@ struct task_struct init_task .mems_allowed_seq = SEQCNT_SPINLOCK_ZERO(init_task.mems_allowed_seq, &init_task.alloc_lock), #endif +#ifdef CONFIG_CGROUP_IFS + .cgroups = &dummy_css, +#endif #ifdef CONFIG_RT_MUTEXES .pi_waiters = RB_ROOT_CACHED, .pi_top_task = NULL, -- 2.34.1
participants (2)
-
patchwork bot
-
Pu Lehui