Skip to content

Commit a0169c3

Browse files
pedrodemargomesaxboe
authored andcommitted
io_uring/zcrx: use folio_nr_pages() instead of shift operation
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@gmail.com> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f0243d2 commit a0169c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/zcrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static unsigned long io_count_account_pages(struct page **pages, unsigned nr_pag
170170
if (folio == last_folio)
171171
continue;
172172
last_folio = folio;
173-
res += 1UL << folio_order(folio);
173+
res += folio_nr_pages(folio);
174174
}
175175
return res;
176176
}

0 commit comments

Comments
 (0)