psi: link legacy root to psi_system

Upstream: no, unless upstream decide to support cgroup v1 PSI

* This is part of EMM *

When interating through cgroup for PSI, the cgroup->psi must be
non-NULL. For rootcg case, v2 can set the static cgrp_dfl_root's psi to
point to psi_system. v1 have to set the pointer to psi_system for each
mounted system.

Signed-off-by: Kairui Song <kasong@tencent.com>
This commit is contained in:
Kairui Song 2023-01-31 16:03:17 +08:00
parent 6c353a3bd0
commit 1e06b44ba1
1 changed files with 1 additions and 0 deletions

View File

@ -2079,6 +2079,7 @@ int cgroup_setup_root(struct cgroup_root *root, u16 ss_mask)
root_cgrp->kn = kernfs_root_to_node(root->kf_root);
WARN_ON_ONCE(cgroup_ino(root_cgrp) != 1);
root_cgrp->ancestors[0] = root_cgrp;
root_cgrp->psi = &psi_system;
ret = css_populate_dir(&root_cgrp->self);
if (ret)