summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorCaleb Sander Mateos <csander@purestorage.com>2026-08-03 15:14:40 -0600
committerJens Axboe <axboe@kernel.dk>2026-08-03 20:32:10 -0600
commita8a79eba22dc4c11f2877bcf9e8557f6d95541ac (patch)
tree518bb14378d6aa58b9f7fb3c071147a8d065599b /tools/perf/scripts/python
parentd61d0f95e686be015cfaf193c0ae15156d1a0cc4 (diff)
ublk: lift checks out of ublk_{,un}map_io()
ublk_map_io() and ublk_unmap_io() are no-ops for ublk devices that enable user copy or zero copy, as well as for requests without data to copy in the given direction. However, the implementation is a bit convoluted, returning the full request data length and relying on the caller to check the return value against the request length. UBLK_F_SHMEM_ZC recently added branches to skip the ublk_{,un}map_io() call for I/Os using a shared-memory buffer. This is a more logical place for the device need_map and the ublk_need_{,un}map_req() checks, so move them there from ublk_{,un}map_io(). Checking these conditions early also skips the expensive pointer-chasing for the ublk_iod_is_shmem_zc() check in __ublk_complete_rq() for the common case of a ublk device using user copy or zero copy. Drop the req_op() filter in __ublk_complete_rq(), as it's redundant with the ublk_need_unmap_req() check. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <tom.leiming@gmail.com> Link: https://patch.msgid.link/20260803211441.2538144-9-csander@purestorage.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions