HomeFreeBSD

abd: add page iterator

Description

abd: add page iterator

The regular ABD iterators yield data buffers, so they have to map and
unmap pages into kernel memory. If the caller only wants to count
chunks, or can use page pointers directly, then the map/unmap is just
unnecessary overhead.

This adds adb_iterate_page_func, which yields unmapped struct page
instead.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Closes #15533
Closes #15588
(cherry picked from commit 390b448726c580999dd337be7a40b0e95cf1d50b)

Details

Provenance
rob.norris_klarasystems.comAuthored on Dec 11 2023, 5:05 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 28 2024, 8:29 PM
Parents
rG220bb7341eb4: linux 5.4 compat: page_size()
Branches
Unknown
Tags
Unknown

Event Timeline