• Roman Gushchin's avatar
    mm, memcg: introduce mem_cgroup_kmem_disabled() · 4d5c8aed
    Roman Gushchin authored
    Introduce a new mem_cgroup_kmem_disabled() helper, similar to
    mem_cgroup_disabled(), to check whether the kernel memory accounting
    is off. A user could disable it using a boot option to eliminate
    some associated costs.
    
    The helper can be used outside of memcontrol.c to dynamically disable
    the kmem-related code. The returned value is stable after the kernel
    initialization is finished.
    Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
    Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
    4d5c8aed
memcontrol.c 190 KB