From: Andrew Morton <akpm@linux-foundation.org>
To: Chi Zhiling <chizhiling@163.com>
Cc: David Hildenbrand <david@redhat.com>,
willy@infradead.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Chi Zhiling <chizhiling@kylinos.cn>,
Ryan Roberts <ryan.roberts@arm.com>
Subject: Re: [PATCH] readahead: Use folio_nr_pages() instead of shift operation
Date: Sat, 12 Jul 2025 15:25:44 -0700 [thread overview]
Message-ID: <20250712152544.07f236ec277290c70a2a862f@linux-foundation.org> (raw)
In-Reply-To: <661ccfa4-a5ad-4370-a7f5-e17968d8a46e@163.com>
On Sat, 12 Jul 2025 10:23:32 +0800 Chi Zhiling <chizhiling@163.com> wrote:
> On 2025/7/12 00:15, David Hildenbrand wrote:
> > On 10.07.25 08:04, Chi Zhiling wrote:
> >> From: Chi Zhiling <chizhiling@kylinos.cn>
> >>
> >> folio_nr_pages() is faster helper function to get the number of pages
> >> when NR_PAGES_IN_LARGE_FOLIO is enabled.
> >>
> >> Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
> >> ---
> >> mm/readahead.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/mm/readahead.c b/mm/readahead.c
> >> index 95a24f12d1e7..406756d34309 100644
> >> --- a/mm/readahead.c
> >> +++ b/mm/readahead.c
> >> @@ -649,7 +649,7 @@ void page_cache_async_ra(struct readahead_control
> >> *ractl,
> >> * Ramp up sizes, and push forward the readahead window.
> >> */
> >> expected = round_down(ra->start + ra->size - ra->async_size,
> >> - 1UL << folio_order(folio));
> >> + folio_nr_pages(folio));
> >> if (index == expected) {
> >> ra->start += ra->size;
> >> /*
> >
> > This should probably get squashed in Ryans commit?
>
> I have no objection, it's up to Ryan.
"Ryans commit" is now c4602f9fa77f ("mm/readahead: store folio order in
struct file_ra_state") in mm-stable. I'd prefer not to rebase for this!
next prev parent reply other threads:[~2025-07-12 22:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 6:04 [PATCH] readahead: Use folio_nr_pages() instead of shift operation Chi Zhiling
2025-07-11 16:15 ` David Hildenbrand
2025-07-12 2:23 ` Chi Zhiling
2025-07-12 22:25 ` Andrew Morton [this message]
2025-07-14 7:54 ` Ryan Roberts
2025-07-14 8:04 ` David Hildenbrand
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=20250712152544.07f236ec277290c70a2a862f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=chizhiling@163.com \
--cc=chizhiling@kylinos.cn \
--cc=david@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.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;
as well as URLs for NNTP newsgroup(s).