mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
io_uring/uring_cmd: skip io_uring_cmd_issue_blocking() task work
io_uring_cmd_issue_blocking() is only called from blk_cmd_complete(), which is already a task work callback. However, it queues another task work item, to call io_queue_iowq(). Just call io_queue_iowq() directly to skip the CPU cost and latency of the redundant task work proxying. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Link: https://patch.msgid.link/20260702184847.1709378-1-csander@purestorage.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
4d327bbd1c
commit
13b0742fd0
|
|
@ -407,7 +407,7 @@ static void io_prep_async_link(struct io_kiocb *req)
|
|||
}
|
||||
}
|
||||
|
||||
static void io_queue_iowq(struct io_kiocb *req)
|
||||
void io_queue_iowq(struct io_kiocb *req)
|
||||
{
|
||||
struct io_uring_task *tctx = req->tctx;
|
||||
|
||||
|
|
@ -435,17 +435,6 @@ static void io_queue_iowq(struct io_kiocb *req)
|
|||
io_wq_enqueue(tctx->io_wq, &req->work);
|
||||
}
|
||||
|
||||
static void io_req_queue_iowq_tw(struct io_tw_req tw_req, io_tw_token_t tw)
|
||||
{
|
||||
io_queue_iowq(tw_req.req);
|
||||
}
|
||||
|
||||
void io_req_queue_iowq(struct io_kiocb *req)
|
||||
{
|
||||
req->io_task_work.func = io_req_queue_iowq_tw;
|
||||
io_req_task_work_add(req);
|
||||
}
|
||||
|
||||
unsigned io_linked_nr(struct io_kiocb *req)
|
||||
{
|
||||
struct io_kiocb *tmp;
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ __cold void io_uring_drop_tctx_refs(struct task_struct *task);
|
|||
|
||||
int io_ring_add_registered_file(struct io_uring_task *tctx, struct file *file,
|
||||
int start, int end);
|
||||
void io_req_queue_iowq(struct io_kiocb *req);
|
||||
void io_queue_iowq(struct io_kiocb *req);
|
||||
|
||||
int io_poll_issue(struct io_kiocb *req, io_tw_token_t tw);
|
||||
int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr);
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void io_uring_cmd_issue_blocking(struct io_uring_cmd *ioucmd)
|
|||
{
|
||||
struct io_kiocb *req = cmd_to_io_kiocb(ioucmd);
|
||||
|
||||
io_req_queue_iowq(req);
|
||||
io_queue_iowq(req);
|
||||
}
|
||||
|
||||
int io_cmd_poll_multishot(struct io_uring_cmd *cmd,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user