[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <083a8ca834fa7c5a0eedf355c684148b289b5135.1763029704.git.asml.silence@gmail.com>
Date: Thu, 13 Nov 2025 10:46:10 +0000
From: Pavel Begunkov <asml.silence@...il.com>
To: io-uring@...r.kernel.org
Cc: asml.silence@...il.com,
axboe@...nel.dk,
netdev@...r.kernel.org,
Pedro Demarchi Gomes <pedrodemargomes@...il.com>
Subject: [PATCH 02/10] io_uring/zcrx: use folio_nr_pages() instead of shift operation
From: Pedro Demarchi Gomes <pedrodemargomes@...il.com>
folio_nr_pages() is a faster helper function to get the number of pages when
NR_PAGES_IN_LARGE_FOLIO is enabled.
Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@...il.com>
Signed-off-by: Pavel Begunkov <asml.silence@...il.com>
---
io_uring/zcrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 635ee4eb5d8d..149bf9d5b983 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -170,7 +170,7 @@ static unsigned long io_count_account_pages(struct page **pages, unsigned nr_pag
if (folio == last_folio)
continue;
last_folio = folio;
- res += 1UL << folio_order(folio);
+ res += folio_nr_pages(folio);
}
return res;
}
--
2.49.0
Powered by blists - more mailing lists