public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH for-next 0/3] io_uring: completion cleanups
@ 2022-11-25 10:34 Dylan Yudaken
  2022-11-25 10:34 ` [PATCH for-next 1/3] io_uring: remove io_req_complete_post_tw Dylan Yudaken
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dylan Yudaken @ 2022-11-25 10:34 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov; +Cc: io-uring, kernel-team, Dylan Yudaken

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
-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH for-next 1/3] io_uring: remove io_req_complete_post_tw
  2022-11-25 10:34 [PATCH for-next 0/3] io_uring: completion cleanups Dylan Yudaken
@ 2022-11-25 10:34 ` Dylan Yudaken
  2022-11-25 10:34 ` [PATCH for-next 2/3] io_uring: spelling fix Dylan Yudaken
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Dylan Yudaken @ 2022-11-25 10:34 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov; +Cc: io-uring, kernel-team, Dylan Yudaken

It's only used in one place. Inline it.

Signed-off-by: Dylan Yudaken <[email protected]>
---
 io_uring/io_uring.c | 2 +-
 io_uring/io_uring.h | 7 -------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 164904e7da25..38589cf380d1 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -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);
 }
 
 /*
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index dcb8e3468f1d..76659d2fc90c 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -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);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH for-next 2/3] io_uring: spelling fix
  2022-11-25 10:34 [PATCH for-next 0/3] io_uring: completion cleanups Dylan Yudaken
  2022-11-25 10:34 ` [PATCH for-next 1/3] io_uring: remove io_req_complete_post_tw Dylan Yudaken
@ 2022-11-25 10:34 ` Dylan Yudaken
  2022-11-25 10:34 ` [PATCH for-next 3/3] io_uring: Revert "io_uring: io_req_complete_post should defer if available" Dylan Yudaken
  2022-11-25 13:13 ` (subset) [PATCH for-next 0/3] io_uring: completion cleanups Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Dylan Yudaken @ 2022-11-25 10:34 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov; +Cc: io-uring, kernel-team, Dylan Yudaken

s/pushs/pushes/

Signed-off-by: Dylan Yudaken <[email protected]>
---
 io_uring/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 38589cf380d1..c1e84ef84bea 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -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))
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH for-next 3/3] io_uring: Revert "io_uring: io_req_complete_post should defer if available"
  2022-11-25 10:34 [PATCH for-next 0/3] io_uring: completion cleanups Dylan Yudaken
  2022-11-25 10:34 ` [PATCH for-next 1/3] io_uring: remove io_req_complete_post_tw Dylan Yudaken
  2022-11-25 10:34 ` [PATCH for-next 2/3] io_uring: spelling fix Dylan Yudaken
@ 2022-11-25 10:34 ` Dylan Yudaken
  2022-11-25 13:13 ` (subset) [PATCH for-next 0/3] io_uring: completion cleanups Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Dylan Yudaken @ 2022-11-25 10:34 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov; +Cc: io-uring, kernel-team, Dylan Yudaken

This is not needed, as everywhere that calls io_req_complete_post
already knows it will not be deferring.

This reverts commit 8fa737e0de7d3c4dc3d7cb9a9d9a6362d872c3f3.

Signed-off-by: Dylan Yudaken <[email protected]>
---
 io_uring/io_uring.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index c1e84ef84bea..d9c9e347346d 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -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 {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: (subset) [PATCH for-next 0/3] io_uring: completion cleanups
  2022-11-25 10:34 [PATCH for-next 0/3] io_uring: completion cleanups Dylan Yudaken
                   ` (2 preceding siblings ...)
  2022-11-25 10:34 ` [PATCH for-next 3/3] io_uring: Revert "io_uring: io_req_complete_post should defer if available" Dylan Yudaken
@ 2022-11-25 13:13 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2022-11-25 13:13 UTC (permalink / raw)
  To: Pavel Begunkov, Dylan Yudaken; +Cc: io-uring, kernel-team

On Fri, 25 Nov 2022 02:34:09 -0800, Dylan Yudaken wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/3] io_uring: remove io_req_complete_post_tw
      commit: 27f35fe9096b183d45ff6f22ad277ddf107d8428
[2/3] io_uring: spelling fix
      commit: 10d8bc35416d9e83ffe9644478756281c7bd4f52

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-25 13:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-25 10:34 [PATCH for-next 0/3] io_uring: completion cleanups Dylan Yudaken
2022-11-25 10:34 ` [PATCH for-next 1/3] io_uring: remove io_req_complete_post_tw Dylan Yudaken
2022-11-25 10:34 ` [PATCH for-next 2/3] io_uring: spelling fix Dylan Yudaken
2022-11-25 10:34 ` [PATCH for-next 3/3] io_uring: Revert "io_uring: io_req_complete_post should defer if available" Dylan Yudaken
2022-11-25 13:13 ` (subset) [PATCH for-next 0/3] io_uring: completion cleanups Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox