All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@arm.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	박경민 <kyungmin.park@samsung.com>, 최찬우 <cw00.choi@samsung.com>,
	"Orjan Eide" <Orjan.Eide@arm.com>,
	"Punit Agrawal" <Punit.Agrawal@arm.com>
Subject: Re: [PATCH v2 2/4] PM / devfreq: cache the last call to get_dev_status()
Date: Wed, 22 Jul 2015 16:04:48 +0100	[thread overview]
Message-ID: <20150722150448.GA973@e104805> (raw)
In-Reply-To: <319181187.26291437107498063.JavaMail.weblogic@epmlwas08c>

Hi MyungJoo,

On Fri, Jul 17, 2015 at 05:31:38AM +0100, MyungJoo Ham wrote:
> > The return value of get_dev_status() can be reused.  Cache it so that
> > other parts of the kernel can reuse it instead of having to call the
> > same function again.
> > 
> > Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > Signed-off-by: Javi Merino <javi.merino@arm.com>
> > ---
> > 
> > This patch tries to let multiple components.  To summarize the
> > discussion in v1[1] I can think of three alternatives:
> > 
> >   1) Change get_dev_status() to return absolute values for busy_time
> >      and total_time
> >   2) Make core devfreq call get_dev_status() periodically (for
> >      example, before calling the governor) and all the entities that
> >      want access can do so via a pointer in devfreq
> >   3) Make the simple ondemand governor call get_dev_status()
> >      periodically and cache it, forcing all the other entities to
> >      rely on that governor being active
> > 
> > [1] http://thread.gmane.org/gmane.linux.power-management.general/61936/focus=61993
> > 
> > This patch implements option 3)
> > 
> >  drivers/devfreq/devfreq.c                 |  5 +++++
> >  drivers/devfreq/governor_simpleondemand.c | 33 +++++++++++++++++--------------
> >  include/linux/devfreq.h                   |  7 +++++++
> >  3 files changed, 30 insertions(+), 15 deletions(-)
> > 
> 
> Another question has risen as seeing Chanwoo's RFC patches,
> which have a similar objective to different devices with
> much less intervention:
> 
> [RFC PATCH 0/2] thermal: Add generic devfreq cooling device
> https://lkml.org/lkml/2015/7/16/334
> (This patch set also requires updates as it appears not
> to use opp notifiers properly, but it shows the direction
> on how to implement thermal/qos inputs to devfreq devices)
> 
> Can't you simply use OPP's disable/enable functions and
> let devfreq automatically update itself accordingly?
> It simplifies your codes as well especially if you put
> your possible frequencies to DT.

Ok, we can use OPP enable/disable to modify the available OPPs and let
devfreq take the appropriate decision. I'll send a v3 next week.

Still, the question of how to let multiple components access
get_dev_status() is still open.  Have you had time to consider it?

Cheers,
Javi

  reply	other threads:[~2015-07-22 15:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  4:31 [PATCH v2 2/4] PM / devfreq: cache the last call to get_dev_status() MyungJoo Ham
2015-07-22 15:04 ` Javi Merino [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-07-13 17:33 [PATCH v2 0/4] Devfreq cooling device Javi Merino
2015-07-13 17:33 ` [PATCH v2 2/4] PM / devfreq: cache the last call to get_dev_status() Javi Merino

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=20150722150448.GA973@e104805 \
    --to=javi.merino@arm.com \
    --cc=Orjan.Eide@arm.com \
    --cc=Punit.Agrawal@arm.com \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.