Skip to content

Commit 58d8c25

Browse files
Chengming ZhouPeter Zijlstra
authored andcommitted
sched/psi: Don't create cgroup PSI files when psi_disabled
commit 3958e2d ("cgroup: make per-cgroup pressure stall tracking configurable") make PSI can be configured to skip per-cgroup stall accounting. And doesn't expose PSI files in cgroup hierarchy. This patch do the same thing when psi_disabled. Signed-off-by: Chengming Zhou <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Johannes Weiner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c530a3c commit 58d8c25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/cgroup/cgroup.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3780,6 +3780,9 @@ static void cgroup_pressure_release(struct kernfs_open_file *of)
37803780

37813781
bool cgroup_psi_enabled(void)
37823782
{
3783+
if (static_branch_likely(&psi_disabled))
3784+
return false;
3785+
37833786
return (cgroup_feature_disable_mask & (1 << OPT_FEATURE_PRESSURE)) == 0;
37843787
}
37853788

0 commit comments

Comments
 (0)