]> 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>
Fri, 17 Jan 2025 15:57:36 +0000 (16:57 +0100)
commit0de4dd47f35179de4d4dc516e8f57cde4314414c
tree7a9f315c84df77b8cb2ef103e8c54b16e67c8456
parentec8b102537dcd5e9cb7b968df37eea20d11acc57
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