lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 13 Jan 2024 11:47:33 +0100
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Qais Yousef <qyousef@...alina.io>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Juri Lelli <juri.lelli@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Daniel Bristot de Oliveira <bristot@...hat.com>,
	Valentin Schneider <vschneid@...hat.com>
Subject: Re: [GIT PULL] Scheduler changes for v6.8

Le vendredi 12 janv. 2024 à 17:31:13 (-0800), Linus Torvalds a écrit :
> On Fri, 12 Jan 2024 at 17:24, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> > With a *working* kernel, I get events, setting the frequency to either
> > 2.2GHz (idle) or 3.8GHz (work).
> 
> Just to fix that - not 3.8Ghz, but in addition to 2.2 I see 2.8 or 3.7:

IIUC, with the commit you stay at lowest frequency all time which is clearly
weird. One change that could create such behavior is in
sugov_effective_cpu_perf() where we take the min between the actual
utilization and the max allowed. If max is set to min capacity for whatever
the reason, then you stay stuck to lowest capacity/frequency

What is the output of 
/sys/devices/system/cpu/cpu0/cpu_capacity

It should be 1024 or close

Could you try the below ? it skips this step and ensures to use the actual
utilization to select the frequency

---
 kernel/sched/cpufreq_schedutil.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 95c3c097083e..e420e2ee1a10 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -181,7 +181,6 @@ unsigned long sugov_effective_cpu_perf(int cpu, unsigned long actual,
 	/* Add dvfs headroom to actual utilization */
 	actual = map_util_perf(actual);
 	/* Actually we don't need to target the max performance */
-	if (actual < max)
 		max = actual;
 
 	/*
-- 
2.34.1

> 
>   ...
>   <idle>-0       [034] d.s..   208.340412: cpu_frequency:
> state=2200000 cpu_id=34
>      cc1-101686  [034] d.h..   208.342402: cpu_frequency:
> state=2800000 cpu_id=34
>      cc1-101686  [034] d.h..   208.343401: cpu_frequency:
> state=3700000 cpu_id=34
>       sh-108794  [029] d.h..   216.401014: cpu_frequency:
> state=2200000 cpu_id=29
>       sh-108794  [029] d....   216.402670: cpu_frequency:
> state=2800000 cpu_id=29
> genksyms-108565  [029] d.h..   216.404005: cpu_frequency:
> state=3700000 cpu_id=29
>   ...
> 
> etc.
> 
>               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ