From: Matthew Wilcox <willy@infradead.org>
To: Kairui Song <kasong@tencent.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] lib/xarray: introduce a new helper xas_get_order
Date: Mon, 15 Apr 2024 20:06:05 +0100 [thread overview]
Message-ID: <Zh16ndI5aN8r4yOR@casper.infradead.org> (raw)
In-Reply-To: <20240415171857.19244-4-ryncsn@gmail.com>
On Tue, Apr 16, 2024 at 01:18:55AM +0800, Kairui Song wrote:
> /**
> - * xa_get_order() - Get the order of an entry.
> - * @xa: XArray.
> - * @index: Index of the entry.
> + * xas_get_order() - Get the order of an loaded entry after xas_load.
I'd just leave that as "Get the order of an entry." as it doesn't have
to be after calling xas_load(), it could be from any other operation
that moves xas. Also this is the short description!
> if (slot >= XA_CHUNK_SIZE)
> break;
> - if (!xa_is_sibling(xas.xa_node->slots[slot]))
> + if (!xa_is_sibling(xas->xa_node->slots[slot]))
Could you fold in this change I have locally?
- if (!xa_is_sibling(xas->xa_node->slots[slot]))
+ if (!xa_is_sibling(xa_entry(xas.xa, xas.xa_node, slot)))
That fixes a sparse warning which existed before your modifications.
next prev parent reply other threads:[~2024-04-15 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 17:18 [PATCH v3 0/4] mm/filemap: optimize folio adding and splitting Kairui Song
2024-04-15 17:18 ` [PATCH v3 1/4] mm/filemap: return early if failed to allocate memory for split Kairui Song
2024-04-15 17:18 ` [PATCH v3 2/4] mm/filemap: clean up hugetlb exclusion code Kairui Song
2024-04-15 17:18 ` [PATCH v3 3/4] lib/xarray: introduce a new helper xas_get_order Kairui Song
2024-04-15 19:06 ` Matthew Wilcox [this message]
2024-04-16 3:51 ` Kairui Song
2024-04-15 17:18 ` [PATCH v3 4/4] mm/filemap: optimize filemap folio adding Kairui Song
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=Zh16ndI5aN8r4yOR@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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