]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: use percpu sheaves for maple_node_cache
authorVlastimil Babka <vbabka@suse.cz>
Mon, 7 Aug 2023 18:52:02 +0000 (20:52 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Tue, 12 Nov 2024 16:19:14 +0000 (17:19 +0100)
commit71e9a5e25b918e73eec6a2ebf9c8cb7d017956de
tree1e70fbff41118d54e4b887b6e4c9cfc2407c59a3
parentaa5c7eeb8ef085de09683cac3d58c736f35afb90
maple_tree: use percpu sheaves for maple_node_cache

Setup the maple_node_cache with percpu sheaves of size 32 to hopefully
improve its performance. Change the single node rcu freeing in
ma_free_rcu() to use kfree_rcu() instead of the custom callback, which
allows the rcu_free sheaf batching to be used. Note there are other
users of mt_free_rcu() where larger parts of maple tree are submitted to
call_rcu() as a whole, and that cannot use the rcu_free sheaf, but it's
still possible for maple nodes freed this way to be reused via the barn,
even if only some cpus are allowed to process rcu callbacks.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
lib/maple_tree.c