IO-Uring Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/1] io_uring: Remove extra io_commit_sqring()
@ 2019-11-06 18:12 Pavel Begunkov
  2019-11-06 18:17 ` Pavel Begunkov
  2019-11-06 18:19 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Begunkov @ 2019-11-06 18:12 UTC (permalink / raw)
  To: Jens Axboe, io-uring, linux-block; +Cc: Bob Liu

io_submit_sqes() calls io_commit_sqring() at the end, so there is no
need for sq_thread to repeat it.

Fixes: 09c0eb1f1b93b9cf ("io_uring: Merge io_submit_sqes and
io_ring_submit").

Reported-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 fs/io_uring.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index ba77475c1cec..6524898831e0 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2868,9 +2868,6 @@ static int io_sq_thread(void *data)
 		to_submit = min(to_submit, ctx->sq_entries);
 		inflight += io_submit_sqes(ctx, to_submit, NULL, -1, &cur_mm,
 					   true);
-
-		/* Commit SQ ring head once we've consumed all SQEs */
-		io_commit_sqring(ctx);
 	}
 
 	set_fs(old_fs);
-- 
2.23.0


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

* Re: [PATCH 1/1] io_uring: Remove extra io_commit_sqring()
  2019-11-06 18:12 [PATCH 1/1] io_uring: Remove extra io_commit_sqring() Pavel Begunkov
@ 2019-11-06 18:17 ` Pavel Begunkov
  2019-11-06 18:19 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Begunkov @ 2019-11-06 18:17 UTC (permalink / raw)
  To: Jens Axboe, io-uring, linux-block; +Cc: Bob Liu

[-- Attachment #1.1: Type: text/plain, Size: 1031 bytes --]

This was noticed by Bob, though I haven't had time to fix and resend
the cleanup patches before they were applied. 

On 06/11/2019 21:12, Pavel Begunkov wrote:
> io_submit_sqes() calls io_commit_sqring() at the end, so there is no
> need for sq_thread to repeat it.
> 
> Fixes: 09c0eb1f1b93b9cf ("io_uring: Merge io_submit_sqes and
> io_ring_submit").
> 
> Reported-by: Bob Liu <bob.liu@oracle.com>
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
> ---
>  fs/io_uring.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index ba77475c1cec..6524898831e0 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -2868,9 +2868,6 @@ static int io_sq_thread(void *data)
>  		to_submit = min(to_submit, ctx->sq_entries);
>  		inflight += io_submit_sqes(ctx, to_submit, NULL, -1, &cur_mm,
>  					   true);
> -
> -		/* Commit SQ ring head once we've consumed all SQEs */
> -		io_commit_sqring(ctx);
>  	}
>  
>  	set_fs(old_fs);
> 

-- 
Pavel Begunkov


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/1] io_uring: Remove extra io_commit_sqring()
  2019-11-06 18:12 [PATCH 1/1] io_uring: Remove extra io_commit_sqring() Pavel Begunkov
  2019-11-06 18:17 ` Pavel Begunkov
@ 2019-11-06 18:19 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2019-11-06 18:19 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring, linux-block; +Cc: Bob Liu

On 11/6/19 11:12 AM, Pavel Begunkov wrote:
> io_submit_sqes() calls io_commit_sqring() at the end, so there is no
> need for sq_thread to repeat it.
> 
> Fixes: 09c0eb1f1b93b9cf ("io_uring: Merge io_submit_sqes and
> io_ring_submit").

Thanks, I'm going to fold this one in with the offending commit.

-- 
Jens Axboe


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 18:12 [PATCH 1/1] io_uring: Remove extra io_commit_sqring() Pavel Begunkov
2019-11-06 18:17 ` Pavel Begunkov
2019-11-06 18:19 ` Jens Axboe

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git