diff options
author | Roman Gushchin <guro@fb.com> | 2021-06-02 18:09:30 -0700 |
---|---|---|
committer | Dennis Zhou <dennis@kernel.org> | 2021-06-05 20:41:14 +0000 |
commit | 4d5c8aedc8aa6a1f5d1b06eb4f5517dc60dd9440 (patch) | |
tree | 73d4b3c792664e007496ef6a5463b2aec1af6fe3 /mm/percpu-internal.h | |
parent | 0f0cace35fa655d383b64b4fce83a44d530c9aaf (diff) | |
download | linux-stable-4d5c8aedc8aa6a1f5d1b06eb4f5517dc60dd9440.tar.gz linux-stable-4d5c8aedc8aa6a1f5d1b06eb4f5517dc60dd9440.tar.bz2 linux-stable-4d5c8aedc8aa6a1f5d1b06eb4f5517dc60dd9440.zip |
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: Roman Gushchin <guro@fb.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Diffstat (limited to 'mm/percpu-internal.h')
0 files changed, 0 insertions, 0 deletions