xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Junxiao Bi <junxiao.bi@oracle.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "Juergen Gross" <jgross@suse.com>,
	xen-devel@lists.xenproject.org,
	"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH] xen-blkfront: fix mq start/stop race
Date: Thu, 20 Jul 2017 09:29:44 +0800	[thread overview]
Message-ID: <3676cb1d-8001-c117-505b-28da29b4569c@oracle.com> (raw)
In-Reply-To: <20170719140834.GK5722@char.us.oracle.com>

On 07/19/2017 10:08 PM, Konrad Rzeszutek Wilk wrote:
> On Wed, Jul 19, 2017 at 03:51:48PM +0800, Junxiao Bi wrote:
>> Hi Konrad,
>>
>> On 07/19/2017 03:37 PM, Roger Pau Monné wrote:
>>> On Wed, Jul 19, 2017 at 09:19:49AM +0800, Junxiao Bi wrote:
>>>> Hi Roger,
>>>>
>>>> On 06/23/2017 08:57 PM, Roger Pau Monné wrote:
>>>>> On Thu, Jun 22, 2017 at 09:36:52AM +0800, Junxiao Bi wrote:
>>>>>> When ring buf full, hw queue will be stopped. While blkif interrupt consume
>>>>>> request and make free space in ring buf, hw queue will be started again.
>>>>>> But since start queue is protected by spin lock while stop not, that will
>>>>>> cause a race.
>>>>>>
>>>>>> interrupt:                                      process:
>>>>>> blkif_interrupt()                               blkif_queue_rq()
>>>>>>  kick_pending_request_queues_locked()
>>>>>>   blk_mq_start_stopped_hw_queues()
>>>>>>    clear_bit(BLK_MQ_S_STOPPED, &hctx->state)
>>>>>>                                                  blk_mq_stop_hw_queue(hctx)
>>>>>>    blk_mq_run_hw_queue(hctx, async)
>>>>>>
>>>>>> If ring buf is made empty in this case, interrupt will never come, then the
>>>>>> hw queue will be stopped forever, all processes waiting for the pending io
>>>>>> in the queue will hung.
>>>>>>
>>>>>> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
>>>>>> Reviewed-by: Ankur Arora <ankur.a.arora@oracle.com>
>>>>>
>>>>> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
>>>> Looks patch not in mainline. Can you please help merge it?
>>>
>>> I'm afraid this needs to be done by Konrad or one of the Linux
>>> maintainers, I don't have an account on kernel.org in order to send
>>> pull requests to Jens.
>> Can you pls help merge it?
> 
> Could you kindly repost it with the updated tags _and_ against Linus's latest
> branch?
Sure, v2 sent. Please check.

Thanks,
Junxiao.
> 
> I get:
> [konrad@char linux]$ git am -s < /tmp/a
> Applying: xen-blkfront: fix mq start/stop race
> error: patch failed: drivers/block/xen-blkfront.c:912
> error: drivers/block/xen-blkfront.c: patch does not apply
> Patch failed at 0001 xen-blkfront: fix mq start/stop race
> The copy of the patch that failed is found in: .git/rebase-apply/patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
> 
> 
>>
>> Thanks,
>> Junxiao.
>>>
>>> Roger.
>>>
>>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      reply	other threads:[~2017-07-20  1:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22  1:36 [PATCH] xen-blkfront: fix mq start/stop race Junxiao Bi
2017-06-23  4:58 ` Junxiao Bi
2017-06-23 12:22   ` Boris Ostrovsky
2017-06-23 12:57 ` Roger Pau Monné
2017-07-19  1:19   ` Junxiao Bi
2017-07-19  7:37     ` Roger Pau Monné
2017-07-19  7:51       ` Junxiao Bi
2017-07-19 14:08         ` Konrad Rzeszutek Wilk
2017-07-20  1:29           ` Junxiao Bi [this message]

Reply instructions:

You may reply publicly 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=3676cb1d-8001-c117-505b-28da29b4569c@oracle.com \
    --to=junxiao.bi@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).