Re: Maple Tree Work

From: Liam R. Howlett
Date: Thu Jul 13 2023 - 11:53:26 EST


* Peng Zhang <zhangpeng.00@xxxxxxxxxxxxx> [230713 05:58]:
> 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 am sure there was a reason.. looking at the documentation, it may have
been to indicate rcu/write locking.. But the entire interface doesn't
fit that reasoning. We can probably align the mt_ and mtree_ all to be
mt_.

If we do, and we probably should, we'll have to change other places in
the kernel and the documentation.

The mas_ is the advanced interface so locking isn't handled, and
internally, the mas_ indicates the first argument is a struct ma_state
pointer.

I can add this to the list as well.

Thanks,
Liam