fix the thermal config path and the cluster order - #64
Open
Zarathos30 wants to merge 1 commit into
Open
Conversation
AxPerfConfig only looked in /vendor/etc and /system/etc, while device/axion/common installs ax_perf_thermal.xml in /system_ext/etc, so no platform was parsing its thermal config. Read system_ext first, keeping the old paths as fallback. publishMetadata() indexed an ArrayMap keyed by group, which iterates by ascending key hashCode, so the published cluster order followed the hash of the group names instead of the config file. On a live POCO F7, ax_cpu_small_freqs holds the table of policy7. Use a LinkedHashMap. Change-Id: Ic50484d827acfe2ce5c0e4354cbd22db1c3f340f Signed-off-by: Zarathos30 <vale.rigni@gmail.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new thermal-config lookup order changes precedence (system_ext now overrides vendor), which needs an explicit decision/justification to avoid unintended device-specific behavior changes.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates AxionOS performance/thermal configuration handling in system services to (1) find the thermal config where it’s actually installed on Axion devices and (2) ensure published CPU cluster metadata preserves the cluster ordering defined in the config XML.
Changes:
- Add
/system_ext/etc/ax_perf_thermal.xmlas a thermal config search location forAxPerfConfig. - Preserve cluster order from the config when publishing CPU cluster frequency metadata by switching from
ArrayMaptoLinkedHashMap-backed ordering inAxKernelManagerService.
File summaries
| File | Description |
|---|---|
| services/core/java/com/android/server/kernel/AxKernelManagerService.java | Publishes CPU cluster metadata using insertion order so cluster roles match config file ordering. |
| services/core/java/com/android/server/am/AxPerfConfig.java | Looks for thermal config in /system_ext/etc in addition to existing vendor/system paths. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
92
to
96
| sLoaded = true; | ||
| boolean loaded = loadFrom(VENDOR_THERMAL_CONFIG, ATMC_TAG) | ||
| boolean loaded = loadFrom(SYSTEM_EXT_THERMAL_CONFIG, ATMC_TAG) | ||
| || loadFrom(VENDOR_THERMAL_CONFIG, ATMC_TAG) | ||
| || loadFrom(SYSTEM_THERMAL_CONFIG, ATMC_TAG); | ||
| if (!loaded) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AxPerfConfig only looked in /vendor/etc and /system/etc, while device/axion/common installs ax_perf_thermal.xml in /system_ext/etc, so no platform was parsing its thermal config. Read system_ext first, keeping the old paths as fallback.
publishMetadata() indexed an ArrayMap keyed by group, which iterates by ascending key hashCode, so the published cluster order followed the hash of the group names instead of the config file. On a live POCO F7, ax_cpu_small_freqs holds the table of policy7. Use a LinkedHashMap.
Change-Id: Ic50484d827acfe2ce5c0e4354cbd22db1c3f340f