All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 2/4] PM / devfreq: cache the last call to get_dev_status()
@ 2015-07-17  4:31 MyungJoo Ham
  2015-07-22 15:04 ` Javi Merino
  0 siblings, 1 reply; 3+ messages in thread
From: MyungJoo Ham @ 2015-07-17  4:31 UTC (permalink / raw)
  To: Javi Merino, linux-pm@vger.kernel.org
  Cc: 박경민, 최찬우

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v2 0/4] Devfreq cooling device
@ 2015-07-13 17:33 Javi Merino
  2015-07-13 17:33 ` [PATCH v2 2/4] PM / devfreq: cache the last call to get_dev_status() Javi Merino
  0 siblings, 1 reply; 3+ messages in thread
From: Javi Merino @ 2015-07-13 17:33 UTC (permalink / raw)
  To: linux-pm; +Cc: Javi Merino

This series introduces a devfreq cooling device in the thermal
framework.  Devfreq is used for DVFS for devices other than the CPUs.
With a devfreq cooling device, the thermal framework can throttle them
to control temperature.  The cooling device has the power extensions,
so it can be used by all governors in the thermal framework, including
the power allocator governor.

Changes since v1:
  - Rename devfreq_qos_set_[max|min] to devfreq_set_[max|min] as
    suggested by MyungJoo Ham
  - Calculate devfreq load in the tracepoint so that it only happens
    when the trace is enabled.  Thanks Steven Rostedt.

Javi Merino (2):
  PM / devfreq: cache the last call to get_dev_status()
  devfreq_cooling: add trace information

Ørjan Eide (2):
  PM / devfreq: Add function to set max/min frequency
  thermal: Add devfreq cooling

 drivers/devfreq/devfreq.c                 |  77 ++++--
 drivers/devfreq/governor_simpleondemand.c |  33 +--
 drivers/thermal/Kconfig                   |  10 +
 drivers/thermal/Makefile                  |   3 +
 drivers/thermal/devfreq_cooling.c         | 394 ++++++++++++++++++++++++++++++
 include/linux/devfreq.h                   |  20 ++
 include/linux/devfreq_cooling.h           |  90 +++++++
 include/trace/events/thermal.h            |  53 ++++
 8 files changed, 641 insertions(+), 39 deletions(-)
 create mode 100644 drivers/thermal/devfreq_cooling.c
 create mode 100644 include/linux/devfreq_cooling.h

-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-22 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- 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

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.