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:	Fri, 20 Sep 2013 11:40:18 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
	Linux ACPI <linux-acpi@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq: skip loading acpi_cpufreq after intel_pstate

On 20 September 2013 10:56, Yinghai Lu <yinghai@...nel.org> wrote:
> If the hw support intel_pstate and acpi_cpufreq, intel_pstate will
> get loaded at first.

s/at //

>
> acpi_cpufreq_init will call acpi_cpufreq_early_init()
> and it allocate perf data and init those perf data in ACPI core, (that

s/it /that will /

> will go over all cpus).

s/go over/cover/

> but late it will free them as cpufreq_register_driver(acpi_cpufreq) will

s/late/later

> return fail as init_pstate already take over before.

write it as: fail as intel_pstate is already registered.

> Use cpufreq_get_current_driver() to check if we can skip the
> acpi_cpufreq loading.

The below material looks to be a separate issue and so we
probably break this patch into two?

> Also there is racing in
>         __acpi_processor_start
>                  ==> acpi_processor_load_module
>                          ==> request_module_nowait/requested = 1

> Index: linux-2.6/drivers/cpufreq/acpi-cpufreq.c
> ===================================================================
> --- linux-2.6.orig/drivers/cpufreq/acpi-cpufreq.c
> +++ linux-2.6/drivers/cpufreq/acpi-cpufreq.c
> @@ -986,6 +986,10 @@ static int __init acpi_cpufreq_init(void
>  {
>         int ret;
>
> +       /* don't keep reloading if cpufreq_driver exists */
> +       if (cpufreq_get_current_driver())
> +               return 0;
> +
>         if (acpi_disabled)
>                 return 0;

This looks fine to me..

> Index: linux-2.6/drivers/acpi/processor_perflib.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/processor_perflib.c
> +++ linux-2.6/drivers/acpi/processor_perflib.c

Can't really review this one.. Rafael will do it..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ