aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorRoman Gushchin <[email protected]>2023-02-13 11:29:22 -0800
committerAndrew Morton <[email protected]>2023-02-16 20:43:56 -0800
commitf7a449f779608efe1941a0e0c4bd7b5f57000be7 (patch)
treef8f97a44778de08a806b9e06a4c54e331273a043 /tools/testing/selftests/bpf/progs/test_autoload.c
parentb4fb12e6c74791ac4c5c98b845628c576366b889 (diff)
mm: memcontrol: rename memcg_kmem_enabled()
Currently there are two kmem-related helper functions with a confusing semantics: memcg_kmem_enabled() and mem_cgroup_kmem_disabled(). The problem is that an obvious expectation memcg_kmem_enabled() == !mem_cgroup_kmem_disabled(), can be false. mem_cgroup_kmem_disabled() is similar to mem_cgroup_disabled(): it returns true only if CONFIG_MEMCG_KMEM is not set or the kmem accounting is disabled using a boot time kernel option "cgroup.memory=nokmem". It never changes the value dynamically. memcg_kmem_enabled() is different: it always returns false until the first non-root memory cgroup will get online (assuming the kernel memory accounting is enabled). It's goal is to improve the performance on systems without the cgroupfs mounted/memory controller enabled or on the systems with only the root memory cgroup. To make things more obvious and avoid potential bugs, let's rename memcg_kmem_enabled() to memcg_kmem_online(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Roman Gushchin <[email protected]> Acked-by: Muchun Song <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Shakeel Butt <[email protected]> Cc: Dennis Zhou <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions