mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/2] cpufreq: Keep global boost enabled after partial enable
@ 2026-12-01  2:29 Jiangtian Feng
  2026-12-01  2:30 ` [PATCH 1/2] cpufreq: Allow global boost updates without active capable policies Jiangtian Feng
  2026-12-01  2:30 ` [PATCH 2/2] cpufreq: Keep global boost enabled after partial enable Jiangtian Feng
  0 siblings, 2 replies; 5+ messages in thread
From: Jiangtian Feng @ 2026-12-01  2:29 UTC (permalink / raw)
  To: rafael, viresh.kumar
  Cc: linux-pm, linux-kernel, zhongqiu.han, christian.loehle,
	ananthu.cv, pierre.gondois, zhangpengjie2, zhenglifeng1,
	zhanjie9

This series treats global boost as a persistent permission that userspace
can configure even when no active policy currently supports boost.

The first patch initializes ret to 0 so the no-active-capable-policy case
records the requested setting and returns success. The active-policy loop
is unchanged: active, boost-capable policies are still updated through
policy_set_boost(), and real callback failures are preserved. This
intentionally removes the no-policy -EOPNOTSUPP result introduced by
77cf053b041f, which userspace sees as an -EINVAL write failure.

This also handles the CPPC default-enabled case: userspace can disable
boost before a capable policy becomes available instead of having a failed
write leave the global permission enabled.

The second patch is the existing partial-enable change. If enabling at
least one policy succeeds before a later failure, global boost remains
enabled so that the valid mixed per-policy state remains locally
repairable. Disable and no-success failure paths retain their previous
behavior.

Base: Linux v7.4-rc5
  fe6ff8d5d675c01793b9f051d16055dd4aa75244

Changes in v6:
- Simplify patch 1 to ret = 0, restore for_each_active_policy(), and drop
  the v5 any_boost_supported tracking.
- Explicitly document the intentional no-policy ABI change from
  77cf053b041f and the CPPC default-enabled motivation.
- Keep patch 2 code unchanged and add Pengjie's Reviewed-by.

Previous version:
  https://lore.kernel.org/all/20261130111348.363810-1-jiangtianfeng@linux.alibaba.com/

Pengjie's default-enabled review:
  https://lore.kernel.org/all/467b9ef5-1fc3-4771-9895-363e815670c7@huawei.com/

CPPC default boost change:
  https://lore.kernel.org/all/20261118013558.3075038-1-zhangpengjie2@huawei.com/

Validation:
- ARM64 W=1 build of drivers/cpufreq/cpufreq.o with Buildroot GCC 13.3.0
  and binutils 2.43.1.
- Complete ARM64 Image build; size 43,010,560 bytes, SHA-256
  d8bd08acc9584356805575d8b7fcbf758b85d2173787df23c11c71faf4525953.
- Static state-matrix and policy-list locking/lifetime review covering
  no-policy, no-support, inactive-capable, active success/failure,
  partial-enable and subsequent online behavior.
- Independent review found no High/Medium/Low functional code issue in the
  two-patch candidate; the commit-description findings were corrected.
- Final signed patches: checkpatch 0 errors and 0 warnings for both patches.

NOT_RUN:
- CPU hotplug, suspend/resume, driver unregister/global-write concurrency,
  lockdep and KCSAN testing.
- CPPC, ACPI, AMD and ARM hardware frequency/QoS testing.
- Runtime fault injection for policy_set_boost() failures.
- The existing policy-online callback-failure handling is unchanged and is
  not claimed to be fixed by this series.

Qoder, an AI coding assistant, helped analyze the review history, design
and draft the preparatory change, and review the state matrix and failure
paths. The submitter reviewed the resulting changes and is responsible for
the final validation and submission.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH v5 0/2] cpufreq: Keep global boost enabled after partial enable
@ 2026-11-30 11:13 Jiangtian Feng
  2026-11-30 11:13 ` [PATCH 2/2] " Jiangtian Feng
  0 siblings, 1 reply; 5+ messages in thread
From: Jiangtian Feng @ 2026-11-30 11:13 UTC (permalink / raw)
  To: rafael, viresh.kumar
  Cc: linux-pm, linux-kernel, zhongqiu.han, christian.loehle,
	ananthu.cv, pierre.gondois, zhangpengjie2, zhenglifeng1,
	zhanjie9

This series treats global boost as a permission while preserving the
existing error when no registered policy supports boost.

The first patch allows the global setting to be recorded when a capable
policy is inactive or offline. Only active, boost-capable policies are
updated through policy_set_boost(); a complete lack of boost support still
returns -EOPNOTSUPP, and real driver failures are unchanged.

The second patch is the existing partial-enable change. If enabling at
least one policy succeeds before a later failure, global boost remains
enabled so that the valid mixed per-policy state remains locally
repairable. Disable and no-success failure paths retain their previous
behavior.

Base: Linux v7.4-rc5
  fe6ff8d5d675c01793b9f051d16055dd4aa75244

Changes in v5:
- Add the inactive-capable preparatory change, with links to the original
  no-policy discussion and 77cf053b041f.
- Rebase to Linux v7.4-rc5.
- Keep the partial-enable code logic from v4 unchanged.
- Link Pengjie's review below.

Previous version:
  https://lore.kernel.org/all/20261127090513.910723-1-jiangtianfeng@linux.alibaba.com/

Pengjie's review:
  https://lore.kernel.org/all/744b868b-55af-4a12-86a8-f4fd5d132e6a@huawei.com/

Validation:
- ARM64 defconfig W=1 build of drivers/cpufreq/cpufreq.o.
- Complete ARM64 Image build; size 53,234,176 bytes, SHA-256
  ce5519a4a9e498144908fc5d69f18376de23f8c80bc6ea2e2a424d35601e747a.
- Static state-matrix and policy-list locking/lifetime review covering
  no-policy, no-support, inactive-capable, active success/failure,
  partial-enable and subsequent online behavior.
- Independent review found no remaining High/Medium/Low code issue in the
  two-patch candidate.

NOT_RUN:
- CPU hotplug, suspend/resume, driver unregister/global-write concurrency,
  lockdep and KCSAN testing.
- CPPC, ACPI, AMD and ARM hardware frequency/QoS testing.
- Runtime fault injection for policy_set_boost() failures.

Qoder, an AI coding assistant, helped analyze the review history, design
and draft the preparatory change, and review the state matrix and failure
paths. The submitter reviewed the resulting changes and is responsible for
the final validation and submission.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-01  2:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01  2:29 [PATCH v6 0/2] cpufreq: Keep global boost enabled after partial enable Jiangtian Feng
2026-12-01  2:30 ` [PATCH 1/2] cpufreq: Allow global boost updates without active capable policies Jiangtian Feng
2026-12-01  2:30 ` [PATCH 2/2] cpufreq: Keep global boost enabled after partial enable Jiangtian Feng
  -- strict thread matches above, loose matches on Subject: below --
2026-11-30 11:13 [PATCH v5 0/2] " Jiangtian Feng
2026-11-30 11:13 ` [PATCH 2/2] " Jiangtian Feng
2026-11-30 13:51   ` Pengjie Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®