Re: [PATCH] readahead: Use folio_nr_pages() instead of shift operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.07.25 08:04, Chi Zhiling wrote:
From: Chi Zhiling <chizhiling@xxxxxxxxxx>

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@xxxxxxxxxx>
---
  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?

LGTM

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux