diff options
| author | Miaohe Lin <[email protected]> | 2023-07-08 10:33:04 +0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-08-18 10:12:15 -0700 |
| commit | 60b1e24ce8c3334d9204d6229356b750632136be (patch) | |
| tree | 1ef851cd82cbee152874f481a82ca94ae4686658 /tools/perf/scripts/python/bin | |
| parent | 22d1e68f5a23f8b068da77af6d037bc73748c6e3 (diff) | |
mm/memcg: minor cleanup for MEM_CGROUP_ID_MAX
MEM_CGROUP_ID_MAX is only used when CONFIG_MEMCG is configured. So remove
unneeded !CONFIG_MEMCG variant. Also it's only used in
mem_cgroup_alloc(), so move it from memcontrol.h to memcontrol.c. And
further define it as:
#define MEM_CGROUP_ID_MAX ((1UL << MEM_CGROUP_ID_SHIFT) - 1)
so if someone changes MEM_CGROUP_ID_SHIFT in the future, then
MEM_CGROUP_ID_MAX will be updated accordingly, as suggested by Muchun.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: Muchun Song <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Shakeel Butt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions