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]
Message-ID: <20240617054838.9224-1-poshao.chen@mediatek.com>
Date: Mon, 17 Jun 2024 13:48:38 +0800
From: PoShao Chen <poshao.chen@...iatek.com>
To: <viresh.kumar@...aro.org>
CC: <ccj.yeh@...iatek.com>, <ching-hao.hsu@...iatek.com>,
	<clive.lin@...iatek.com>, <linux-kernel@...r.kernel.org>,
	<linux-pm@...r.kernel.org>, <poshao.chen@...iatek.com>, <rafael@...nel.org>
Subject: Re: [PATCH v2] cpufreq: Fix per-policy boost behavior after CPU hotplug

On Thu, 2024-06-13 at 14:50 +0530, Viresh Kumar wrote: 	 
> Please try this instead:
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 7c6879efe9ef..bd9fe2b0f032 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -43,6 +43,9 @@ static LIST_HEAD(cpufreq_policy_list);
>  #define for_each_inactive_policy(__policy)             \
>         for_each_suitable_policy(__policy, false)
> 
> +#define for_each_policy(__policy)                       \
> +       list_for_each_entry(__policy, &cpufreq_policy_list,
> policy_list)
> +
>  /* Iterate over governors */
>  static LIST_HEAD(cpufreq_governor_list);
>  #define for_each_governor(__governor)                          \
> @@ -2815,7 +2818,7 @@ int cpufreq_boost_trigger_state(int state)
>         write_unlock_irqrestore(&cpufreq_driver_lock, flags);
> 
>         cpus_read_lock();
> -       for_each_active_policy(policy) {
> +       for_each_policy(policy) {
>                 policy->boost_enabled = state;
>                 ret = cpufreq_driver->set_boost(policy, state);
>                 if (ret) {
> 
> -- 
> viresh

Thank you for the suggestion. However, calling ->set_boost when
the policy is inactive will fail in two ways:

1. policy->freq_table will be NULL.
2. freq_qos_update_request will fail to refresh the frequency limit.

-- 
poshao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ