[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <hc3kari6hxfw6coyl24v56ynn4djvpzrln4eltctiwkafv47my@rbv4jxquriis>
Date: Thu, 11 Sep 2025 22:20:54 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Suren Baghdasaryan <surenb@...gle.com>, Christoph Lameter <cl@...two.org>,
David Rientjes <rientjes@...gle.com>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Harry Yoo <harry.yoo@...cle.com>, Uladzislau Rezki <urezki@...il.com>,
Sidhartha Kumar <sidhartha.kumar@...cle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
maple-tree@...ts.infradead.org
Subject: Re: [PATCH v8 15/23] maple_tree: use percpu sheaves for
maple_node_cache
* Vlastimil Babka <vbabka@...e.cz> [250910 04:02]:
> Setup the maple_node_cache with percpu sheaves of size 32 to hopefully
> improve its performance. Note this will not immediately take advantage
> of sheaf batching of kfree_rcu() operations due to the maple tree using
> call_rcu with custom callbacks. The followup changes to maple tree will
> change that and also make use of the prefilled sheaves functionality.
>
> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@...cle.com>
> Reviewed-by: Suren Baghdasaryan <surenb@...gle.com>
> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
Reviewed-by: Liam R. Howlett <Liam.Howlett@...cle.com>
> ---
> lib/maple_tree.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 4f0e30b57b0cef9e5cf791f3f64f5898752db402..d034f170ac897341b40cfd050b6aee86b6d2cf60 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -6040,9 +6040,14 @@ bool mas_nomem(struct ma_state *mas, gfp_t gfp)
>
> void __init maple_tree_init(void)
> {
> + struct kmem_cache_args args = {
> + .align = sizeof(struct maple_node),
> + .sheaf_capacity = 32,
> + };
> +
> maple_node_cache = kmem_cache_create("maple_node",
> - sizeof(struct maple_node), sizeof(struct maple_node),
> - SLAB_PANIC, NULL);
> + sizeof(struct maple_node), &args,
> + SLAB_PANIC);
> }
>
> /**
>
> --
> 2.51.0
>
>
> --
> maple-tree mailing list
> maple-tree@...ts.infradead.org
> https://lists.infradead.org/mailman/listinfo/maple-tree
Powered by blists - more mailing lists