Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Jan 29, 2026

Pull request for series with
subject: ublk: restore auto buf unregister refcount optimization
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1048257

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: 4ded82c
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048257
version: 1

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: 1171e38
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048257
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1048257=>for-next branch from ceaabb9 to 648d151 Compare January 29, 2026 09:15
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: d4b7351
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048257
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1048257=>for-next branch from 648d151 to 8236fa6 Compare January 29, 2026 20:23
Commit 1ceeedb ("ublk: optimize UBLK_IO_UNREGISTER_IO_BUF on daemon
task") optimized ublk request buffer unregistration to use a non-atomic
reference count decrement when performed on the ublk_io's daemon task.
The optimization applied to auto buffer unregistration, which happens as
part of handling UBLK_IO_COMMIT_AND_FETCH_REQ on the daemon task.
However, commit b749965 ("ublk: remove ublk_commit_and_fetch()")
reordered the ublk_sub_req_ref() for the completed request before the
io_buffer_unregister_bvec() call. As a result, task_registered_buffers
is already 0 when io_buffer_unregister_bvec() calls ublk_io_release()
and the non-atomic refcount optimization doesn't apply.
Move the io_buffer_unregister_bvec() call back to before
ublk_need_complete_req() to restore the reference counting optimization.

Signed-off-by: Caleb Sander Mateos <[email protected]>
Fixes: b749965 ("ublk: remove ublk_commit_and_fetch()")
Reviewed-by: Ming Lei <[email protected]>
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 30, 2026

Upstream branch: d4b7351
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048257
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1048257=>for-next branch from 8236fa6 to 85e90e8 Compare January 30, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant