]> www.infradead.org Git - users/hch/misc.git/commit
block: introduce folio awareness and add a bigger size from folio
authorKundan Kumar <kundan.kumar@samsung.com>
Wed, 11 Sep 2024 06:49:33 +0000 (12:19 +0530)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 Sep 2024 13:24:01 +0000 (07:24 -0600)
commited9832bc08db29874600eb066b74918fe6fc2060
treefbbdba912d65ccaa3e5ab9fa90d2d21c28fba4d9
parent7de98954687fe152c5f38afd719b3fdf9f34020a
block: introduce folio awareness and add a bigger size from folio

Add a bigger size from folio to bio and skip merge processing for pages.

Fetch the offset of page within a folio. Depending on the size of folio
and folio_offset, fetch a larger length. This length may consist of
multiple contiguous pages if folio is multiorder.

Using the length calculate number of pages which will be added to bio and
increment the loop counter to skip those pages.

This technique helps to avoid overhead of merging pages which belong to
same large order folio.

Also folio-ize the functions bio_iov_add_page() and
bio_iov_add_zone_append_page()

Signed-off-by: Kundan Kumar <kundan.kumar@samsung.com>
Tested-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20240911064935.5630-3-kundan.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c