public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix dvfs_headroom escaping uclamp constraints
@ 2023-08-20 21:06 Qais Yousef
  2023-08-20 21:06 ` [PATCH 1/4] sched: cpufreq: Rename map_util_perf to apply_dvfs_headroom Qais Yousef
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Qais Yousef @ 2023-08-20 21:06 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Ingo Molnar, Peter Zijlstra
  Cc: linux-kernel, linux-pm, Vincent Guittot, Dietmar Eggemann,
	Lukasz Luba, Qais Yousef

DVFS headroom, or map_util_perf(), is applied after uclamp restrictions are
applied in effective_cpu_util(). This will lead to two problems for uclamp:

	1. If util < uclamp_min, we'll run faster than uclamp_min. For example
	   util = 50, uclamp_min = 100. map_util_perf() = 125 instead of 100.

	2. If util > uclamp_max, we'll run faster than uclamp_max. For example
	   util = 900, uclamp_max = 800, map_util_perf() = 1000.

First patch rename the function to apply_dvfs_headroom() to reflect what it
really does. It is not really mapping util, but provides some headroom for the
util to grow. Provide a documentation for the function too.

Second patch is the actual fix.

Third patch moves apply_dvfs_headroom() to sched.h as there are no longer
users outside the scheduler.

Fourth patch is an RFC to redefine what the headroom means for RT, DL and IRQ
pressures.

Thanks!

--
Qais Yousef

Qais Yousef (4):
  sched: cpufreq: Rename map_util_perf to apply_dvfs_headroom
  sched: cpufreq: Fix apply_dvfs_headroom() escaping uclamp constraints
  sched: cpufreq: Move apply_dvfs_headroom() to sched.h
  sched: cpufreq: Apply DVFS headroom to CFS only

 include/linux/energy_model.h     |  1 -
 include/linux/sched/cpufreq.h    |  5 -----
 kernel/sched/core.c              |  7 +++++--
 kernel/sched/cpufreq_schedutil.c |  5 ++---
 kernel/sched/sched.h             | 24 ++++++++++++++++++++++++
 5 files changed, 31 insertions(+), 11 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2023-09-29  8:01 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-20 21:06 [PATCH 0/4] Fix dvfs_headroom escaping uclamp constraints Qais Yousef
2023-08-20 21:06 ` [PATCH 1/4] sched: cpufreq: Rename map_util_perf to apply_dvfs_headroom Qais Yousef
2023-08-20 21:13   ` Qais Yousef
2023-08-21 16:38   ` Dietmar Eggemann
2023-08-26 20:03     ` Qais Yousef
2023-08-20 21:06 ` [PATCH 2/4] sched: cpufreq: Fix apply_dvfs_headroom() escaping uclamp constraints Qais Yousef
2023-08-21 16:39   ` Dietmar Eggemann
2023-08-26 20:08     ` Qais Yousef
2023-09-12 14:34       ` Dietmar Eggemann
2023-09-16 20:30         ` Qais Yousef
2023-08-29 14:35   ` Vincent Guittot
2023-08-29 16:37     ` Qais Yousef
2023-09-07 13:47       ` Vincent Guittot
2023-09-07 21:55         ` Qais Yousef
2023-09-08 14:30           ` Vincent Guittot
2023-09-10 17:46             ` Qais Yousef
2023-09-12 13:40               ` Dietmar Eggemann
2023-09-16 19:25                 ` Qais Yousef
2023-09-12 16:03               ` Vincent Guittot
2023-09-16 19:25                 ` Qais Yousef
2023-09-24  7:58                   ` Vincent Guittot
2023-09-24 17:23                     ` Qais Yousef
2023-09-28 17:50                       ` Vincent Guittot
2023-09-28 22:05                         ` Qais Yousef
2023-09-29  8:01                           ` Vincent Guittot
2023-08-20 21:06 ` [PATCH 3/4] sched: cpufreq: Move apply_dvfs_headroom() to sched.h Qais Yousef
2023-08-21 16:40   ` Dietmar Eggemann
2023-08-20 21:06 ` [PATCH RFC 4/4] sched: cpufreq: Apply DVFS headroom to CFS only Qais Yousef
2023-08-21 16:41   ` Dietmar Eggemann
2023-08-26 20:27     ` Qais Yousef
2023-08-21 10:34 ` [PATCH 0/4] Fix dvfs_headroom escaping uclamp constraints Rafael J. Wysocki
2023-08-26 19:17   ` Qais Yousef

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