Re: Maple Tree Work

From: Peng Zhang
Date: Fri Jul 14 2023 - 09:33:00 EST




在 2023/7/14 20:57, Matthew Wilcox 写道:
On Thu, Jul 13, 2023 at 05:58:13PM +0800, Peng Zhang wrote:
I have a question I want to discuss here. I noticed that the interface
of maple tree has three different prefixes, namely mtree_*, mt_*, mas_*.
I am curious why the interfaces prefixed with mtree_* and mt_* cannot be
unified? I think they can be changed to mtree_* to avoid two different
prefixes.

I haven't worried about this too much. The long-term goal is to use
the maple tree data structure to replace the radix tree data structure
underlying the xarray and use the xarray API to access the maple tree.
The xarray API will need some enhancements to make this work, but churning
the maple tree API doesn't seem like a good use of effort.

If there are two prefixes, mt_ and mtree_, I will be confused which
prefix to use when adding a new API. Users will also be confused when
they see the two prefixes mt_ and mtree_. However, renaming the API
is not a good thing either.