• R
    mm, memcg: introduce mem_cgroup_kmem_disabled() · 4d5c8aed
    Roman Gushchin 提交于
    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: NRoman Gushchin <guro@fb.com>
    Signed-off-by: NDennis Zhou <dennis@kernel.org>
    4d5c8aed
memcontrol.c 190.4 KB