Linux block layer
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>, Jens Axboe <axboe@fb.com>,
	Christoph Hellwig <hch@lst.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Marc Merlin <marc@merlins.org>
Subject: Re: [PATCH 5/6] blk-mq: Fix queue freeze deadlock
Date: Tue, 17 Jan 2017 13:00:08 -0500	[thread overview]
Message-ID: <20170117180008.GB8989@localhost.localdomain> (raw)
In-Reply-To: <1031ba43-4c5e-f6a7-e12f-f6169eae5edf@grimberg.me>

On Fri, Jan 13, 2017 at 11:05:19PM +0200, Sagi Grimberg wrote:
> > If hardware queues are stopped for some event, like the device has been
> > suspended by power management, requests allocated on that hardware queue
> > are indefinitely stuck causing a queue freeze to wait forever.
> 
> I have a problem with this patch. IMO, this is a general issue so, so
> why do we tie a fix to calling blk_mq_update_nr_hw_queues()? We might
> not need to update nr_hw_queues at all. I'm fine with the
> blk_mq_abandon_stopped_requests but not with its call-site.
> 
> Usually a driver knows when it wants to abandon all busy requests
> blk_mq_tagset_busy_iter(), maybe the right approach is to add
> a hook for all allocated tags? Or have blk_mq_quisce_queue get a
> fail all requests parameter from the callers?

This patch is overly aggressive on failing allocated requests. There
are scenarios where we wouldn't want to abandon them, like if the hw
context is about to be brough back online, but this patch assumes all
need to be abandoned. I'll see if there's some other tricks we can have
a driver do. Thanks for the suggestions.

  reply	other threads:[~2017-01-17 18:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 22:41 [PATCH 0/6] NVMe related fixes Keith Busch
2017-01-04 22:41 ` [PATCH 1/6] irq/affinity: Assign all online CPUs to vectors Keith Busch
2017-01-13 20:21   ` Sagi Grimberg
2017-01-23 18:30   ` Christoph Hellwig
2017-01-04 22:41 ` [PATCH 2/6] irq/affinity: Assign offline CPUs a vector Keith Busch
2017-01-08 10:01   ` Christoph Hellwig
2017-01-13 20:26     ` Sagi Grimberg
2017-01-04 22:41 ` [PATCH 3/6] nvme/pci: Start queues after tagset is updated Keith Busch
2017-01-13 20:38   ` Sagi Grimberg
2017-01-23 18:31   ` Christoph Hellwig
2017-01-04 22:41 ` [PATCH 4/6] blk-mq: Update queue map when changing queue count Keith Busch
2017-01-13 20:39   ` Sagi Grimberg
2017-01-23 18:32   ` Christoph Hellwig
2017-01-04 22:41 ` [PATCH 5/6] blk-mq: Fix queue freeze deadlock Keith Busch
2017-01-05  7:33   ` Bart Van Assche
2017-01-17 17:53     ` Keith Busch
2017-01-13 21:05   ` Sagi Grimberg
2017-01-17 18:00     ` Keith Busch [this message]
2017-01-19  7:54       ` Sagi Grimberg
2017-01-04 22:41 ` [PATCH 6/6] blk-mq: Remove unused variable Keith Busch
2017-01-08 10:02   ` Christoph Hellwig
2017-01-13 21:05   ` Sagi Grimberg

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=20170117180008.GB8989@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=axboe@fb.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=marc@merlins.org \
    --cc=sagi@grimberg.me \
    --cc=tglx@linutronix.de \
    /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