public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Tejun Heo <tj@kernel.org>
Cc: Ming Lei <ming.lei@canonical.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-mq: blk_mq_freeze_queue() should allow nesting
Date: Sun, 17 Aug 2014 11:47:14 -0600	[thread overview]
Message-ID: <53F0EAA2.3030702@kernel.dk> (raw)
In-Reply-To: <20140816120224.GB9305@htj.dyndns.org>

On 2014-08-16 06:02, Tejun Heo wrote:
> While converting to percpu_ref for freezing, add703fda981 ("blk-mq:
> use percpu_ref for mq usage count") incorrectly made
> blk_mq_freeze_queue() misbehave when freezing is nested due to
> percpu_ref_kill() being invoked on an already killed ref.
>
> Fix it by making blk_mq_freeze_queue() kill and kick the queue only
> for the outermost freeze attempt.  All the nested ones can simply wait
> for the ref to reach zero.
>
> While at it, remove unnecessary @wake initialization from
> blk_mq_unfreeze_queue().
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: Ming Lei <ming.lei@canonical.com>
> ---
> Hello, Ming, Jens.
>
> I think something like this is the correct solution.  Freezing should
> be nestable after all.  Ming, can you please verify whether this fixes
> the issue you're seeing?

I had completely missed that nesting no longer works, which it of course 
should. Mings patch is still fine, however, as we don't need the freeze 
at that point. But I'll apply yours as well so that nesting is restored, 
it might be important for other cases. And it's one of those things that 
we should not have to worry about.

-- 
Jens Axboe


      parent reply	other threads:[~2014-08-17 17:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 15:16 [PATCH] blk-mq: fix WARNING "percpu_ref_kill() called more than once!" Ming Lei
2014-08-15 18:37 ` Jens Axboe
2014-08-16 12:02   ` [PATCH] blk-mq: blk_mq_freeze_queue() should allow nesting Tejun Heo
2014-08-16 13:30     ` Ming Lei
2014-08-17 17:47     ` Jens Axboe [this message]

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=53F0EAA2.3030702@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=tj@kernel.org \
    /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