Re: [PATCH 7/7] psi: cgroup support

Peter Zijlstra
2018-05-09T11:07:36Z

On Mon, May 07, 2018 at 05:01:35PM -0400, Johannes Weiner wrote:
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -260,6 +260,18 @@ void psi_task_change(struct task_struct *task, u64 now, int clear, int set)
> task->psi_flags |= set;
>
> psi_group_update(&psi_system, cpu, now, clear, set);
> +
> +#ifdef CONFIG_CGROUPS
> + cgroup = task->cgroups->dfl_cgrp;
> + while (cgroup && (parent = cgroup_parent(cgroup))) {
> + struct psi_group *group;
> +
> + group = cgroup_psi(cgroup);
> + psi_group_update(group, cpu, now, clear, set);
> +
> + cgroup = parent;
> + }
> +#endif
> }

TJ fixed needing that for stats at some point, why can't you do the
same?