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: <56eb1f8bda3932632cc0b17dde053f77fe7f3f89.camel@intel.com>
Date: Wed, 12 Feb 2025 05:35:05 +0000
From: "Zhang, Rui" <rui.zhang@...el.com>
To: "Mehta, Sohil" <sohil.mehta@...el.com>, "Luck, Tony"
	<tony.luck@...el.com>, "x86@...nel.org" <x86@...nel.org>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
CC: "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
	"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
	"alexander.shishkin@...ux.intel.com" <alexander.shishkin@...ux.intel.com>,
	"luto@...nel.org" <luto@...nel.org>, "david.laight.linux@...il.com"
	<david.laight.linux@...il.com>, "linux-hwmon@...r.kernel.org"
	<linux-hwmon@...r.kernel.org>, "linux-perf-users@...r.kernel.org"
	<linux-perf-users@...r.kernel.org>, "Hunter, Adrian"
	<adrian.hunter@...el.com>, "jdelvare@...e.com" <jdelvare@...e.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>, "irogers@...gle.com"
	<irogers@...gle.com>, "tglx@...utronix.de" <tglx@...utronix.de>,
	"fenghua.yu@...el.com" <fenghua.yu@...el.com>, "lenb@...nel.org"
	<lenb@...nel.org>, "kan.liang@...ux.intel.com" <kan.liang@...ux.intel.com>,
	"linux@...ck-us.net" <linux@...ck-us.net>, "hpa@...or.com" <hpa@...or.com>,
	"peterz@...radead.org" <peterz@...radead.org>, "mark.rutland@....com"
	<mark.rutland@....com>, "bp@...en8.de" <bp@...en8.de>, "acme@...nel.org"
	<acme@...nel.org>, "rafael@...nel.org" <rafael@...nel.org>,
	"jolsa@...nel.org" <jolsa@...nel.org>, "linux-acpi@...r.kernel.org"
	<linux-acpi@...r.kernel.org>, "namhyung@...nel.org" <namhyung@...nel.org>
Subject: Re: [PATCH v2 06/17] cpufreq: Fix the efficient idle check for Intel
 extended Families

On Tue, 2025-02-11 at 19:43 +0000, Sohil Mehta wrote:
> IO time is considered as busy by default for modern Intel processors.
> However the check doesn't include the upcoming Family 18 and 19
> processors. Also, Arjan van de Ven says the current nature of the
> check
> was mainly due to lack of testing on old systems. He suggests
> considering all Intel processors as having efficient idle.
> 
> Extend the IO busy classification to all Intel processors starting
> with
> Family 6.
> 
> Signed-off-by: Sohil Mehta <sohil.mehta@...el.com>
> 
> ---
> 
> v2: Improve commit message and code comments.
> 
> ---
>  drivers/cpufreq/cpufreq_ondemand.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq_ondemand.c
> b/drivers/cpufreq/cpufreq_ondemand.c
> index a7c38b8b3e78..b13f197707f4 100644
> --- a/drivers/cpufreq/cpufreq_ondemand.c
> +++ b/drivers/cpufreq/cpufreq_ondemand.c
> @@ -15,6 +15,10 @@
>  #include <linux/tick.h>
>  #include <linux/sched/cpufreq.h>
>  
> +#ifdef CONFIG_X86
> +#include <asm/cpu_device_id.h>
> +#endif
> +
>  #include "cpufreq_ondemand.h"
>  
>  /* On-demand governor macros */
> @@ -32,21 +36,20 @@ static unsigned int default_powersave_bias;
>  /*
>   * Not all CPUs want IO time to be accounted as busy; this depends
> on how
>   * efficient idling at a higher frequency/voltage is.
> - * Pavel Machek says this is not so for various generations of AMD
> and old
> - * Intel systems.
> + * Pavel Machek says this is not so for various generations of AMD.
>   * Mike Chan (android.com) claims this is also not true for ARM.
> - * Because of this, whitelist specific known (series) of CPUs by
> default, and
> + * Because of this, select known series of CPUs by default, and
>   * leave all others up to the user.
>   */
>  static int should_io_be_busy(void)
>  {
>  #if defined(CONFIG_X86)
>  	/*
> -	 * For Intel, Core 2 (model 15) and later have an efficient
> idle.
> +	 * Starting with Family 6 consider all Intel CPUs to have an
> +	 * efficient idle.
>  	 */
>  	if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
> -			boot_cpu_data.x86 == 6 &&
> -			boot_cpu_data.x86_model >= 15)
> +	    boot_cpu_data.x86_vfm >= INTEL_PENTIUM_PRO)

This is "Starting from P4" rather than "Starting from Family 6", right?

thanks,
rui
>  		return 1;
>  #endif
>  	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ