]> git.baikalelectronics.ru Git - kernel.git/commit
slub: add missing kmem cgroup support to kmem_cache_free_bulk
authorJesper Dangaard Brouer <brouer@redhat.com>
Fri, 20 Nov 2015 23:57:55 +0000 (15:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Nov 2015 19:58:44 +0000 (11:58 -0800)
commit917a12c97ae4a494a85920075ada4891d46818a1
treeaf0d474640b5c70e74507a8195b580f47faf52f0
parentd327fb8c7d4b2db1d4a50d8f017bad2dbab7ab4e
slub: add missing kmem cgroup support to kmem_cache_free_bulk

Initial implementation missed support for kmem cgroup support in
kmem_cache_free_bulk() call, add this.

If CONFIG_MEMCG_KMEM is not enabled, the compiler should be smart enough
to not add any asm code.

Incoming bulk free objects can belong to different kmem cgroups, and
object free call can happen at a later point outside memcg context.  Thus,
we need to keep the orig kmem_cache, to correctly verify if a memcg object
match against its "root_cache" (s->memcg_params.root_cache).

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reviewed-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>
mm/slub.c