]> 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>
Wed, 11 Jun 2025 14:03:38 +0000 (16:03 +0200)
commit724027f193bd6452d3a1fd6b8f564e1c8175442a
tree77c1e7d14f8618ec752dae219ebeab3c0798b98a
parent9b9209c992c815dcde4236aac9ffa219722048fe
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>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
lib/maple_tree.c