Skip to content

kfree_rcu() improvements for -rcu dev

Joel Fernandes (Google) linux-mm lkml oe-kbuild-all rcu 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18mm/list_lru.c: Rename kvfree_rcu() to local variantmm/list_lru.c+3 -30 replies
2/18rcu: Introduce kvfree_rcu() interfaceinclude/linux/rcupdate.h kernel/rcu/tiny.c kernel/rcu/tree.c+23 -60 replies
3/18rcu: Rename rcu_invoke_kfree_callback/rcu_kfree_callbackinclude/trace/events/rcu.h kernel/rcu/tiny.c kernel/rcu/tree.c+7 -70 replies
4/18rcu: Rename __is_kfree_rcu_offset() macroinclude/linux/rcupdate.h kernel/rcu/tiny.c kernel/rcu/tree.c+6 -60 replies
5/18rcu: Rename kfree_call_rcu() to the kvfree_call_rcu().include/linux/rcupdate.h include/linux/rcutiny.h include/linux/rcutree.h +1 more+10 -100 replies
6/18mm/list_lru.c: Remove kvfree_rcu_local() functionmm/list_lru.c+3 -100 replies
7/18rcu/tree: Simplify debug_objects handlingkernel/rcu/tree.c+13 -171 reply
8/18rcu/tree: Clarify emergency path comment betterkernel/rcu/tree.c+4 -30 replies
9/18rcu/tree: Simplify KFREE_BULK_MAX_ENTR macrokernel/rcu/tree.c+8 -70 replies
10/18rcu/tree: Maintain separate array for vmalloc ptrskernel/rcu/tree.c+108 -716 replies
11/18rcu/tree: Introduce expedited_drain flagkernel/rcu/tree.c+16 -40 replies
12/18rcu/tree: Support reclaim for head-less objectkernel/rcu/tree.c+85 -80 replies
13/18rcu/tiny: Move kvfree_call_rcu() out of headerinclude/linux/rcutiny.h kernel/rcu/tiny.c+7 -50 replies
14/18rcu/tiny: Support reclaim for head-less objectkernel/rcu/tiny.c+156 -10 replies
15/18rcu: Support headless variant in the kvfree_rcu()include/linux/rcupdate.h+34 -40 replies
16/18rcu/tree: Remove extra next variable in kfree worker functionkernel/rcu/tree.c+5 -60 replies
17/18rcu/tree: Simplify is_vmalloc_addr expressionkernel/rcu/tree.c+1 -10 replies
18/18rcu/tree: Make kvfree_rcu() tolerate any alignmentkernel/rcu/tree.c+6 -30 replies

Reviews trailers per patch

13 of 18 patches have a Reviewed-by or Acked-by.

PatchJoel Fernandes (Google)
1/18R-b
2/18R-b
3/18R-b
4/18R-b
5/18R-b
6/18R-b
7/18
8/18
9/18R-b
10/18R-b
11/18R-b
12/18R-b
13/18R-b
14/18R-b
15/18R-b
16/18
17/18
18/18

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

Read the v1 thread

Cover letter [PATCH 00/18] kfree_rcu() improvements for -rcu dev

Hello,
These patches improve kfree_rcu() to support:
- kfree_rcu() headless usage.
- both vmalloc() and slab free'ing support using array of pointers.
- simpler debugobjects handling.

It applies on rcu/dev branch as of March 29th.

Testing with rcuperf shows following changes. The memory footprint reduces and batches go slightly up. This is assumed an acceptable change.

with all patches:
Total time taken by all kfree'ers: 27312964461 ns, loops: 20000, batches: 3120, memory footprint: 211MB Total time taken by all kfree'ers: 26773272309 ns, loops: 20000, batches: 3084, memory footprint: 208M

without:
Total time taken by all kfree'ers: 25711621811 ns, loops: 20000, batches: 2814, memory footprint: 230MB Total time taken by all kfree'ers: 25775800546 ns, loops: 20000, batches: 2755, memory footprint: 230MB

These have been pushed to the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git (branch rcu/kfree)

cgit view:
https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/log/?h=rcu/kfree

thanks,

- Joel

Joel Fernandes (Google) (5):
rcu/tree: Simplify debug_objects handling
rcu/tree: Clarify emergency path comment better rcu/tree: Remove extra next variable in kfree worker function rcu/tree: Simplify is_vmalloc_addr expression rcu/tree: Make kvfree_rcu() tolerate any alignment

Uladzislau Rezki (Sony) (13):
mm/list_lru.c: Rename kvfree_rcu() to local variant
rcu: Introduce kvfree_rcu() interface
rcu: Rename rcu_invoke_kfree_callback/rcu_kfree_callback
rcu: Rename __is_kfree_rcu_offset() macro
rcu: Rename kfree_call_rcu() to the kvfree_call_rcu(). mm/list_lru.c: Remove kvfree_rcu_local() function rcu/tree: Simplify KFREE_BULK_MAX_ENTR macro rcu/tree: Maintain separate array for vmalloc ptrs rcu/tree: Introduce expedited_drain flag rcu/tree: Support reclaim for head-less object rcu/tiny: Move kvfree_call_rcu() out of header rcu/tiny: Support reclaim for head-less object
rcu: Support headless variant in the kvfree_rcu()

include/linux/rcupdate.h   |  53 ++++++-
include/linux/rcutiny.h    |   6 +-
include/linux/rcutree.h    |   2 +-
include/trace/events/rcu.h |   8 +-
kernel/rcu/tiny.c          | 168 +++++++++++++++++++-
kernel/rcu/tree.c          | 315 ++++++++++++++++++++++++++-----------
mm/list_lru.c              |  11 +-
7 files changed, 443 insertions(+), 120 deletions(-)

--
2.26.0.rc2.310.g2932bb562d-goog