summaryrefslogtreecommitdiff
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorCaleb Sander Mateos <csander@purestorage.com>2025-11-06 20:16:46 +0300
committerJens Axboe <axboe@kernel.dk>2025-11-07 02:26:04 +0300
commit2299ceec364eecdc0a5b4ec80c757551d130389c (patch)
tree1fb9844bf73f08c54d533caa2be9581dddcac2a1 /include/linux/platform_data
parent15638d52cbcf6e969f4a5e2757b118355db583f3 (diff)
downloadlinux-2299ceec364eecdc0a5b4ec80c757551d130389c.tar.xz
ublk: use copy_{to,from}_iter() for user copy
ublk_copy_user_pages()/ublk_copy_io_pages() currently uses iov_iter_get_pages2() to extract the pages from the iov_iter and memcpy()s between the bvec_iter and the iov_iter's pages one at a time. Switch to using copy_to_iter()/copy_from_iter() instead. This avoids the user page reference count increments and decrements and needing to split the memcpy() at user page boundaries. It also simplifies the code considerably. Ming reports a 40% throughput improvement when issuing I/O to the selftests null ublk server with zero-copy disabled. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/platform_data')
0 files changed, 0 insertions, 0 deletions