public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/2] blk-mq: don't grab ->q_usage_counter in blk_mq_sched_bio_merge
Date: Thu, 11 Nov 2021 09:56:50 +0100	[thread overview]
Message-ID: <20211111085650.GA476@lst.de> (raw)
In-Reply-To: <20211111085134.345235-2-ming.lei@redhat.com>

On Thu, Nov 11, 2021 at 04:51:33PM +0800, Ming Lei wrote:
> blk_mq_sched_bio_merge is only called from blk-mq.c:blk_attempt_bio_merge(),
> which is called when queue usage counter is grabbed already:
> 
> 1) blk_mq_get_new_requests()
> 
> 2) blk_mq_get_request()
> - cached request in current plug owns one queue usage counter
> 
> So don't grab ->q_usage_counter in blk_mq_sched_bio_merge(), and more
> importantly this nest way causes hang in blk_mq_freeze_queue_wait().

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2021-11-11  8:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  8:51 [PATCH 0/2] blk-mq: fix hang in blk_mq_freeze_queue_wait Ming Lei
2021-11-11  8:51 ` [PATCH 1/2] blk-mq: don't grab ->q_usage_counter in blk_mq_sched_bio_merge Ming Lei
2021-11-11  8:56   ` Christoph Hellwig [this message]
2021-11-11  8:51 ` [PATCH 2/2] blk-mq: rename blk_attempt_bio_merge Ming Lei
2021-11-11  8:57   ` Christoph Hellwig
2021-11-11 14:23 ` [PATCH 0/2] blk-mq: fix hang in blk_mq_freeze_queue_wait Jens Axboe

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=20211111085650.GA476@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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