Linux Power Management development
 help / color / mirror / Atom feed
From: Jiangtian Feng <jiangtianfeng@linux.alibaba.com>
To: zhongqiu.han@oss.qualcomm.com
Cc: rafael@kernel.org, viresh.kumar@linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	ananthu.cv@oss.qualcomm.com, pierre.gondois@arm.com,
	jiangtianfeng@linux.alibaba.com, christian.loehle@arm.com
Subject: Re: [RFC PATCH] cpufreq: Keep global boost enabled after partial enable
Date: Fri, 27 Nov 2026 13:59:33 +0800	[thread overview]
Message-ID: <20261127055937.728846-1-jiangtianfeng@linux.alibaba.com> (raw)
In-Reply-To: <2dcff329-4a81-42b3-b8e6-67ffc8c73f9e@oss.qualcomm.com>

On Thu, 26 Nov 2026 23:09:42 +0800, Zhongqiu Han wrote:
> Yeah, it is a real issue, global boost "only means a permission to use
> the frequency boost mechanism" (cpufreq.rst), and "per-policy boost can
> then be enabled or disabled individually" while "disabling global boost
> makes the per-policy boost interface illegal" (commit 218a06a79d9a).

Thank you for confirming the state semantics. That is the inconsistency
this RFC is intended to address.

> This function uses guard(), and cleanup.h says "usage of "goto" and
> cleanup helpers is never mixed in the same function".

Accepted. v2 removes both the goto and out_err label from this function.

> Besides, the !boost_enabled check is redundant, right? so maybe:
>
>        if (!state || !policy_success) {
>                write_lock_irqsave(&cpufreq_driver_lock, flags);
>                cpufreq_driver->boost_enabled = boost_enabled;
>                write_unlock_irqrestore(&cpufreq_driver_lock, flags);
>        }

Accepted. v2 uses this condition. When the old global value is already
1, skipping the restore is equivalent because the restore would only
write 1 again.

> Separately, the disable side can end up in a similar state: if global
> boost is already 0 and a resync write of 0 fails on some policy, that
> policy stays boosted under global boost = 0.  That's outside the scope
> of this patch, though.

Agreed. I have left that case for separate discussion rather than
expanding this patch.

I should also acknowledge that the v2 changelog and comment retained the
v1 wording. I will correct both in v3 and include per-version changes and
links to the previous postings. I should have replied to these comments
before posting v2, and will do so for subsequent revisions.

Best regards,
Jiangtian

  reply	other threads:[~2026-11-27  5:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 11:08 [RFC PATCH] cpufreq: Keep global boost enabled after partial enable Jiangtian Feng
2026-11-26 15:07 ` Christian Loehle
2026-11-27  5:59   ` Jiangtian Feng
2026-11-26 15:09 ` Zhongqiu Han
2026-11-27  5:59   ` Jiangtian Feng [this message]
2026-11-27  1:49 ` [RFC PATCH v2] " Jiangtian Feng
2026-11-27  3:41   ` Zhongqiu Han
2026-11-27  5:59     ` Jiangtian Feng
2026-11-27  6:03   ` [RFC PATCH v3] " Jiangtian Feng
2026-11-27  6:54     ` Zhongqiu Han
2026-11-27  8:23       ` Jiangtian Feng
2026-11-27  9:05     ` [PATCH v4] " Jiangtian Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261127055937.728846-1-jiangtianfeng@linux.alibaba.com \
    --to=jiangtianfeng@linux.alibaba.com \
    --cc=ananthu.cv@oss.qualcomm.com \
    --cc=christian.loehle@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pierre.gondois@arm.com \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=zhongqiu.han@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox