diff --git a/Documentation/cgroup-v1/memory.txt b/Documentation/cgroup-v1/memory.txt index 7017b44f0bde218db6cedb2b120409c48dd87e9d..d31b7cd5a81c83dcf6a27edabb0d2221f5713eec 100644 --- a/Documentation/cgroup-v1/memory.txt +++ b/Documentation/cgroup-v1/memory.txt @@ -79,6 +79,9 @@ Brief summary of control files. memory.numa_stat # show the number of memory usage per numa node memory.kmem.limit_in_bytes # set/show hard limit for kernel memory + This knob is deprecated and shouldn't be + used. It is planned that this be removed in + the foreseeable future. memory.kmem.usage_in_bytes # show current kernel memory allocation memory.kmem.failcnt # show the number of kernel memory usage hits limits memory.kmem.max_usage_in_bytes # show max kernel memory usage recorded diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 99767b540b16fa03547007bf1a3242aa304e3218..4e9c5f2387030d29d9f696d2061c414e52ccce4d 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3279,6 +3279,9 @@ static ssize_t mem_cgroup_write(struct kernfs_open_file *of, ret = mem_cgroup_resize_max(memcg, nr_pages, true); break; case _KMEM: + pr_warn_once("kmem.limit_in_bytes is deprecated and will be removed. " + "Please report your usecase to linux-mm@kvack.org if you " + "depend on this functionality.\n"); ret = memcg_update_kmem_max(memcg, nr_pages); break; case _TCP: