linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, NeilBrown <neil@brown.name>
Subject: Re: [PATCH] mmc: core: Enable runtime PM management of host devices
Date: Fri, 27 Mar 2015 14:41:42 +0200	[thread overview]
Message-ID: <55155006.5080305@intel.com> (raw)
In-Reply-To: <1427454915-12893-1-git-send-email-ulf.hansson@linaro.org>

On 27/03/15 13:15, Ulf Hansson wrote:
> Currently those host drivers which have deployed runtime PM, deals with
> the runtime PM reference counting entirely by themselves.
> 
> Since host drivers don't know when the core will send the next request
> through some of the host_ops callbacks, they need to handle runtime PM
> get/put between each an every request.
> 
> In quite many cases this has some negative effects, since it leads to a
> high frequency of scheduled runtime PM suspend operations. That due to
> the runtime PM reference count will normally reach zero in-between
> every request.
> 
> We can decrease that frequency, by enabling the core to deal with
> runtime PM reference counting of the host device. Since the core often
> knows that it will send a seqeunce of requests, it makes sense for it
> to keep a runtime PM reference count during these periods.
> 
> More exactly, let's increase the runtime PM reference count by invoking
> pm_runtime_get_sync() from __mmc_claim_host(). Restore that action by
> invoking pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend()
> in mmc_release_host(). In this way a runtime PM reference count will be
> kept during the complete cycle of a claim -> release host.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

The downside is that it precludes the possibility of a host driver using
runtime pm for very aggressive pm. However there is anyway MMC_CLKGATE for
that, and otherwise all host drivers are either using autosuspend_delay or
staying active while the card has power. So:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>


  reply	other threads:[~2015-03-27 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 11:15 [PATCH] mmc: core: Enable runtime PM management of host devices Ulf Hansson
2015-03-27 12:41 ` Adrian Hunter [this message]
2015-03-27 21:52 ` NeilBrown
2015-03-29 10:53   ` Konstantin Dorfman
2015-03-30  8:48     ` Ulf Hansson
2015-03-30  8:58   ` Ulf Hansson
2015-03-30 11:39 ` Konstantin Dorfman

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=55155006.5080305@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).