diff options
author | Chen Wandun <chenwandun@huawei.com> | 2022-05-26 15:26:56 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2022-06-07 20:11:47 +0300 |
commit | 5f69a6577bc33d8f6d6bbe02bccdeb357b287f56 (patch) | |
tree | e411f7730aabe4d2c485f550367c884e1c84a94b /include/linux/cgroup-defs.h | |
parent | e71e60cd74df9386c3f684c54888f2367050b831 (diff) | |
download | linux-5f69a6577bc33d8f6d6bbe02bccdeb357b287f56.tar.xz |
psi: dont alloc memory for psi by default
Memory about struct psi_group is allocated by default for
each cgroup even if psi_disabled is true, in this case, these
allocated memory is waste, so alloc memory for struct psi_group
only when psi_disabled is false.
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup-defs.h')
-rw-r--r-- | include/linux/cgroup-defs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 1bfcfb1af352..672de25e3ec8 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -475,7 +475,7 @@ struct cgroup { struct work_struct release_agent_work; /* used to track pressure stalls */ - struct psi_group psi; + struct psi_group *psi; /* used to store eBPF programs */ struct cgroup_bpf bpf; |