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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <rnnx7nges4otjixz4n62q7vtgrdcphepbkpmdntupbdft2yvi7@b3ong66tikoh>
Date: Mon, 19 Jan 2026 11:07:47 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, 
	"Christophe Leroy (CS GROUP)" <chleroy@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>, 
	Alexander Gordeev <agordeev@...ux.ibm.com>, Anna-Maria Behnsen <anna-maria@...utronix.de>, 
	Ben Segall <bsegall@...gle.com>, Boqun Feng <boqun.feng@...il.com>, 
	Christian Borntraeger <borntraeger@...ux.ibm.com>, Dietmar Eggemann <dietmar.eggemann@....com>, 
	Heiko Carstens <hca@...ux.ibm.com>, Ingo Molnar <mingo@...hat.com>, 
	Jan Kiszka <jan.kiszka@...mens.com>, Joel Fernandes <joelagnelf@...dia.com>, 
	Juri Lelli <juri.lelli@...hat.com>, Kieran Bingham <kbingham@...nel.org>, 
	Madhavan Srinivasan <maddy@...ux.ibm.com>, Mel Gorman <mgorman@...e.de>, 
	Michael Ellerman <mpe@...erman.id.au>, Neeraj Upadhyay <neeraj.upadhyay@...nel.org>, 
	Nicholas Piggin <npiggin@...il.com>, "Paul E . McKenney" <paulmck@...nel.org>, 
	Peter Zijlstra <peterz@...radead.org>, Steven Rostedt <rostedt@...dmis.org>, 
	Sven Schnelle <svens@...ux.ibm.com>, Thomas Gleixner <tglx@...utronix.de>, 
	Uladzislau Rezki <urezki@...il.com>, Valentin Schneider <vschneid@...hat.com>, 
	Vasily Gorbik <gor@...ux.ibm.com>, Vincent Guittot <vincent.guittot@...aro.org>, 
	Xin Zhao <jackzxcui1989@....com>, linux-pm@...r.kernel.org, linux-s390@...r.kernel.org, 
	linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 07/15] cpufreq: ondemand: Simplify idle cputime
 granularity test

On 16-01-26, 15:52, Frederic Weisbecker wrote:
> cpufreq calls get_cpu_idle_time_us() just to know if idle cputime
> accounting has a nanoseconds granularity.
> 
> Use the appropriate indicator instead to make that deduction.
> 
> Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
> ---
>  drivers/cpufreq/cpufreq_ondemand.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
> index a6ecc203f7b7..2d52ee035702 100644
> --- a/drivers/cpufreq/cpufreq_ondemand.c
> +++ b/drivers/cpufreq/cpufreq_ondemand.c
> @@ -334,17 +334,12 @@ static void od_free(struct policy_dbs_info *policy_dbs)
>  static int od_init(struct dbs_data *dbs_data)
>  {
>  	struct od_dbs_tuners *tuners;
> -	u64 idle_time;
> -	int cpu;
>  
>  	tuners = kzalloc(sizeof(*tuners), GFP_KERNEL);
>  	if (!tuners)
>  		return -ENOMEM;
>  
> -	cpu = get_cpu();
> -	idle_time = get_cpu_idle_time_us(cpu, NULL);
> -	put_cpu();
> -	if (idle_time != -1ULL) {
> +	if (tick_nohz_enabled) {
>  		/* Idle micro accounting is supported. Use finer thresholds */
>  		dbs_data->up_threshold = MICRO_FREQUENCY_UP_THRESHOLD;
>  	} else {

Acked-by: Viresh Kumar <viresh.kumar@...aro.org>

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ