Messages in this thread | | | Date | Sun, 9 Sep 2018 12:07:14 -0700 | From | Matthew Wilcox <> | Subject | Re: [PATCH] radix-tree: optimization for radix_tree_init_maxnodes |
| |
On Sun, Sep 09, 2018 at 09:21:00PM +0800, Wang Long wrote: > if i == 0, height_to_maxnodes[i] = 0, > if i >= 1, height_to_maxnodes[i] = height_to_maxnodes[i-1] > + __maxindex(i-1) + 1. > > so delete height_to_maxindex and optimize the calculation of > height_to_maxnodes array.
Thanks for your patch. Unfortunately, this entire function is scheduled for deletion, so I won't be applying it.
If you're interested in the radix tree, I'd recommend looking at its replacement, the XArray. The current version is at http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/xarray but I'll be pushing another version out in the next few days.
| |