Skip to content

SLUB bulk API interactions with kmem cgroup

Jesper Dangaard Brouer linux-mm 3 versions – In review

Get series with b4
b4 am 20151113105558.32536.63240.stgit@firesoul

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyIn review
  2. v32 patches 14 repliesSuperseded
  3. v22 patches 9 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2slub: fix kmem cgroup bug in kmem_cache_alloc_bulkmm/slub.c+22 -181 reply
2/2slub: add missing kmem cgroup support to kmem_cache_free_bulkmm/slub.c+5 -10 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchVladimir Davydov
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH V4 0/2] SLUB bulk API interactions with kmem cgroup

Added correct support for kmem cgroup interaction with SLUB bulk API.

Kernel tested with CONFIG_MEMCG_KMEM=y, and memcg setup[4] provide by Vladimir Davydov. And with my network stack use-case patchset applied, to actually activate the API.

Patch01: I've verified the loop in slab_post_alloc_hook() gets removed
by the compiler (when no debug options defined). This was actually tricky due to kernel gcc compile options, and I wrote a small program to figure this out [1].
Also tested memory exhaustion[3] to verify error: (label) code path.

Patch02: If CONFIG_MEMCG_KMEM is enabled, we no longer handle error
cases like passing of NULL pointers in the array to free. The "try_crash" mode test of module slab_bulk_test03 [2] have been adjusted.

Kernel config wise, ran with combinations of:
CONFIG_DEBUG_KMEMLEAK, CONFIG_KASAN and CONFIG_MEMCG_KMEM (Explicitly disabled/avoided CONFIG_KMEMCHECK)

[1] https://github.com/netoptimizer/network-testing/blob/master/src/compiler_test01.c
[2] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/mm/slab_bulk_test03.c
[3] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/mm/slab_bulk_test04_exhaust_mem.c
[4] http://thread.gmane.org/gmane.linux.kernel.mm/140860/focus=140865

---

Jesper Dangaard Brouer (2):
slub: fix kmem cgroup bug in kmem_cache_alloc_bulk
slub: add missing kmem cgroup support to kmem_cache_free_bulk

 mm/slub.c |   46 +++++++++++++++++++++++++++-------------------
 1 file changed, 27 insertions(+), 19 deletions(-)

--

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>