From: Liam R. Howlett Date: Mon, 5 Jul 2021 19:32:39 +0000 (-0400) Subject: maple docs X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=06756a461d8ab7ec854663d0179158a05cc17cd7;p=users%2Fjedix%2Flinux-maple.git maple docs Signed-off-by: Liam R. Howlett --- diff --git a/Documentation/core-api/maple-tree.rst b/Documentation/core-api/maple-tree.rst index 8855b79bf6abc..eebb3469db43d 100644 --- a/Documentation/core-api/maple-tree.rst +++ b/Documentation/core-api/maple-tree.rst @@ -97,6 +97,8 @@ Takes RCU read lock: * mtree_load() * mt_find() * mt_for_each() + * mt_next() + * mt_prev() Takes ma_lock internally: * mtree_store() @@ -174,7 +176,12 @@ mas_pause(). Using a maple state allows mas_next() and mas_prev() to function as if the tree was a linked list. With such a high branching factor the amortized performance -penalty is outweighed by cache optimization. +penalty is outweighed by cache optimization. mas_next() will return the next +entry which occurs after the entry at index. mas_prev() will return the +previous entry which occurs before the entry at index. + +mas_find() will find the first entry which exists at or above index on the +first call, and the next entry from every subsequent calls. There are a few extra interfaces provided when using an allocation tree. If you wish to search for a gap within a range, then mas_empty_area() or