diff --git a/init/Kconfig b/init/Kconfig index 9603a5828317..228a0a4d49c0 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -636,6 +636,21 @@ config PSI_DEFAULT_DISABLED Say N if unsure. +config PSI_PER_CGROUP_ACCT + bool "Enable per-cgroup pressure stall information tracking" + default n + depends on PSI + depends on CGROUPS + help + If set, pressure stall information will be tracked for each + individual cgroup. Otherwise, pressure stall information will + be tracked only at the system level under /proc/pressure/. + + This feature generates overhead that depends on the number of + cgroups in the cgroup v2 hierarchy. + + Say N if unsure. + endmenu # "CPU/Task time and stats accounting" config CPU_ISOLATION diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 967732c0766c..fcc46032ddde 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -743,7 +743,7 @@ static void psi_group_change(struct psi_group *group, int cpu, static struct psi_group *iterate_groups(struct task_struct *task, void **iter) { -#ifdef CONFIG_CGROUPS +#if defined CONFIG_CGROUPS && defined CONFIG_PSI_PER_CGROUP_ACCT struct cgroup *cgroup = NULL; if (!*iter)