diff options
| author | Caleb Sander Mateos <csander@purestorage.com> | 2026-01-08 02:19:39 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-12 09:16:38 -0700 |
| commit | bfe1255712a3b1c1f7418c5504a1bf53735d3848 (patch) | |
| tree | 10862163989d7883365cca80d162f99ba0b8b02d /include/linux/memory | |
| parent | b2503e936b598b993cb09005194dc77d2fa3f082 (diff) | |
ublk: optimize ublk_user_copy() on daemon task
ublk user copy syscalls may be issued from any task, so they take a
reference count on the struct ublk_io to check whether it is owned by
the ublk server and prevent a concurrent UBLK_IO_COMMIT_AND_FETCH_REQ
from completing the request. However, if the user copy syscall is issued
on the io's daemon task, a concurrent UBLK_IO_COMMIT_AND_FETCH_REQ isn't
possible, so the atomic reference count dance is unnecessary. Check for
UBLK_IO_FLAG_OWNED_BY_SRV to ensure the request is dispatched to the
sever and obtain the request from ublk_io's req field instead of looking
it up on the tagset. Skip the reference count increment and decrement.
Commit 8a8fe42d765b ("ublk: optimize UBLK_IO_REGISTER_IO_BUF on daemon
task") made an analogous optimization for ublk zero copy buffer
registration.
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/memory')
0 files changed, 0 insertions, 0 deletions
