Skip to content
Commit 4d5c8aed authored by Roman Gushchin's avatar Roman Gushchin Committed by Dennis Zhou
Browse files

mm, memcg: introduce mem_cgroup_kmem_disabled()



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>
parent 0f0cace3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment