Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-11-07 Thread Bart Van Assche
On Wed, 2017-10-18 at 12:22 +0200, Roman Pen wrote: > the patch below fixes queue stalling when shared hctx marked for restart > (BLK_MQ_S_SCHED_RESTART bit) but q->shared_hctx_restart stays zero. Since I have been able to reproduce this queue stall with an upstream driver (ib_srp) and since I als

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-11-01 Thread Bart Van Assche
On Mon, 2017-10-23 at 17:12 +0200, Roman Penyaev wrote: > On Fri, Oct 20, 2017 at 10:05 PM, Bart Van Assche wrote: > > Commit 6d8c6c0f97ad is something I came up with to fix queue lockups in the > > SCSI and dm-mq drivers. > > You mean fairness? (some hctx get less amount of chances to be restarte

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-24 Thread Ming Lei
On Mon, Oct 23, 2017 at 06:12:29PM +0200, Roman Penyaev wrote: > Hi Ming, > > On Fri, Oct 20, 2017 at 3:39 PM, Ming Lei wrote: > > On Wed, Oct 18, 2017 at 12:22:06PM +0200, Roman Pen wrote: > >> Hi all, > >> > >> the patch below fixes queue stalling when shared hctx marked for restart > >> (BLK_M

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-23 Thread Roman Penyaev
Hi Ming, On Fri, Oct 20, 2017 at 3:39 PM, Ming Lei wrote: > On Wed, Oct 18, 2017 at 12:22:06PM +0200, Roman Pen wrote: >> Hi all, >> >> the patch below fixes queue stalling when shared hctx marked for restart >> (BLK_MQ_S_SCHED_RESTART bit) but q->shared_hctx_restart stays zero. The >> root caus

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-23 Thread Roman Penyaev
On Fri, Oct 20, 2017 at 10:05 PM, Bart Van Assche wrote: > On Fri, 2017-10-20 at 11:39 +0200, Roman Penyaev wrote: >> But what bothers me is these looong loops inside blk_mq_sched_restart(), >> and since you are the author of the original 6d8c6c0f97ad ("blk-mq: Restart >> a single queue if tag set

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-20 Thread Bart Van Assche
On Fri, 2017-10-20 at 11:39 +0200, Roman Penyaev wrote: > But what bothers me is these looong loops inside blk_mq_sched_restart(), > and since you are the author of the original 6d8c6c0f97ad ("blk-mq: Restart > a single queue if tag sets are shared") I want to ask what was the original > problem wh

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-20 Thread Roman Penyaev
Hi Bart, On Thu, Oct 19, 2017 at 7:47 PM, Bart Van Assche wrote: > On Wed, 2017-10-18 at 12:22 +0200, Roman Pen wrote: >> the patch below fixes queue stalling when shared hctx marked for restart >> (BLK_MQ_S_SCHED_RESTART bit) but q->shared_hctx_restart stays zero. The >> root cause is that hctx

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-19 Thread Bart Van Assche
On Wed, 2017-10-18 at 12:22 +0200, Roman Pen wrote: > the patch below fixes queue stalling when shared hctx marked for restart > (BLK_MQ_S_SCHED_RESTART bit) but q->shared_hctx_restart stays zero. The > root cause is that hctxs are shared between queues, but 'shared_hctx_restart' > belongs to the

[PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-18 Thread Roman Pen
Hi all, the patch below fixes queue stalling when shared hctx marked for restart (BLK_MQ_S_SCHED_RESTART bit) but q->shared_hctx_restart stays zero. The root cause is that hctxs are shared between queues, but 'shared_hctx_restart' belongs to the particular queue, which in fact may not need to be