]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: use percpu sheaves for maple_node_cache
authorVlastimil Babka <vbabka@suse.cz>
Fri, 14 Feb 2025 16:27:46 +0000 (17:27 +0100)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 3 Mar 2025 18:59:17 +0000 (13:59 -0500)
commite1ef9835ef04d444f453a3771c69ce369aaf51a0
tree536d201e1050f4da9037543cf641f15749720d09
parent1c109c8258836a0b7b2978fa210f3b53e0df7877
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