Skip to content

Commit 2d74d04

Browse files
isilenceaxboe
authored andcommitted
io_uring: further remove sqpoll limits on opcodes
There are three types of requests that left disabled for sqpoll, namely epoll ctx, statx, and resources update. Since SQPOLL task is now closely mimics a userspace thread, remove the restrictions. Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/909b52d70c45636d8d7897582474ea5aab5eed34.1620990306.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 447c19f commit 2d74d04

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/io_uring.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4035,7 +4035,7 @@ static int io_epoll_ctl_prep(struct io_kiocb *req,
40354035
#if defined(CONFIG_EPOLL)
40364036
if (sqe->ioprio || sqe->buf_index)
40374037
return -EINVAL;
4038-
if (unlikely(req->ctx->flags & (IORING_SETUP_IOPOLL | IORING_SETUP_SQPOLL)))
4038+
if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
40394039
return -EINVAL;
40404040

40414041
req->epoll.epfd = READ_ONCE(sqe->fd);
@@ -4150,7 +4150,7 @@ static int io_fadvise(struct io_kiocb *req, unsigned int issue_flags)
41504150

41514151
static int io_statx_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
41524152
{
4153-
if (unlikely(req->ctx->flags & (IORING_SETUP_IOPOLL | IORING_SETUP_SQPOLL)))
4153+
if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
41544154
return -EINVAL;
41554155
if (sqe->ioprio || sqe->buf_index)
41564156
return -EINVAL;
@@ -5827,8 +5827,6 @@ static int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags)
58275827
static int io_rsrc_update_prep(struct io_kiocb *req,
58285828
const struct io_uring_sqe *sqe)
58295829
{
5830-
if (unlikely(req->ctx->flags & IORING_SETUP_SQPOLL))
5831-
return -EINVAL;
58325830
if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT)))
58335831
return -EINVAL;
58345832
if (sqe->ioprio || sqe->rw_flags)

0 commit comments

Comments
 (0)