]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Speed up reverse allocation walks.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 3 Dec 2020 17:04:18 +0000 (12:04 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:33:32 +0000 (12:33 -0500)
commitfecef1f5716f1f239dae3a1cc50298fce0559525
tree3bb7a6bb782abb02ea5a5086f2bc7cca19460f4e
parent33760b4118b114ef9f181d2ebebbabd49e612a16
maple_tree: Speed up reverse allocation walks.

Rewrite loops to be quicker by removing special cases.
Also skip the next slot if a leaf has a gap that is not large enough.

Benchmarks of BENCK_AWALK below:

Old:
./maple  13.57s user 0.00s system 99% cpu 13.596 total

New:
./maple  11.87s user 0.01s system 99% cpu 11.936 total

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c