From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 1/6] io_uring: simplify io_task_match()
Date: Fri, 6 Nov 2020 13:00:21 +0000 [thread overview]
Message-ID: <604ca562af130b879a4cfa4de6b11ef7d3b8dd7b.1604667122.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
If IORING_SETUP_SQPOLL is set all requests belong to the corresponding
SQPOLL task, so skip task checking in that case and always match.
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 568ece369a1a..74bb5cb9697c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1562,11 +1562,7 @@ static bool io_task_match(struct io_kiocb *req, struct task_struct *tsk)
if (!tsk || req->task == tsk)
return true;
- if (ctx->flags & IORING_SETUP_SQPOLL) {
- if (ctx->sq_data && req->task == ctx->sq_data->thread)
- return true;
- }
- return false;
+ return (ctx->flags & IORING_SETUP_SQPOLL);
}
/*
--
2.24.0
next prev parent reply other threads:[~2020-11-06 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 13:00 [PATCH for-next 0/6] cleanup task/files cancel Pavel Begunkov
2020-11-06 13:00 ` Pavel Begunkov [this message]
2020-11-06 13:00 ` [PATCH 2/6] io_uring: add a {task,files} pair matching helper Pavel Begunkov
2020-11-06 13:00 ` [PATCH 3/6] io_uring: cancel only requests of current task Pavel Begunkov
2020-11-06 13:00 ` [PATCH 4/6] io_uring: don't iterate io_uring_cancel_files() Pavel Begunkov
2020-11-06 13:00 ` [PATCH 5/6] io_uring: pass files into kill timeouts/poll Pavel Begunkov
2020-11-06 13:00 ` [PATCH 6/6] io_uring: always batch cancel in *cancel_files() Pavel Begunkov
2020-11-09 14:43 ` [PATCH for-next 0/6] cleanup task/files cancel Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=604ca562af130b879a4cfa4de6b11ef7d3b8dd7b.1604667122.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox