All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] Modularize schedutil
@ 2020-05-07 18:09 Quentin Perret
  2020-05-07 18:09 ` [PATCH 01/14] sched: Provide sched_set_deadline() Quentin Perret
                   ` (16 more replies)
  0 siblings, 17 replies; 53+ messages in thread
From: Quentin Perret @ 2020-05-07 18:09 UTC (permalink / raw)
  To: linux-kernel, linux-pm
  Cc: tglx, mingo, bp, x86, hpa, sudeep.holla, gregkh, rafael,
	viresh.kumar, peterz, juri.lelli, vincent.guittot,
	dietmar.eggemann, rostedt, bsegall, mgorman, mcgrof, keescook,
	yzaikin, fweisbec, tkjos, kernel-team, qperret

Android is trying very hard to use a single kernel image (commonly
called Generic Kernel Image, or GKI), closely aligned with mainline, to
run on all Android devices regardless of the vendor.

The GKI project intends to not only improve the status quo for Android
users directly (less fragmentation simplifies updatability), but also
to benefit upstream by forcing all vendors to agree on one common
kernel, that we push hard to be aligned with mainline.

One challenge to implement GKI is to avoid bloating the kernel by
compiling too many things in, especially given that different devices
need different things. As such, anything that can be turned into a
module helps GKI, by offering an alternative to having that component
built-in. This is true for pretty much anything that can be made
modular, including drivers as well as other kernel components, such as
CPUFreq governors.

Indeed, in practice, Android devices often ship with only one CPUFreq
governor enabled, and don't require any other that would simply waste
memory for no benefits. All CPUFreq governors can already be built as
modules with one notable exception: schedutil. Though popular in
Android, some devices do not use schedutil, which is why it would be
preferable to not have it unconditionally built in GKI. This series is
an attempt to solve this problem, by making schedutil tristate.

While modularization is usually not something we want to see near the
scheduler, it appeared to me as I wrote those patches that the
particular case of schedutil was actually not too bad to implement.
We already have to support switching governors at run-time, simply
because userspace is free to do that, so the infrastructure for turning
sugov on and off dynamically is already there. Loading the code a little
later doesn't seem to make that a lot worse.

Patches 01-05 refactor some code to break the few dependencies on
schedutil being builtin (notably EAS). Patches 06-12 export various
symbols that schedutil needs when compiled as a module. And finally,
patches 13-14 finish off the work by making the Kconfig tristate.

---
The series is based on Peter's sched/fifo [1] branch (because sugov
uses sched_setscheduler_nocheck()).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=sched/fifo

Quentin Perret (14):
  sched: Provide sched_set_deadline()
  sched: cpufreq: Use sched_set_deadline() from sugov
  sched: cpufreq: Introduce 'want_eas' governor flag
  sched: cpufreq: Move sched_cpufreq_governor_change()
  sched: cpufreq: Move schedutil_cpu_util()
  arch_topology: Export cpu_scale per-cpu array
  kthread: Export kthread_bind_mask()
  sched/core: Export runqueues per-cpu array
  sched/cpufreq: Export cpufreq_this_cpu_can_update()
  sched/fair: Export cpu_util_freq()
  tick/sched: Export tick_nohz_get_idle_calls_cpu
  x86: Export arch_scale_freq_key
  sched: cpufreq: Use IS_ENABLED() for schedutil
  sched: cpufreq: Modularize schedutil

 arch/x86/kernel/smpboot.c        |   1 +
 drivers/base/arch_topology.c     |   1 +
 drivers/cpufreq/Kconfig          |   2 +-
 include/linux/cpufreq.h          |   6 +-
 include/linux/sched.h            |   2 +
 include/linux/sched/sysctl.h     |   2 +-
 kernel/kthread.c                 |   1 +
 kernel/sched/core.c              |  18 ++++
 kernel/sched/cpufreq.c           |  34 ++++++
 kernel/sched/cpufreq_schedutil.c | 176 +++----------------------------
 kernel/sched/fair.c              | 119 ++++++++++++++++++++-
 kernel/sched/sched.h             |  36 ++-----
 kernel/sched/topology.c          |  16 +--
 kernel/sysctl.c                  |   2 +-
 kernel/time/tick-sched.c         |   1 +
 15 files changed, 212 insertions(+), 205 deletions(-)

-- 
2.26.2.526.g744177e7f7-goog


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

end of thread, other threads:[~2020-05-13 10:24 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 18:09 [PATCH 00/14] Modularize schedutil Quentin Perret
2020-05-07 18:09 ` [PATCH 01/14] sched: Provide sched_set_deadline() Quentin Perret
2020-05-07 18:10 ` [PATCH 02/14] sched: cpufreq: Use sched_set_deadline() from sugov Quentin Perret
2020-05-07 18:10 ` [PATCH 03/14] sched: cpufreq: Introduce 'want_eas' governor flag Quentin Perret
2020-05-07 18:10 ` [PATCH 04/14] sched: cpufreq: Move sched_cpufreq_governor_change() Quentin Perret
2020-05-08  5:35   ` Pavan Kondeti
2020-05-08 13:18     ` Quentin Perret
2020-05-07 18:10 ` [PATCH 05/14] sched: cpufreq: Move schedutil_cpu_util() Quentin Perret
2020-05-07 18:10 ` [PATCH 06/14] arch_topology: Export cpu_scale per-cpu array Quentin Perret
2020-05-07 18:10 ` [PATCH 07/14] kthread: Export kthread_bind_mask() Quentin Perret
2020-05-07 18:10 ` [PATCH 08/14] sched/core: Export runqueues per-cpu array Quentin Perret
2020-05-08  8:07   ` Peter Zijlstra
2020-05-08 10:04     ` Quentin Perret
2020-05-07 18:10 ` [PATCH 09/14] sched/cpufreq: Export cpufreq_this_cpu_can_update() Quentin Perret
2020-05-07 18:10 ` [PATCH 10/14] sched/fair: Export cpu_util_freq() Quentin Perret
2020-05-07 18:10 ` [PATCH 11/14] tick/sched: Export tick_nohz_get_idle_calls_cpu Quentin Perret
2020-05-07 18:10 ` [PATCH 12/14] x86: Export arch_scale_freq_key Quentin Perret
2020-05-07 18:10 ` [PATCH 13/14] sched: cpufreq: Use IS_ENABLED() for schedutil Quentin Perret
2020-05-08  5:30   ` Pavan Kondeti
2020-05-08 13:21     ` Quentin Perret
2020-05-09  2:43       ` Pavan Kondeti
2020-05-07 18:10 ` [PATCH 14/14] sched: cpufreq: Modularize schedutil Quentin Perret
2020-05-07 21:34 ` [PATCH 00/14] " Valentin Schneider
2020-05-08 13:15   ` Quentin Perret
2020-05-08 14:52     ` Valentin Schneider
2020-05-08  5:33 ` Viresh Kumar
2020-05-08 13:18   ` Quentin Perret
2020-05-08  8:11 ` Peter Zijlstra
2020-05-08 10:37   ` Greg KH
2020-05-08 11:16     ` Quentin Perret
2020-05-08 11:31       ` Peter Zijlstra
2020-05-08 13:05         ` Quentin Perret
2020-05-08 13:40           ` Rafael J. Wysocki
2020-05-11  9:00             ` Quentin Perret
2020-05-11 15:26               ` Rafael J. Wysocki
2020-05-12  9:21                 ` Quentin Perret
2020-05-12 10:25                   ` Rafael J. Wysocki
2020-05-12 13:58                     ` Quentin Perret
2020-05-12 14:08                       ` Rafael J. Wysocki
2020-05-12 15:11                         ` Quentin Perret
2020-05-12 15:30                           ` Rafael J. Wysocki
2020-05-12 15:49                             ` Joel Fernandes
2020-05-13  8:57                               ` Quentin Perret
2020-05-12 16:26                             ` Quentin Perret
2020-05-12 17:30                               ` Rafael J. Wysocki
2020-05-13  9:41                                 ` Quentin Perret
2020-05-13 10:02                                   ` Greg KH
2020-05-13 10:06                                     ` Quentin Perret
2020-05-13 10:24                                       ` Greg KH
2020-05-08 14:09           ` Peter Zijlstra
2020-05-11  9:12             ` Quentin Perret
2020-05-08 11:26     ` Peter Zijlstra
2020-05-11  5:21       ` Viresh Kumar

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.