Commit 0337451
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>1 parent 03ec0ed commit 0337451
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2887 | 2887 | | |
2888 | 2888 | | |
2889 | 2889 | | |
2890 | | - | |
| 2890 | + | |
2891 | 2891 | | |
2892 | 2892 | | |
2893 | 2893 | | |
2894 | 2894 | | |
2895 | 2895 | | |
2896 | 2896 | | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
2897 | 2901 | | |
2898 | 2902 | | |
2899 | 2903 | | |
| |||
0 commit comments