From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Javi Merino <javi.merino@arm.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Cc: 박경민 <kyungmin.park@samsung.com>, 최찬우 <cw00.choi@samsung.com>
Subject: Re: [PATCH v2 2/4] PM / devfreq: cache the last call to get_dev_status()
Date: Fri, 17 Jul 2015 04:31:38 +0000 (GMT) [thread overview]
Message-ID: <319181187.26291437107498063.JavaMail.weblogic@epmlwas08c> (raw)
> 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(-)
>
Dear Javi,
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.
Cheers,
MyungJoo
ps. Chanwoo, I will comment on your patches on the usage of
opp-notifiers as well.
next reply other threads:[~2015-07-17 4:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 4:31 MyungJoo Ham [this message]
2015-07-22 15:04 ` [PATCH v2 2/4] PM / devfreq: cache the last call to get_dev_status() Javi Merino
-- 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=319181187.26291437107498063.JavaMail.weblogic@epmlwas08c \
--to=myungjoo.ham@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=javi.merino@arm.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-pm@vger.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