public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v3 1/3] PM / devfreq: cache the last call to get_dev_status()
@ 2015-08-03  5:30 MyungJoo Ham
  2015-08-03 15:24 ` Javi Merino
  0 siblings, 1 reply; 3+ messages in thread
From: MyungJoo Ham @ 2015-08-03  5:30 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>

Your patch introduces build errors if you try to compile governors as
modules. Please fix it.


And..
> +int devfreq_update_stats(struct devfreq *df)
> +{
> +	return df->profile->get_dev_status(df->dev.parent, &df->last_status);
> +}
This seems a good candidate for a macro or a static inline function.

Modifications in governor_simpleondemand.c looks good.


Please add some explanations at the definition of devfreq_update_stats()
as well in devfreq.c


Cheers,
MyungJoo.


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v3 0/3] Devfreq cooling device
@ 2015-07-28 15:17 Javi Merino
  2015-07-28 15:17 ` [PATCH v3 1/3] 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-28 15:17 UTC (permalink / raw)
  To: linux-pm; +Cc: cw00.choi, 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 v2:
  - Use the opp library to enable/disable opps instead of exporting
    devfreq_set_{max,min}
  - Use idr API to get a unique name for each devfreq cooling device
    registered.
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 (1):
  thermal: Add devfreq cooling

 drivers/devfreq/devfreq.c                 |   5 +
 drivers/devfreq/governor_simpleondemand.c |  33 ++-
 drivers/thermal/Kconfig                   |  10 +
 drivers/thermal/Makefile                  |   3 +
 drivers/thermal/devfreq_cooling.c         | 472 ++++++++++++++++++++++++++++++
 include/linux/devfreq.h                   |   8 +
 include/linux/devfreq_cooling.h           |  93 ++++++
 include/trace/events/thermal.h            |  53 ++++
 8 files changed, 662 insertions(+), 15 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-08-03 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-03  5:30 [PATCH v3 1/3] PM / devfreq: cache the last call to get_dev_status() MyungJoo Ham
2015-08-03 15:24 ` Javi Merino
  -- strict thread matches above, loose matches on Subject: below --
2015-07-28 15:17 [PATCH v3 0/3] Devfreq cooling device Javi Merino
2015-07-28 15:17 ` [PATCH v3 1/3] PM / devfreq: cache the last call to get_dev_status() Javi Merino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox