public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Cc: myungjoo.ham@samsung.com, Kevin Hilman <khilman@linaro.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	patches@linaro.org, linaro-kernel@lists.linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] PM / devfreq: tie suspend/resume to runtime-pm
Date: Sun, 05 May 2013 13:48:09 +0200	[thread overview]
Message-ID: <8888976.pxWaKvWiK0@vostro.rjw.lan> (raw)
In-Reply-To: <1366205301-4249-1-git-send-email-rajagopal.venkat@linaro.org>

On Wednesday, April 17, 2013 06:58:21 PM Rajagopal Venkat wrote:
> Devfreq core runtime suspend/resume of a device is explicitly
> handled by devfreq driver using devfreq_suspend_device() and
> devfreq_resume_device() apis typically called from runtime
> suspend/resume callbacks. This patch aims to take away this
> from devfreq drivers and handle it from runtime-pm core. So
> that devfreq core runtime suspend/resume of a device is
> automatically done with runtime pm suspend/resume. The devfreq
> drivers shouldn't be concerned on when to suspend/resume the
> devfreq.

I agree, but perhaps there's a better way to achieve that than fumbling
in the PM core?

Did you consider using a PM domain for that?

> This patch is targeted to handle devfreq core load monitoring
> runtime suspend/resume only. Not the actual hardware itself.
> All the resources like clocks and regulators must still be
> handled by device driver using runtime-pm. The sequence of
> devfreq and device runtime suspend/resume is,
> 
> pm_runtime_suspend(dev) will first suspend device devfreq
> (if available) before device is suspended to ensure devfreq load
> monitoring is stopped and no device resources like clocks are
> accessed while device suspend is in progress.
> 
> pm_runtime_resume(dev) will resume device devfreq(if available)
> after device is resumed to ensure device resources like clocks
> are ready for use.
> 
> As devfreq runtime suspend/resume is done automatically from runtime
> core, this patch removes the existing devfreq_suspend_device() and
> devfreq_resume_device() apis.
> 
> Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>

I'm having a problem with this patch, because it's adding overhead into
rpm_suspend() and rpm_resume() for all devices, even though many of them
may not use devfreq.  Worse yet, there are systems in which devfreq will
never be used at all.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-05-05 11:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 13:28 [PATCH V3] PM / devfreq: tie suspend/resume to runtime-pm Rajagopal Venkat
2013-05-05 11:48 ` Rafael J. Wysocki [this message]
2013-05-06 11:42   ` myungjoo.ham

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=8888976.pxWaKvWiK0@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=khilman@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=patches@linaro.org \
    --cc=rajagopal.venkat@linaro.org \
    --cc=stern@rowland.harvard.edu \
    /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