mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "roman.penyaev@profitbricks.com" <roman.penyaev@profitbricks.com>
Cc: Bart Van Assche <Bart.VanAssche@wdc.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"hare@suse.com" <hare@suse.com>, "axboe@fb.com" <axboe@fb.com>,
	"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart
Date: Thu, 19 Oct 2017 17:47:24 +0000	[thread overview]
Message-ID: <1508435243.2429.42.camel@wdc.com> (raw)
In-Reply-To: <20171018102206.26020-1-roman.penyaev@profitbricks.com>

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 particular queue, which in fact may not need to be restarted,
> thus we return from blk_mq_sched_restart() and leave shared hctx of another
> queue never restarted.
> 
> The fix is to make shared_hctx_restart counter belong not to the queue, but
> to tags, thereby counter will reflect real number of shared hctx needed to
> be restarted.

Hello Roman,

The patch you posted looks fine to me but seeing this patch and the patch
description makes me wonder why this had not been noticed before. Are you
perhaps using a block driver that returns BLK_STS_RESOURCE more often than
other block drivers? Did you perhaps run into this with the Infiniband
network block device (IBNBD) driver? No matter what driver triggered this,
I think this bug should be fixed.

Bart.

  reply	other threads:[~2017-10-19 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 10:22 Roman Pen
2017-10-19 17:47 ` Bart Van Assche [this message]
2017-10-20  9:39   ` Roman Penyaev
2017-10-20 20:05     ` Bart Van Assche
2017-10-23 15:12       ` Roman Penyaev
2017-11-01 16:50         ` Bart Van Assche
     [not found] ` <20171020133943.GA31275@ming.t460p>
2017-10-23 16:12   ` Roman Penyaev
2017-10-24 10:04     ` Ming Lei
2017-11-07 15:54 ` Bart Van Assche

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=1508435243.2429.42.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=axboe@fb.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roman.penyaev@profitbricks.com \
    /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

all inboxes | Powered by JetHome®