Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-07-19 Thread Junxiao Bi
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,

Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-07-19 Thread Konrad Rzeszutek Wilk
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

Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-07-19 Thread Junxiao Bi
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

Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-07-19 Thread Roger Pau Monné
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

Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-07-18 Thread Junxiao Bi
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

Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-06-23 Thread Roger Pau Monné
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

Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-06-23 Thread Boris Ostrovsky
On 06/23/2017 12:58 AM, Junxiao Bi wrote: Hi Boris & Juergen, Could you help review this patch? This is a race and will cause the io hung. Thanks, Junxiao. On 06/22/2017 09:36 AM, Junxiao Bi wrote: When ring buf full, hw queue will be stopped. While blkif interrupt consume request and make

Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-06-22 Thread Junxiao Bi
Hi Boris & Juergen, Could you help review this patch? This is a race and will cause the io hung. Thanks, Junxiao. On 06/22/2017 09:36 AM, 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

[Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-06-21 Thread Junxiao Bi
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: