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] [day] [month] [year] [list]
Message-ID: <d6c93660-f7d9-4be4-ab7a-0d099d548c6a@arm.com>
Date: Thu, 28 Aug 2025 10:47:25 +0100
From: Christian Loehle <christian.loehle@....com>
To: kernel test robot <oliver.sang@...el.com>,
 "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Cc: oe-lkp@...ts.linux.dev, lkp@...el.com, linux-kernel@...r.kernel.org,
 linux-pm@...r.kernel.org
Subject: Re: [linus:master] [cpuidle] 779b1a1cb1:
 perf-bench-sched-pipe.ops_per_sec 12.9% regression

On 8/25/25 08:11, kernel test robot wrote:
> 
> 
> Hello,
> 
> kernel test robot noticed a 12.9% regression of perf-bench-sched-pipe.ops_per_sec on:
> 
> 
> commit: 779b1a1cb13ae17028aeddb2fbbdba97357a1e15 ("cpuidle: governors: menu: Avoid selecting states with too much latency")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
> 
> [still regression on      linus/master 1b237f190eb3d36f52dffe07a40b5eb210280e00]
> [still regression on linux-next/master 0f4c93f7eb861acab537dbe94441817a270537bf]
> 
> testcase: perf-bench-sched-pipe
> config: x86_64-rhel-9.4
> compiler: gcc-12
> test machine: 192 threads 4 sockets Intel(R) Xeon(R) Platinum 9242 CPU @ 2.30GHz (Cascade Lake) with 176G memory
> parameters:
> 
> 	loops: 10000000ops
> 	mode: threads
> 	cpufreq_governor: performance
> 
> 
> In addition to that, the commit also has significant impact on the following tests:
> 
> +------------------+-----------------------------------------------------------------------------+
> | testcase: change | qperf: qperf.udp.latency 8.1% regression                                    |
> | test machine     | 8 threads Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (Skylake) with 16G memory |
> | test parameters  | cluster=cs-localhost                                                        |
> |                  | cpufreq_governor=performance                                                |
> |                  | runtime=600s                                                                |
> +------------------+-----------------------------------------------------------------------------+
> 
> [snip]

This looks reasonable to me, we no longer compare s->exit_latency_ns <= latency_req( == predicted_ns)
but now just s->target_residency_ns <= data->next_timer_ns) to NOT select a polling state.

Plugging in some values:
idx0 POLLING 0:0
idx1 20000:50000
No latency_req, tick_nohz_tick_stopped() == false.
predicted_ns == 10000, data->next_timer_ns == 1000000

used to pick polling idx0 because:
latency_req = predicted_ns
// for i = 1, idx = 0
                if (s->target_residency_ns > predicted_ns) { // true
                        /*
                         * Use a physical idle state, not busy polling, unless
                         * a timer is going to trigger soon enough.
                         */
                        if ((drv->states[idx].flags & CPUIDLE_FLAG_POLLING) && // true
                            s->exit_latency_ns <= latency_req && // false
                            s->target_residency_ns <= data->next_timer_ns) { // true
                                predicted_ns = s->target_residency_ns;
                                idx = i;

now:
// for i = 1, idx = 0
(latency_req == UINT_MAX, predicted_ns == 10000)
                if (s->target_residency_ns > predicted_ns) { // true
                        /*
                         * Use a physical idle state, not busy polling, unless
                         * a timer is going to trigger soon enough.
                         */
                        if ((drv->states[idx].flags & CPUIDLE_FLAG_POLLING) && // true
                            s->target_residency_ns <= data->next_timer_ns) { // true
                                predicted_ns = s->target_residency_ns;
                                idx = i;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ