linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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 3/4] lib/xarray: introduce a new helper xas_get_order
Date: Tue, 19 Mar 2024 16:52:02 +0000	[thread overview]
Message-ID: <ZfnCsredzl7hcbI1@casper.infradead.org> (raw)
In-Reply-To: <20240319092733.4501-4-ryncsn@gmail.com>

On Tue, Mar 19, 2024 at 05:27:32PM +0800, Kairui Song wrote:
> From: Kairui Song <kasong@tencent.com>
> 
> It can be used after xas_load to check the order of loaded entries.
> Compared to xa_get_order, it saves an XA_STATE and avoid a rewalk.
> 
> Signed-off-by: Kairui Song <kasong@tencent.com>

Brilliant; yes.  I was just looking at this the other day and wondering
why I hadn't done this.

Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>

> +EXPORT_SYMBOL(xas_get_order);

We don't have a module user yet, so I'd hold off on this.  It's an
unusual thing to want to do, and we may never have a modular user.
Also, xas functions are EXPORT_SYMBOL_GPL, not EXPORT_SYMBOL.


  reply	other threads:[~2024-03-19 16:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19  9:27 [PATCH 0/4] mm/filemap: optimize folio adding and splitting Kairui Song
2024-03-19  9:27 ` [PATCH 1/4] mm/filemap: return early if failed to allocate memory for split Kairui Song
2024-03-19 16:46   ` Matthew Wilcox
2024-03-19  9:27 ` [PATCH 2/4] mm/filemap: clean up hugetlb exclusion code Kairui Song
2024-03-19 16:48   ` Matthew Wilcox
2024-03-19  9:27 ` [PATCH 3/4] lib/xarray: introduce a new helper xas_get_order Kairui Song
2024-03-19 16:52   ` Matthew Wilcox [this message]
2024-03-19  9:27 ` [PATCH 4/4] mm/filemap: optimize filemap folio adding Kairui Song
2024-03-19 22:19   ` Matthew Wilcox
2024-03-20  9:06     ` Kairui Song
2024-03-21 18:35       ` 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=ZfnCsredzl7hcbI1@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;
as well as URLs for NNTP newsgroup(s).