Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Cc: linux-block@vger.kernel.org
Subject: Re: [RFC 2/2] io_uring: acquire ctx->uring_lock before calling io_issue_sqe()
Date: Thu, 16 Jan 2020 09:22:17 -0700
Message-ID: <1397cd55-37a6-4e14-91ac-eb3c35e7d962@kernel.dk> (raw)
In-Reply-To: <8f7986c7-e5b4-8f24-1c71-666c01b16c8b@kernel.dk>

On 1/15/20 9:42 PM, Jens Axboe wrote:
> On 1/15/20 9:34 PM, Jens Axboe wrote:
>> On 1/15/20 7:37 PM, Bijan Mottahedeh wrote:
>>> io_issue_sqe() calls io_iopoll_req_issued() which manipulates poll_list,
>>> so acquire ctx->uring_lock beforehand similar to other instances of
>>> calling io_issue_sqe().
>>
>> Is the below not enough?
> 
> This should be better, we have two that set ->in_async, and only one
> doesn't hold the mutex.
> 
> If this works for you, can you resend patch 2 with that? Also add a:
> 
> Fixes: 8a4955ff1cca ("io_uring: sqthread should grab ctx->uring_lock for submissions")
> 
> to it as well. Thanks!

I tested and queued this up:

https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-5.5&id=11ba820bf163e224bf5dd44e545a66a44a5b1d7a

Please let me know if this works, it sits on top of the ->result patch you
sent in.

-- 
Jens Axboe


  reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  2:37 [RFC 0/2] Fixes for fio io_uring polled mode test failures Bijan Mottahedeh
2020-01-16  2:37 ` [RFC 1/2] io_uring: clear req->result always before issuing a read/write request Bijan Mottahedeh
2020-01-16  4:34   ` Jens Axboe
2020-01-16  2:37 ` [RFC 2/2] io_uring: acquire ctx->uring_lock before calling io_issue_sqe() Bijan Mottahedeh
2020-01-16  4:34   ` Jens Axboe
2020-01-16  4:42     ` Jens Axboe
2020-01-16 16:22       ` Jens Axboe [this message]
2020-01-16 19:08         ` Bijan Mottahedeh
2020-01-16 20:02           ` Jens Axboe
2020-01-16 21:04             ` Bijan Mottahedeh
2020-01-16 21:26               ` Jens Axboe

Reply instructions:

You may reply publically 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=1397cd55-37a6-4e14-91ac-eb3c35e7d962@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bijan.mottahedeh@oracle.com \
    --cc=linux-block@vger.kernel.org \
    /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

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/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 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


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