public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "hch@lst.de" <hch@lst.de>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"tom.leiming@gmail.com" <tom.leiming@gmail.com>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	"jthumshirn@suse.de" <jthumshirn@suse.de>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH 2/3] block, scsi: Rework runtime power management
Date: Fri, 20 Jul 2018 07:26:51 +0800	[thread overview]
Message-ID: <20180719232650.GA16394@ming.t460p> (raw)
In-Reply-To: <c15e8f2b15b734284a983102e8e91a8f28cd2686.camel@wdc.com>

On Thu, Jul 19, 2018 at 03:54:53PM +0000, Bart Van Assche wrote:
> On Thu, 2018-07-19 at 06:45 +0800, Ming Lei wrote:
> > So once blk_freeze_queue_start() returns, percpu_ref_is_zero() won't
> > return true only until the rcu confirmation is done. That means this
> > approach may not put device down.
> 
> Hello Ming,
> 
> I agree with your conclusion that it is not guaranteed that q->q_usage_counter
> is in atomic mode when percpu_ref_is_zero() is called. However, I think that's
> fine: if blk_pre_runtime_suspend() returns -EBUSY then the runtime core will
> try again at a later time to perform runtime suspend.

This behaviour should be persistent in next retry since percpu_ref_is_zero()
should always return false after blk_freeze_queue_start() is run on one
un-frozen queue.

Thanks,
Ming

  reply	other threads:[~2018-07-19 23:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 23:49 [PATCH 0/3] blk-mq: Enable runtime power management Bart Van Assche
2018-07-17 23:49 ` [PATCH 1/3] block: Fix a comment in a header file Bart Van Assche
2018-07-18  6:47   ` Johannes Thumshirn
2018-07-17 23:49 ` [PATCH 2/3] block, scsi: Rework runtime power management Bart Van Assche
2018-07-18 12:16   ` Ming Lei
2018-07-18 15:45     ` Bart Van Assche
2018-07-18 22:45       ` Ming Lei
2018-07-19 15:54         ` Bart Van Assche
2018-07-19 23:26           ` Ming Lei [this message]
2018-07-17 23:49 ` [PATCH 3/3] blk-mq: Enable support for " 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=20180719232650.GA16394@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jthumshirn@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tom.leiming@gmail.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