linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Rafael Wysocki <rjw@rjwysocki.net>
Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, rostedt@goodmis.org,
	mingo@redhat.com, peterz@infradead.org, mike@android.com,
	toddpoynor@google.com, kandoiruchi@google.com,
	juri.lelli@arm.com, steve.muckle@linaro.org,
	vincent.guittot@linaro.org, john.stultz@linaro.org,
	amit.pundir@linaro.org, Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH V2 0/2] cpufreq: Upstream Android's Interactive governor
Date: Wed, 14 Sep 2016 14:19:39 +0530	[thread overview]
Message-ID: <cover.1473842301.git.viresh.kumar@linaro.org> (raw)

Hi Rafael et. al.,

We had some discussions [1] earlier on the PM mailing about
upstreaming the cpufreq governor most widely used on Android Mobile
phones and tablets: Interactive governor.

People (including Rafael) mostly agreed that we better get it upstreamed
and here is an attempt to upstream most of it (idle notifiers aren't
included in this series).

I picked the latest code spread over 70-80 patches from [2].  The
unmodified code, based over mainline is pushed [4] for reference.

I have updated the governor to align it with the current practices
followed with mainline governors, like using utilization hooks from the
scheduler and handling kobject (for governor's sysfs directory) in a
race free manner. And of course this included general cleanup of the
governor as well. This version is pushed here [3] for testing.

The Android version of interactive governor also uses idle EXIT
notifiers, but that code isn't part of this series and will be sent
separately later. For people interested in looking at that, those are 3
minor patches on top of this series and are pushed here [5].

I haven't changed the core logic of the governor intentionally, as that
rather requires more in-depth knowledge of the use case for which the
optimizations have been done. So, we should do any such thing later on
with new patches, so that people can fix regressions easily.

I also haven't tried to change the userspace interface as that may have
broken the userspace that already exists and uses this governor.

This has been lightly tested on my Exynos board (dual ARM A15), where
the governor gets inserted/removed multiple times, the sysfs files are
all functional. The frequency gets changed with load, etc.

Amit Pundir (Linaro) has done extensive testing with Android and
compared results of both Original Interactive governor and the modified
one (in this series) and found them to be comparable.

This series is based of pm/bleeding-edge branch.

V1->V2:
- Changes to fix compilation issues with latest mainline
- Timer APIs got updated
 - s/mod_timer_pinned/mod_timer
 - s/init_timer/init_timer_pinned
- Updated prototypes of cpufreq_frequency_table_target() and
  update_util_handler()

--
viresh

[1] http://marc.info/?l=linux-pm&m=146301864519072
[2] https://android.googlesource.com/kernel/common remotes/android/android-4.4
[3] git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/interactive
[4] git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/interactive-orig
[5] git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/intearctive-idle-notifier

Viresh Kumar (2):
  cpufreq: Move gov_attr_* macros to cpufreq.h
  cpufreq: Add android's 'interactive' governor

 Documentation/cpu-freq/governors.txt       |   86 ++
 drivers/cpufreq/Kconfig                    |   30 +
 drivers/cpufreq/Makefile                   |    1 +
 drivers/cpufreq/cpufreq_governor.h         |    8 -
 drivers/cpufreq/cpufreq_interactive.c      | 1363 ++++++++++++++++++++++++++++
 include/linux/cpufreq.h                    |   12 +
 include/trace/events/cpufreq_interactive.h |  112 +++
 kernel/sched/cpufreq_schedutil.c           |    8 +-
 8 files changed, 1608 insertions(+), 12 deletions(-)
 create mode 100644 drivers/cpufreq/cpufreq_interactive.c
 create mode 100644 include/trace/events/cpufreq_interactive.h

-- 
2.7.1.410.g6faf27b


             reply	other threads:[~2016-09-14  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14  8:49 Viresh Kumar [this message]
2016-09-14  8:49 ` [PATCH V2 1/2] cpufreq: Move gov_attr_* macros to cpufreq.h Viresh Kumar
2016-09-14  8:49 ` [PATCH V2 2/2] cpufreq: Add android's 'interactive' governor Viresh Kumar

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=cover.1473842301.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=amit.pundir@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=juri.lelli@arm.com \
    --cc=kandoiruchi@google.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mike@android.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=steve.muckle@linaro.org \
    --cc=toddpoynor@google.com \
    --cc=vincent.guittot@linaro.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;
as well as URLs for NNTP newsgroup(s).