Conversation
Collaborator
ming1
commented
Feb 1, 2026
- support UBLK_F_BATCH_IO feature
5ebd1df to
9738ca0
Compare
Add support for batch IO mode which uses batch-based operations instead of per-tag FETCH/COMMIT_AND_FETCH: - UBLK_U_IO_PREP_IO_CMDS: One-time prep with buffer info - UBLK_U_IO_FETCH_IO_CMDS: Multishot fetch returning 2-byte tags - UBLK_U_IO_COMMIT_IO_CMDS: Batch commit of completed IOs Key implementation details: - Add batch structures (ublk_batch_elem, batch_commit_buf, batch_fetch_buf) - Extend _ublksrv_queue with batch IO fields for double-buffered fetch and commit operations - Implement io_uring buffer rings for multishot fetch commands - Add UBLKSRV_QUEUE_BATCH_IO queue state flag - Handle multishot command completion correctly: only decrement cmd_inflight when command truly ends (no IORING_CQE_F_MORE or error) The batch mode is transparent to targets - ublksrv_complete_io() routes internally to batch commit buffers when UBLK_F_BATCH_IO is set. Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Add command line option to enable UBLK_F_BATCH_IO mode: - Add -b short option and --batch-io long option - Check kernel feature support before enabling - Update help text to document the new option Signed-off-by: Ming Lei <tom.leiming@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.