Repository navigation
cpufreq: apple-soc: enable lazy verification fast-switch on T6050 - #3397
Conversation
T6050 shares the command-state readback DVFS interface with T8140, where schedutil fast-switch requests are verified asynchronously by timer rather than blocking in ->target_index(). Before enabling .lazy_verify = true on soc_t6050_info, tighten two edge cases in the lazy-verify path: - Clamp deferred pending_pstate writes in the verify timer and restored asked_pstate writes in apple_soc_cpufreq_lazy_cap() against the current policy->min / policy->max bounds as well as the thermal ceiling. - Drop any queued pending_pstate and mark waited when fast-switch ownership ends (policy->fast_switch_enabled becomes false), so a pending schedutil request cannot fire after switching to a static governor such as powersave whose target already equals policy->cur. Enable .lazy_verify = true on soc_t6050_info so schedutil uses fast-switch without per-cluster sugov threads while ->target_index() paths keep synchronous verification. Add KUnit coverage for deferred policy-limit clamping and fast-switch handoff. Signed-off-by: Erik Bourget <[email protected]>
There was a problem hiding this comment.
apple_soc_cpufreq_clamp_pstate() ignores a live QoS maximum of zero because it only consumes qos_max > 0. The core's store_scaling_max_freq() passes zero through to freq_qos_update_request(). Before asynchronous policy reconciliation, a busy command's deferred replay can therefore use the previous higher bound, defeating the live-cap promise. Apply zero as a real ceiling and use the lowest valid OPP, consistent with the helper's below-table rule. Please test a pending fast request when the cap falls to zero, including verification before the policy worker runs. The T8140 and active fast-die rows also remain open.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
store_scaling_max_freq() and store_scaling_min_freq() pass 0 through to freq_qos_update_request(), so freq_qos_read_value() returns 0 rather than a positive frequency when a ceiling or floor is set to 0. Consume qos_max >= 0 and qos_min >= 0 in apple_soc_cpufreq_clamp_pstate() so a zero ceiling enforces the lowest valid OPP and a zero floor drops back to cpuinfo.min_freq immediately, before the asynchronous policy->update worker runs. Extend cft_test_verify_policy_cap_lift() to queue a pending fast-switch request, drop the userspace FREQ_QOS_MAX request to 0 while holding policy->rwsem so policy->update stays blocked, and verify that both timer replay and subsequent fast-switch requests clamp to the lowest valid OPP. Signed-off-by: Erik Bourget <[email protected]>
When fast-switch is enabled, schedutil's ->limits() callback only marks limits_changed instead of invoking cpufreq_policy_apply_limits(), so a QoS ceiling drop below an already-accepted high P-state leaves hardware above the ceiling until the next scheduler utilization callback runs. Extract apple_soc_cpufreq_lazy_reconcile() and call it from apple_soc_cpufreq_verify_policy() so the policy worker clamps an active or pending P-state immediately when new policy bounds tighten, even with no pending request and no scheduler callback. Narrow the comment in apple_fast_die_work() to note that immediate restore applies when asked_pstate has not been overwritten by a post-reconcile capped fast_switch(). Wire apple_soc_cpufreq_verify_policy into cft_live_driver, add cft_test_verify_policy_ceiling_drop covering high accepted P-state clamping with no pending request and no scheduler callback, and update cft_test_verify_policy_cap_lift to test against the reconciled policy->max. Signed-off-by: Erik Bourget <[email protected]>
…lication When the verify timer replays a pending fast-switch request after a QoS ceiling drops, apple_soc_cpufreq_verify() commands the clamped P-state without updating policy->cur, leaving policy->cur stale even after policy->update runs when expected_pstate is already within bounds. Additionally, cpufreq_driver_fast_switch() writes policy->cur after ->fast_switch() returns, so a concurrent policy->update or lazy_cap() reconciliation running right after priv->lock is released can publish the lower frequency before cpufreq_driver_fast_switch() overwrites policy->cur with the older value. Add CPUFREQ_DRIVER_UPDATES_CUR so drivers that synchronize hardware and policy->cur under an internal lock publish policy->cur directly and cpufreq_driver_fast_switch() reads READ_ONCE(policy->cur) instead of overwriting it. Extract apple_soc_cpufreq_publish_cur(), call it from pending-request replay when the command is accepted, publish policy->cur under priv->lock in apple_soc_cpufreq_lazy_request() and in apple_soc_cpufreq_fast_switch(), and add KUnit coverage for both the zero-ceiling replay without a follow-up fast switch and the unlock-to-core reconciliation race. Signed-off-by: Erik Bourget <[email protected]>
Standalone QoS ceiling drops, thermal lazy_cap() updates, and clamped pending-request replays update hardware and policy->cur under priv->lock without notifying cpufreq_stats, so stats/time_in_state keeps charging residency to the old frequency until another transition occurs. Have drivers setting CPUFREQ_DRIVER_UPDATES_CUR record cpufreq_stats under their own lock alongside policy->cur instead of calling cpufreq_stats_record_transition() after ->fast_switch() returns in cpufreq_driver_fast_switch(), preventing an older fast-switch completion from overwriting a concurrent clamp's stats. Export cpufreq_stats_record_transition() for modular builds, extract apple_soc_cpufreq_record_cur() so fast_switch, async verify replays, policy->update reconciliations, lazy_cap(), and suspend fallthrough all update policy->cur and cpufreq_stats atomically under priv->lock, enable CONFIG_CPU_FREQ_STAT in apple-soc-cpufreq.kunitconfig, and add KUnit coverage for standalone QoS/thermal/replay clamps and fast-switch races. Signed-off-by: Erik Bourget <[email protected]>
When DVFS is busy, apple_soc_cpufreq_lazy_set() queues pending_pstate without writing hardware or updating expected_pstate. Recording cpufreq_stats alongside optimistic policy->cur publication in apple_soc_cpufreq_lazy_request() and apple_soc_cpufreq_lazy_reconcile() caused stats/time_in_state to charge residency to a queued frequency that hardware never entered if the request was later clamped or dropped at the verify deadline. Separate cpufreq_stats_record_transition() from optimistic policy->cur updates so lazy-path requests and reconciliations only record stats when hardware accepts the P-state (an immediate non-busy write, an accepted timer replay, or an idle cluster whose expected_pstate already matches), while busy-queued requests update policy->cur only. Add KUnit coverage for busy-then-discarded requests and accepted timer replays. Signed-off-by: Erik Bourget <[email protected]>
…scale When a fast-switch request is queued behind busy DVFS, policy->cur holds the optimistic queued frequency while hardware and cpufreq_stats remain on the last accepted P-state. Dropping that request on drain or timer failure left policy->cur optimistic, and calling cpufreq_freq_transition_begin()/end() across a failing suspend wrote the unissued suspend target and rolled cpufreq_stats back to the discarded queued frequency. Restore policy->cur to expected_pstate when dropping a queued request on drain or failure, and settle lazy-verify suspend via apple_soc_cpufreq_set_pstate() before calling apple_soc_cpufreq_record_cur() so a failed suspend keeps policy->cur and cpufreq_stats strictly on the last accepted hardware state. Also update arch_set_freq_scale() from apple_soc_cpufreq_record_cur() on accepted transitions (exporting topology_set_freq_scale() for modular builds) and move the core arch_set_freq_scale() call under the !CPUFREQ_DRIVER_UPDATES_CUR branch in cpufreq_driver_fast_switch() so standalone clamps and replays update scheduler frequency invariance immediately without being overwritten by a concurrent fast-switch completion. Add KUnit coverage for failed suspend with a queued request and frequency-scale updates across clamps, replays, and races. Signed-off-by: Erik Bourget <[email protected]>
When a fast-switch request is queued behind busy DVFS, policy->cur holds the optimistic queued frequency while hardware and cpufreq_stats remain on expected_pstate. In apple_soc_cpufreq_lazy_set(), clearing pending_pstate before apple_soc_cpufreq_lazy_write() prevented apple_soc_cpufreq_fail() from restoring policy->cur to expected_pstate when a subsequent fast-switch or limit update found an idle register with an unexpected P-state. Three non-fast-switch discard paths in apple_soc_cpufreq_get_rate() and apple_soc_cpufreq_verify() also cleared pending_pstate without restoring policy->cur. Extract apple_soc_cpufreq_drop_pending() to clear pending_pstate and restore policy->cur to expected_pstate without charging cpufreq_stats or frequency scale, use it across all discard paths, and defer clearing pending_pstate in apple_soc_cpufreq_lazy_set() until apple_soc_cpufreq_lazy_write() succeeds. Update the governor handoff KUnit test to expect expected_pstate instead of the discarded queued frequency, and add KUnit coverage for idle-mismatch discards across fast_switch(), lazy_cap(), policy->update, and verify timer replay. Signed-off-by: Erik Bourget <[email protected]>
In lazy-verify suspend, calling apple_soc_cpufreq_set_pstate() followed by apple_soc_cpufreq_record_cur() kept failed suspends out of cpufreq_stats and scheduler frequency scale, but skipped cpufreq_freq_transition_begin()/end() on successful suspend frequency changes, dropping cpufreq transition notifications and the power:cpu_frequency trace event. Snapshot the accepted hardware frequency before calling apple_soc_cpufreq_set_pstate() in apple_soc_cpufreq_suspend(). When policy->suspend_freq is set and the hardware transition succeeds at a different frequency, report it via cpufreq_freq_transition_begin() and cpufreq_freq_transition_end(..., 0) so power:cpu_frequency, transition notifiers, cpufreq_stats, policy->cur, and arch_set_freq_scale() are all updated once without touching stats or tracepoints when suspend fails. Enable CONFIG_TRACEPOINTS via CONFIG_FTRACE and CONFIG_ENABLE_DEFAULT_TRACERS in apple-soc-cpufreq.kunitconfig and extend cft_test_stats_busy_suspend_fail() to verify power:cpu_frequency trace emission on failed, successful, and no-op suspends. Signed-off-by: Erik Bourget <[email protected]>
KUnit runs deferred cleanup actions in a separate thread after the test function returns, so passing a stack-allocated cft_freq_trace to register_trace_cpu_frequency() risks dereferencing an expired stack object before cft_unregister_freq_trace() unregisters and synchronizes the tracepoint. Allocate trace_ctx in cft_test_stats_busy_suspend_fail() with kunit_kzalloc() before registering the cleanup action so LIFO teardown runs unregister_trace_cpu_frequency() and tracepoint_synchronize_unregister() before the trace context is freed. Signed-off-by: Erik Bourget <[email protected]>
|
Fixed in
Verified at
J716c live hardware at |
There was a problem hiding this comment.
Zero is now handled as a real QoS bound, including before core policy reconciliation. The revised core contract leaves accepted-state accounting and frequency invariance with the driver for its opt-in path, while default drivers retain core accounting. Code approved. The reported KUnit and J716c results cover clamp and governor handoff; T8140 and active fast-die-effort hardware coverage remains open.
Modular cpufreq drivers that enforce live QoS bounds synchronously from fast-switch or hrtimer paths before the asynchronous policy->update worker runs need to read &policy->constraints directly via freq_qos_read_value(). Without an export, building CONFIG_ARM_APPLE_SOC_CPUFREQ=m fails modpost with undefined symbol freq_qos_read_value. Export freq_qos_read_value() with EXPORT_SYMBOL_GPL(), matching the other freq_qos_* helpers in kernel/power/qos.c. Signed-off-by: Erik Bourget <[email protected]>
|
Hardware at
At Follow-up commit Local verification at
Live modular (
Still under |
There was a problem hiding this comment.
Verdict: MERGE at 3653dfe8 once the queued CI checks pass.
Blockers: none in code (queued CI pending).
Checked: Delta commit 3653dfe88e (kernel/power/qos.c) over previously approved 085f7d94fc, modular (=m) and built-in (=y) link/build verification, KUnit results, and J716c + J713 hardware rows.
Evidence
- Delta since approved
085f7d94fc(3653dfe88e): Single-lineEXPORT_SYMBOL_GPL(freq_qos_read_value);inkernel/power/qos.c, matching adjacentfreq_qos_*exports and resolving theCONFIG_ARM_APPLE_SOC_CPUFREQ=mmodpostundefined-symbol failure. - Verification at
3653dfe88e: CleanW=1 KCFLAGS="-Werror"builds and fullImage+moduleslink for both=mand=y, arm64 QEMU KUnitapple-soc-cpufreq.kunitconfig90/90(72/72apple_soc_cpufreq*+18apple-clpc*),checkpatch --strict0/0/0, live modular J716c (T6050) verification (0sugovthreads), and second-family J713 (T8132) live fast-switch (cpufreq_driver_fast_switch/apple_soc_cpufreq_fast_switch/power:cpu_frequencyhits) +s2idlePASS.
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What: Enable
lazy_verifyfast-switch DVFS on T6050 (apple,t6050-cluster-cpufreq) to eliminatesugovkthread wakeups and cross-CPU IPIs, while enforcing live QoS/thermal caps across fast-switch, cap-lift, zero-ceiling pending-request replay, policy-worker reconciliation, suspend transitions,cpufreq_statsaccounting, scheduler frequency-invariance scale updates, andpower:cpu_frequencytrace emission.Tested: Modular (
=m) and built-in (=y) host checks plus live modular hardware at3653dfe88ef8(aurora_defconfig,CONFIG_CPU_FREQ_STAT=y; full details and earlier085f7d94fce2runs in Evidence):W=1 KCFLAGS="-Werror"clean on all 5 touched C files and fullImage+moduleslink (=mmodpostexportsfreq_qos_read_value,topology_set_freq_scale,cpufreq_stats_record_transition;=yImageclean); arm64 QEMU KUnit (apple-soc-cpufreq.kunitconfig)90/90passed (72/72apple_soc_cpufreq*+18apple-clpc*, after an earlier transient QEMU timing race incft_test_stats_busy_suspend_failunder host load);checkpatch.pl --strict0/0/0;git diff --checkandmerge-treevsorigin/mainclean.=m): batched3545ebecb76f(8/8PR files blob-identical, default cmdline):apple_soc_cpufreq.koloaded,0sugovthreads across all steps, initial inventorypolicy0/6300 MHz..4.38 GHzandpolicy12300 MHz..4.608 GHz(apple-cpufreq,schedutil);policy0clamped to300 MHz(cur=300 MHzunder load), ceiling restored to4.38 GHz(unpinned load still readcur=300 MHzafter lift; pinned all-policy lift passed at085f7d94fce2),policy0governor handoffsperformance(4.38 GHz) ->powersave(300 MHz) ->schedutil(1.644 GHz) clean; 4×pm_test=devices+ 2×pm_test=platformclean; 6-item smoke pass (aurora-peripherals.servicewarm-reboot baseline failure also on default/control).=m): combined#3546+#3397trial (8/8#3397files blob-identical includingkernel/power/qos.c, default cmdline +panic=10):apple-soc-cpufreq.kolinked viamodpost(provingEXPORT_SYMBOL_GPL(freq_qos_read_value)), booted via one-shot GRUB, loaded inlsmod(65,536B), and passed 8-item boot smoke (0failed units,0AppArmor denials);ktb.sh cpufreqwas not run before the combined#3546+#3397candidate became unreachable during#3546's hots2idleretest (cause unresolved; baseline default kernel survived the same hots2idleprocedure, while fast-switch kprobes ands2idlepreviously passed as=yat085f7d94fce2).Risk: two-way door · T6050 Macs (J716c, J714s/c, K114/K116), shared
lazy_verifypath on T8140, and sharedapple-soc-cpufreq/cpufreq_driver_fast_switch()CPUFREQ_DRIVER_UPDATES_CUR/freq_qos_read_value()path across Apple Silicon MacsRevert:
git revertthe PR merge commit (all changes are in-memory cpufreq core, QoS export, stats, frequency-invariance, and driver state; no persistent on-disk, ESP, or firmware state is modified).Not yet: J713 (
T8132) modular (CONFIG_ARM_APPLE_SOC_CPUFREQ=m)ktb.sh cpufreqgovernor/clamp/kprobe/s2idlere-check at3653dfe88ef8(ktb.sh cpufreqwas not run before the combined#3546+#3397candidate became unreachable during#3546's hots2idleretest; cause unresolved while baseline survived the same procedure; fast-switch kprobes ands2idlepassed as=yat085f7d94fce2, andapple-soc-cpufreq.kolinked/booted/loaded as=mat3653dfe88ef8); J313 (T8103) second-family non-regression row at3653dfe88ef8(J313 became unreachable on baselinemaindeep sleep); T8140 (J700) regression run and board withapple,fast-die-effortactive (no T8140 or J714s hardware on site; covered by 72/72 arm64 QEMU KUnitapple_soc_cpufreq*tests).Details
.lazy_verify = trueonsoc_t6050_info, addsCPUFREQ_NEED_UPDATE_LIMITSandCPUFREQ_DRIVER_UPDATES_CURonapple_soc_cpufreq_driver.CPUFREQ_DRIVER_UPDATES_CUR(include/linux/cpufreq.h) so drivers that update hardware from asynchronous limit or timer paths publishpolicy->cur, recordcpufreq_stats_record_transition(), and updatearch_set_freq_scale()themselves whilecpufreq_driver_fast_switch()readsREAD_ONCE(policy->cur)and skips duplicate post-return stats and frequency-scale writes, preventing a concurrent clamp'spolicy->cur,cpufreq_stats, or scheduler frequency invariance from being overwritten by an older->fast_switch()completion; exportscpufreq_stats_record_transition()(drivers/cpufreq/cpufreq_stats.c),topology_set_freq_scale()(drivers/base/arch_topology.c), andfreq_qos_read_value()(kernel/power/qos.c) for modular builds.apple_soc_cpufreq_clamp_pstate()resolves livefreq_qosmin/max bounds (qos_max >= 0,qos_min >= 0, so0fromstore_scaling_max_freq()/store_scaling_min_freq()is honored immediately viafreq_qos_read_value(&policy->constraints, ...)) againstpolicy->freq_tablewith cpufreq's maximum-first OPP semantics (including ceilings below the lowest OPP) pluspriv->cap_pstate.apple_soc_cpufreq_record_cur(),apple_soc_cpufreq_publish_cur(),apple_soc_cpufreq_drop_pending(), andapple_soc_cpufreq_lazy_reconcile()so lazy-path hardware-accepted transitions (apple_soc_cpufreq_lazy_request(),apple_soc_cpufreq_lazy_cap(),apple_soc_cpufreq_verify_policy(), and pending-request replay inapple_soc_cpufreq_verify()) keep hardware,policy->cur,cpufreq_stats, andarch_set_freq_scale()synchronized underpriv->lock, while busy-queued requests updatepolicy->curoptimistically without chargingcpufreq_statsorarch_set_freq_scale()unless hardware later accepts the P-state; every pending-request discard path (apple_soc_cpufreq_drop_pending()viaapple_soc_cpufreq_fail(),apple_soc_cpufreq_drain(),apple_soc_cpufreq_verify(), andapple_soc_cpufreq_get_rate(), withapple_soc_cpufreq_lazy_set()keepingpending_pstateintact untilapple_soc_cpufreq_lazy_write()succeeds) restorespolicy->curtoexpected_pstate. Outsidepriv->lock,apple_soc_cpufreq_suspend()callsapple_soc_cpufreq_set_pstate()first: a failed suspend leavescpufreq_stats,arch_set_freq_scale(), and tracepoints untouched (restoringpolicy->curwhenpolicy->suspend_freqis set), a configuredpolicy->suspend_freqfrequency change reports viacpufreq_freq_transition_begin()/cpufreq_freq_transition_end(..., 0), and a!policy->suspend_freqor same-frequency suspend callsapple_soc_cpufreq_record_cur(); non-lazyapple_soc_cpufreq_fast_switch()records under the core's fast-switch serialization contract.apple_fast_die_work()re-appliesapple_fast_die_cap()underfd->lockafterfreq_qos_update_request()publishes a lifted limit so tickless clusters whoseasked_pstatehas not been overwritten by a post-reconcile cappedfast_switch()restore immediately without waiting forpolicy->updateor overwriting a concurrent lower thermal sample; oncepolicy->maxhas clamped andfast_switch()has recorded the capped frequency asasked_pstate, restoration waits for the next scheduler utilization callback afterpolicy->update.apple_soc_cpufreq_suspend()drains pending lazy writes, snapshots the acceptedexpected_pstatefrequency, clampspolicy->suspend_freq/ current state against the live ceiling, callsapple_soc_cpufreq_set_pstate(), and on a successfulpolicy->suspend_freqfrequency change reports it viacpufreq_freq_transition_begin()/cpufreq_freq_transition_end(..., 0)(emittingpower:cpu_frequency, transition notifiers,cpufreq_stats,policy->cur, andarch_set_freq_scale()once, while leaving failed or same-frequency suspends free of spurious transitions/traces).apple-soc-cpufreq.kunitconfigenablesCONFIG_CPU_FREQ_STAT=yandCONFIG_TRACEPOINTS(CONFIG_FTRACE=y+CONFIG_ENABLE_DEFAULT_TRACERS=y), andapple-soc-cpufreq-test.cwiresapple_soc_cpufreq_verify_policyandCPUFREQ_DRIVER_UPDATES_CURintocft_live_driver, updatescft_test_lazy_policy_limits_and_handoffandcft_test_verify_policy_cap_lift, and addscft_test_verify_policy_ceiling_drop,cft_test_fast_switch_reconcile_race,cft_test_stats_clamp_and_race(witharch_scale_freq_capacity()checks),cft_test_stats_busy_then_discard,cft_test_stats_busy_suspend_fail(withpower:cpu_frequencytracepoint assertions), andcft_test_stats_idle_mismatch_discard.drivers/cpufreq/apple-soc-cpufreq.c:aurora-silicon/linux#2302(sweep/cpufreq-lazy, which removeslazy_verifyand keys onverify_transition) andaurora-silicon/linux#3471(pr/apple-cpufreq-fast-die-hz). Whichever lands first will require reconcilingdrivers/cpufreq/apple-soc-cpufreq.cin the remaining PRs.Evidence
Local checks at
3653dfe88ef8:git diff --check 124e30a6718d..HEAD: clean./scripts/checkpatch.pl --strict --git 085f7d94fce2..HEAD: 0 errors / 0 warnings / 0 checks on3653dfe88ef8(earlier124e30a6718d..085f7d94fce210 commits also 0/0/0)git merge-tree --write-tree origin/main HEAD(againstb897ccb4e71c): clean (f85ee42b936a)aurora_defconfig,CONFIG_ARM_APPLE_SOC_CPUFREQ=m,CONFIG_CPU_FREQ_STAT=y):make O=_build_m ARCH=arm64 LLVM=1 W=1 KCFLAGS="-Werror" -j32 kernel/power/qos.o drivers/cpufreq/cpufreq.o drivers/cpufreq/cpufreq_stats.o drivers/base/arch_topology.o drivers/cpufreq/apple-soc-cpufreq.o: cleanmake O=_build_m ARCH=arm64 LLVM=1 -j32 Image modules: clean (_build_m/drivers/cpufreq/apple-soc-cpufreq.ko486K;Module.symversexportsfreq_qos_read_value,topology_set_freq_scale, andcpufreq_stats_record_transitionasEXPORT_SYMBOL_GPL)aurora_defconfigwithCONFIG_ARM_APPLE_SOC_CPUFREQ=y,CONFIG_CPU_FREQ_STAT=y):make O=_build_m ARCH=arm64 LLVM=1 W=1 KCFLAGS="-Werror" -j32 kernel/power/qos.o drivers/cpufreq/cpufreq.o drivers/cpufreq/cpufreq_stats.o drivers/base/arch_topology.o drivers/cpufreq/apple-soc-cpufreq.o: cleanmake O=_build_m ARCH=arm64 LLVM=1 -j32 Image: clean (65M)./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/cpufreq/apple-soc-cpufreq.kunitconfig --build_dir=_build_kunit --jobs=32:90/90passed (72/72apple_soc_cpufreq*subtests +18apple-clpc*subtests; one earlier run hit a transient QEMU hrtimer/busy-timeout timing race incft_test_stats_busy_suspend_failwhile the host was loaded before passing90/90on re-run)Live modular (
CONFIG_ARM_APPLE_SOC_CPUFREQ=m) hardware at3653dfe88ef8(2026-11-28):3545ebecb76f(origin/mainb897ccb4e71c+ 18 PRs, AC power, default command line;8/8PR files blob-identical to3653dfe88ef8, which is an ancestor of the booted tree):Image.gzSHA-256d56efde4c7232208bd29d5c4e5890319e0050595dd4f4b1c3844df6656a08312,t6050-j716c.dtbSHA-256d2f0db7a5026ae9cc4e1cff61dca38b4d1b363d47e5bad696ef65c7d715517e0, modules SHA-2569d5782bcf02ea60a225278c9319431f902b495f6beb485d79d127c0fb2fccc92, one-shotaura-tryStage 2 SHA-256b7d99286395ddd7dadccc6d9593f4bd55391d9e787af97c18b45f58688d9885d(default Stage 221edee972e1ff1718c6f41c32b91ee151afdc58cbb69f16f2f6a4d8d4c722170, default kernelbf2582ab357573db64031f39e7bc9d617eb574c6b221364ff417810bbddf4c87, default DTBffe7604c98ad23849b2aff19eb161bec712f8b367a9bc87339fabb6d7dc1276cunchanged).apple_soc_cpufreq.koloaded (65,536B, used bymacsmc_hwmon),0sugovthreads before and after all steps; initial policy inventorypolicy0(300 MHz..4.38 GHz),policy6(300 MHz..4.38 GHz), andpolicy12(300 MHz..4.608 GHz) all on driverapple-cpufreq, governorschedutil;policy0scaling_max_freqclamped to minimum (300 MHz;scaling_cur_freq300 MHzunder load) and restored to4.38 GHz(an unpinned load still readcur=300 MHzafter ceiling lift because it was not pinned topolicy0's CPUs; pinned all-policy lift acrosspolicy0/6/12already passed at085f7d94fce2);policy0governor handoffsperformance(4.38 GHz) ->powersave(300 MHz) ->schedutil(1.644 GHz) clean.pm_test=devicesand 2×pm_test=platformclean (rc=0,fail=0);eDP-13456x2234@120enabled, 4 input devices,wlan00% loss,AppleJ716+AppleJ716HPAIenumerated (speakerguardd-v2active), BorealisApple M5 Max (G17C B1)+vkcube --c 180OK,0failed user units,0LSM denials,0Oops/BUG/fault (aurora-peripherals.servicewarm-reboot baseline failure also on control/default;40err+lines pre-existing vs55-line default boot exceptPM: suspend debugand 3 DPMSIOAVVideoInterface open failedsyslog lines).8dbfa2895b93),#3546, and#3397(8/8#3397files blob-identical to3653dfe88ef8, includingkernel/power/qos.cviab68cb02f62fb,CONFIG_ARM_APPLE_SOC_CPUFREQ=m, default command line +panic=10):cebaa4e73e6268f14de680996a76fa94d301be8a675b7614044da050d4223f73, initramfs SHA-256fb26adb095b714a902ef195b5bfa9e1217e4c61649f472829e88d9a51183e914,apple-soc-cpufreq.koSHA-256d57969517ec3c01db5a4d0d3075b62aefa3e37d016fc6e949c82eda355d934e5, default Stage 23b2d2f059858d1891b225910864c02d68afb1b42893667e0afa8666491651071unchanged.3653dfe88ef8resolved thefreq_qos_read_valuemodpost failure (kernel/power/qos.c'sEXPORT_SYMBOL_GPL(freq_qos_read_value)proven byapple-soc-cpufreq.kolinking viamodpostand loading);apple-soc-cpufreq.kobooted cleanly via one-shot GRUB and appeared loaded inlsmod(65,536B,2users:macsmc_hwmon,apple_pmp_thermal); boot smoke passed (eDP-12560x1664enabled, BorealisApple M4 (G16G B0)glmark25,066,speakerguardd-v2protected tone rc0,0failed units,0AppArmor denials,3baselineerr+lines only).ktb.sh cpufreqwas not run: the modularktb.sh cpufreqgovernor handoff, clamp/lift, fast-switch kprobe, ands2idlere-check did not run before the combined#3546+#3397candidate became unreachable during#3546's hots2idleretest (cause unresolved; the baseline default kernel survived the same hots2idleprocedure, while no#3397-only control ran; fast-switch kprobes ands2idlepreviously passed as=yat085f7d94fce2below, and3653dfe88ef8only addsEXPORT_SYMBOL_GPL(freq_qos_read_value)).Earlier local & CI checks at
085f7d94fce2(prior to3653dfe88ef8):./scripts/checkpatch.pl --strict --git 124e30a6718d..085f7d94fce2: 0 errors / 0 warnings / 0 checks across all 10 commits (f735894bca19,ebb208262921,c858fe9190fb,0b0f4932776b,8d590f14110f,5c269a610a54,8cdb8aea6864,db5b9826138b,e4d2c89e02e2,085f7d94fce2)CONFIG_CPU_FREQ_STAT=n(_buildwithW=1 KCFLAGS="-Werror"): clean ate4d2c89e02e2for bothCONFIG_ARM_APPLE_SOC_CPUFREQ=mandCONFIG_ARM_APPLE_SOC_CPUFREQ=y;CONFIG_CPU_FREQ_STAT=ywithCONFIG_ARM_APPLE_SOC_CPUFREQ=yalso clean (085f7d94fce2touchesdrivers/cpufreq/apple-soc-cpufreq-test.conly).085f7d94fce2: 21 successful checks (apple-build, 16 KUnit jobs,host-tests738/738, etc.) + 2 cancelled (pr-text,readiness);3653dfe88ef8is not yet pushed to GitHub.Earlier live J716c (16-inch M5 Max, T6050) at
085f7d94fce2in batched candidatec3da8eed6f72(overmain9af21b007425, default cmdline, default Stage 2, Linux 7.3.0, AC 100%; prior to3653dfe88ef8):ps -eo pid,comm | grep sugov:0threadspolicy0/policy6/policy12:drv=apple-cpufreq gov=schedutilscaling_max_freqclamp to1344000kHz (policy12:1308000kHz, its OPP-table value) applied within 50 ms, e.g.policy0cur=2964000 -> 1344000stats/total_transandtime_in_stateimmediately (6590 -> 6593within 50 ms)scaling_max_freqworked on all 3 policies, and again after each of 2xpm_test=devicessuspend/resume cyclesEarlier live J716c governor handoff at
085f7d94fce2(four-PR batched candidatef59b93fb961fovermain9af21b007425, default command line, default Stage 2, Linux 7.3.0, AC 100%;policy0cpu0-5,policy6cpu6-11,policy12cpu12-17;apple-cpufreq; prior to3653dfe88ef8):schedutil->powersave(scaling_governor=powersave,cur=300000kHz, also under a pinned busy loop) ->performance(cur4380000kHz onpolicy0/policy6,4608000kHz onpolicy12) ->schedutil; every write succeeded andps -e -o comm | grep -c '^sugov'was0at every step.stats/total_trans:policy01,074 -> 1,100,policy61,322 -> 1,345,policy122,306 -> 2,344.scaling_max_freq1344000kHz (policy12:1308000) under a pinned busy loop:cur=1344000(policy121308000); restoring the original maximum under load:cur=4380000(policy124608000); two morepowersave->schedutilhandoffs with the clamp set keptscaling_max_freqat the clamp; allscaling_governor=schedutil,scaling_min_freq=300000,scaling_max_freq4380000/4380000/4608000restored afterwards.0new error-leveldmesglines during the run; whole boot0panics/Oops/BUG/SErrors/DART faults/GPU faults/WARNINGlines/LSM denials.Earlier-head J716c run at
f735894bca19(default cmdline):ps -eo pid,comm | grep sugov: 0 threadspolicy0/policy6/policy12:drv=apple-cpufreq gov=schedutilpolicy6clamp to3504000kHz ->cur=300000 <= 3504000,powersave->cur=300000, restoreschedutil+4380000kHz cleanpm_test=devices(echo freeze > /sys/power/state): exit 0, 0 DVFS errors/warningsEarlier live J713 (M4 Air, T8132) at
085f7d94fce2in batched candidate76649338a1bc(the J713 default kernel source8dbfa2895b93plus the heads of drm/asahi: g16 + t8132: scale CLPC memory states by GPU busy share #3491, arm64: dts: apple: t6050-j716c: wire HPM SPMI interrupts and SMC power sensors #3291, cpufreq: apple-soc: enable lazy verification fast-switch on T6050 #3397, drm/apple: enable static-frame idle caching on firmware 27 panels #3289, ASoC: apple: enable J716c (16-inch M5 Max) AOP audio, v2-only speakers, jack and mic array #3085, phy: apple: atc: enable runtime idle power-off on T8103 #3223, arm64: dts: apple: t6050: allow idle ps_isp_sys domain to power off #3329, PCI/ASPM: add sleep L1SS suppression and deferred D0 PM recheck #3495, thermal: apple-pmp: avoid P-core wakeups for cool idle polling #3546 and drm/asahi: g16: lower governed GPU floor from S3 to S2 #3548, with drm/apple: drive a two-display dock from the firmware-27.2 T8132 dcpexts #3273, drm/apple: soft power-off firmware-27 internal panel on DPMS off #3294 and serial: apple-dockchannel: stop idle console drain timer, back off RX, and add sleep PM #3335 already included; default command line pluspanic=10; prior to3653dfe88ef8), all seven PR files blob-identical,CONFIG_ARM_APPLE_SOC_CPUFREQ=y:scaling_driver=apple-cpufreq, governorschedutil;policy0cur 1.26 GHz idle, 3.468 GHz under load;policy12.892 GHz under load, 0.9-1.08 GHz idle.cpufreq_driver_fast_switch69hits,apple_soc_cpufreq_fast_switch79hits,power:cpu_frequency328events.s2idlecycle: resumed,0DVFS errors/warnings,0failed units.e8e9fd2813dd6347176d0e4a55a70d1c694bdab75817c3ab83c441c203140491, one-shot Stage 2 SHA-256f7d4e2f7ebbfb423bd71f233f1aef7af0a39091b288a749d25f9250eb80adbfa(default Stage 2 and kernel untouched).eDP-12560x1664@60 enabled; no external monitor or dock attached), input (Apple MTP keyboard and trackpad devices enumerated, not exercised remotely), networking (wlan0connected, gateway ping 0% loss), permitted audio sink (speakerguardd-v2active, 1 s tone at -26 dB through the protected default sink, rc 0), GPU rendering (BorealisApple M4 (G16G B0), Vulkan 1.4.363,glmark2score 5,099),0failed units,0AppArmor denials (no SELinux on this userland).err-leveldmesg: the three lines the default kernel also logs (apple-dcp 30ae00000.dcp: AFK[ep:20]: failed to extract init props: -2,unsupported DFB layout 2560x1664 format=0x62336138 compression=3 (-22), anapple_sep ... matching unavailable this bootnotice) plus onebrcmfmac 0000:01:00.0: brcmf_pcie_ring_mb_update_rptr: ring 4: r_ptr 0 outside depth 0at 9.2 s that no PR in the batch touches.CONFIG_ARM_APPLE_SOC_CPUFREQ=mat085f7d94fce2failedmodpostonfreq_qos_read_value, resolved by3653dfe88ef8.