LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC 0/3] Add watermark support to devfreq
@ 2014-12-05 13:32 Arto Merilainen
  2014-12-05 13:32 ` [RFC 1/3] PM / devfreq: Add watermark events Arto Merilainen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arto Merilainen @ 2014-12-05 13:32 UTC (permalink / raw)
  To: myungjoo.ham, kyungmin.park, tomeu.vizoso, gnurou
  Cc: javier.martinez, linuxpm, linux-kernel, swarren, thierry.reding,
	grant.likely, srasal, amerilainen

Currently main mechanism to implement scaling using devfreq is
polling and the device profile is free to set polling interval.
However, in many cases this approach is not optimal; We may
unnecessarily use CPU time to determine load on engine that
is idle most of time - or we may simply read load when we
already know that the device is busy.

In some cases a device itself has counters to track its activity
and possibility to raise interrupts when load goes above or below
certain threshold.

This series adds support for watermark events to devfreq and
introduces two example governors. The first patch adds two
callbacks to the device profile (for setting watermark) and
adds a new function call to devfreq that informs of crossed
watermark.

The added governors demonstrate usage of the new API. The first
governor (watermark simple) sets device to trigger low watermark
event when load goes below 10% and high watermark interrupt when
the load goes above 60%. Watermark active tries to keep load at
certain level and it actively sets thresholds based on the
frequency table in order get interrupts only when the load value
would affect to the current frequency in re-estimation.

Arto Merilainen (1):
  PM / devfreq: Add watermark active governor

Shridhar Rasal (2):
  PM / devfreq: Add watermark events
  PM / devfreq: Add watermark simple governor

 drivers/devfreq/Kconfig                 |  18 +++
 drivers/devfreq/Makefile                |   2 +
 drivers/devfreq/devfreq.c               |  19 +++
 drivers/devfreq/governor.h              |   1 +
 drivers/devfreq/governor_wmark_active.c | 276 ++++++++++++++++++++++++++++++++
 drivers/devfreq/governor_wmark_simple.c | 245 ++++++++++++++++++++++++++++
 include/linux/devfreq.h                 |  26 +++
 7 files changed, 587 insertions(+)
 create mode 100644 drivers/devfreq/governor_wmark_active.c
 create mode 100644 drivers/devfreq/governor_wmark_simple.c

-- 
1.8.1.5


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

end of thread, other threads:[~2014-12-05 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 13:32 [RFC 0/3] Add watermark support to devfreq Arto Merilainen
2014-12-05 13:32 ` [RFC 1/3] PM / devfreq: Add watermark events Arto Merilainen
2014-12-05 13:32 ` [RFC 2/3] PM / devfreq: Add watermark simple governor Arto Merilainen
2014-12-05 13:32 ` [RFC 3/3] PM / devfreq: Add watermark active governor Arto Merilainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).