diff options
author | Vladimir Davydov <vdavydov@virtuozzo.com> | 2015-11-06 03:45:14 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-06 04:34:48 +0100 |
commit | cd918c557439c8f0750f64883367aeff264b5fd8 (patch) | |
tree | 72487956b6483041f2591c42898909f3a75b4f1b /tools/vm | |
parent | mm/slab_common.c: clear pointers to per memcg caches on destroy (diff) | |
download | linux-cd918c557439c8f0750f64883367aeff264b5fd8.tar.xz linux-cd918c557439c8f0750f64883367aeff264b5fd8.zip |
mm/slab_common.c: do not warn that cache is busy on destroy more than once
Currently, when kmem_cache_destroy() is called for a global cache, we
print a warning for each per memcg cache attached to it that has active
objects (see shutdown_cache). This is redundant, because it gives no new
information and only clutters the log. If a cache being destroyed has
active objects, there must be a memory leak in the module that created the
cache, and it does not matter if the cache was used by users in memory
cgroups or not.
This patch moves the warning from shutdown_cache(), which is called for
shutting down both global and per memcg caches, to kmem_cache_destroy(),
so that the warning is only printed once if there are objects left in the
cache being destroyed.
Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/vm')
0 files changed, 0 insertions, 0 deletions