From: Jason Gunthorpe <jgg@ziepe.ca>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: akpm@linux-foundation.org, willy@infradead.org,
michel@lespinasse.org, linux-mm@kvack.org
Subject: Re: [PATCH 7/7] lib/interval_tree: fix the comment of interval_tree_span_iter_next_gap()
Date: Tue, 4 Mar 2025 10:12:30 -0400 [thread overview]
Message-ID: <20250304141230.GX5011@ziepe.ca> (raw)
In-Reply-To: <20250304011952.29182-8-richard.weiyang@gmail.com>
On Tue, Mar 04, 2025 at 01:19:52AM +0000, Wei Yang wrote:
> The comment of interval_tree_span_iter_next_gap() is not exact, nodes[1]
> is not always !NULL.
>
> There are threes cases here. If there is an interior hole, the statement
> is correct. If there is a tailing hole or the contiguous used range span
> to the end, nodes[1] is NULL.
>
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
> CC: Matthew Wilcox <willy@infradead.org>
> CC: Michel Lespinasse <michel@lespinasse.org>
> CC: Jason Gunthorpe <jgg@ziepe.ca>
> ---
> lib/interval_tree.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> @@ -20,9 +20,15 @@ EXPORT_SYMBOL_GPL(interval_tree_iter_next);
> /*
> * Roll nodes[1] into nodes[0] by advancing nodes[1] to the end of a contiguous
> * span of nodes. This makes nodes[0]->last the end of that contiguous used span
> + * indexes that started at the original nodes[1]->start.
"span [of] indexes"
Jason
next prev parent reply other threads:[~2025-03-04 14:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 1:19 [PATCH 0/7] lib/interval_tree: add some test cases and cleanup Wei Yang
2025-03-04 1:19 ` [PATCH 1/7] lib/rbtree: enable userland test suite for rbtree related data structure Wei Yang
2025-03-04 1:46 ` Matthew Wilcox
2025-03-04 3:04 ` Wei Yang
2025-03-04 1:19 ` [PATCH 2/7] lib/rbtree: split tests Wei Yang
2025-03-04 1:19 ` [PATCH 3/7] lib/rbtree: add random seed Wei Yang
2025-03-05 3:05 ` kernel test robot
2025-03-05 9:10 ` Wei Yang
2025-03-06 11:34 ` kernel test robot
2025-03-07 1:55 ` Wei Yang
2025-03-07 2:36 ` kernel test robot
2025-03-04 1:19 ` [PATCH 4/7] lib/interval_tree: add test case for interval_tree_iter_xxx() helpers Wei Yang
2025-03-04 1:19 ` [PATCH 5/7] lib/interval_tree: add test case for span iteration Wei Yang
2025-03-04 1:19 ` [PATCH 6/7] lib/interval_tree: skip the check before go to the right subtree Wei Yang
2025-03-04 1:19 ` [PATCH 7/7] lib/interval_tree: fix the comment of interval_tree_span_iter_next_gap() Wei Yang
2025-03-04 14:12 ` Jason Gunthorpe [this message]
2025-03-05 0:57 ` Wei Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250304141230.GX5011@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=michel@lespinasse.org \
--cc=richard.weiyang@gmail.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox