io_uring: completion cleanups
cover io_uring: completion cleanups
Hi,
A couple of tiny cleanups and 1 revert. I think the revert may be neater if you just drop it from your tree.
Patch 1: small cleanup removing a not-needed
Patch 2: spelling fix
Patch 3: I think I merged this badly, or at least misunderstood the recent changes. It was not needed, and confuses the _post suffix with also deferring.
Dylan Yudaken (3):
io_uring: remove io_req_complete_post_tw
io_uring: spelling fix
io_uring: Revert "io_uring: io_req_complete_post should defer if
available"
io_uring/io_uring.c | 8 +++----- io_uring/io_uring.h | 7 ------- 2 files changed, 3 insertions(+), 12 deletions(-)
base-commit: 43f3ae1898c9c6d907e5b5c1887a90409ff7ad30
Signature · 1 line
2.30.2
PATCH 1/3 io_uring: remove io_req_complete_post_tw
It's only used in one place. Inline it.
--- io_uring/io_uring.c | 2 +- io_uring/io_uring.h | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-)
io_uring/io_uring.c +1 -1
@@ -1521,7 +1521,7 @@ void io_req_task_complete(struct io_kiocb *req, bool *locked)if (*locked)io_req_complete_defer (req);else -io_req_complete_post_tw (req, locked); +io_req_complete_post (req,IO_URING_F_UNLOCKED ); }/*
io_uring/io_uring.h +0 -7
@@ -37,13 +37,6 @@ bool io_aux_cqe(struct io_ring_ctx *ctx, bool defer, u64 user_data, s32 res, u32 bool allow_overflow);void __io_commit_cqring_flush (struct io_ring_ctx *ctx); -static inline void io_req_complete_post_tw (struct io_kiocb *req,bool *locked) -{ -unsigned flags = *locked ?0 :IO_URING_F_UNLOCKED ; - -io_req_complete_post (req, flags); -} -struct page **io_pin_pages (unsigned long ubuf,unsigned long len,int *npages);struct file *io_file_get_normal (struct io_kiocb *req,int fd);
Signature · 1 line
2.30.2
PATCH 2/3 io_uring: spelling fix
In reply to Dylan Yudakens/pushs/pushes/
--- io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/io_uring.c +1 -1
@@ -2708,7 +2708,7 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)* lock(&ep->mtx); * * Users may get EPOLLIN meanwhile seeing nothing in cqring, this -* pushs them to do the flush. +* pushes them to do the flush. */ if (io_cqring_events (ctx) ||io_has_work (ctx))
Signature · 1 line
2.30.2
PATCH 3/3 io_uring: Revert "io_uring: io_req_complete_post should defer if available"
In reply to Dylan YudakenThis is not needed, as everywhere that calls io_req_complete_post already knows it will not be deferring.
This reverts commit 8fa737e0de7d3c4dc3d7cb9a9d9a6362d872c3f3.
--- io_uring/io_uring.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
io_uring/io_uring.c +1 -3
@@ -908,9 +908,7 @@ static void __io_req_complete_post(struct io_kiocb *req)void io_req_complete_post (struct io_kiocb *req,unsigned issue_flags) { -if (issue_flags &IO_URING_F_COMPLETE_DEFER ) { -io_req_complete_defer (req); - }else if (!(issue_flags &IO_URING_F_UNLOCKED ) || +if (!(issue_flags &IO_URING_F_UNLOCKED ) || !(req->ctx->flags &IORING_SETUP_IOPOLL )) {__io_req_complete_post (req); }else {
Signature · 1 line
2.30.2
Re: (subset) [PATCH for-next 0/3] io_uring: completion cleanups
In reply to Dylan YudakenQuoted 9 lines · Dylan Yudaken
A couple of tiny cleanups and 1 revert. I think the revert may be neater if you just drop it from your tree.
Patch 1: small cleanup removing a not-needed
Patch 2: spelling fix
Patch 3: I think I merged this badly, or at least misunderstood the recent changes. It was not needed, and confuses the_postsuffix with also deferring.[...]
Applied, thanks!
[1/3] io_uring: remove io_req_complete_post_tw
commit: 27f35fe9096b183d45ff6f22ad277ddf107d8428
[2/3] io_uring: spelling fix
commit: 10d8bc35416d9e83ffe9644478756281c7bd4f52Best regards,
Signature · 1 line
Jens Axboe