Re: [PATCH 4/5] maple_tree: break on convergence in mas_spanning_rebalance()

From: Wei Yang
Date: Fri Nov 15 2024 - 02:14:59 EST


On Thu, Nov 14, 2024 at 12:05:23PM -0500, Sidhartha Kumar wrote:
>This allows support for using the vacant height to calculate the worst
>case number of nodes needed for wr_rebalance operation.
>mas_spanning_rebalance() was seen to perform unnecessary node allocations.
>We can reduce allocations by breaking early during the rebalancing loop
>once we realize that we have ascended to a common ancestor.
>
>Suggested-by: Liam Howlett <liam.howlett@xxxxxxxxxx>
>Signed-off-by: Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx>

I am just about to send a similar patch :-)

Reviewed-by: Wei Yang <richard.weiyang@xxxxxxxxx>

--
Wei Yang
Help you, Help me