mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 00:12:52 +00:00
block: null_blk: batched complete poll requests
Complete poll requests via blk_mq_add_to_batch() and blk_mq_end_request_batch(), so that we can cover batched complete code path by running null_blk test. Meantime this way shows ~14% IOPS boost on 't/io_uring /dev/nullb0' in my test. Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
@@ -1574,7 +1574,9 @@ static int null_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
|
||||
cmd = blk_mq_rq_to_pdu(req);
|
||||
cmd->error = null_process_cmd(cmd, req_op(req), blk_rq_pos(req),
|
||||
blk_rq_sectors(req));
|
||||
end_cmd(cmd);
|
||||
if (!blk_mq_add_to_batch(req, iob, cmd->error,
|
||||
blk_mq_end_request_batch))
|
||||
end_cmd(cmd);
|
||||
nr++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user