Don't claim PowerCap is missing on a CPUID table miss - #599
Closed
karanshukla wants to merge 1 commit into
Closed
karanshukla wants to merge 1 commit into
karanshukla wants to merge 1 commit into
Conversation
… miss check_cpu_id() prints " Need Linux PowerCap sysfs" on any intel_id_table[] miss, without checking whether powercap is actually present. The message dates to 9b1fae1, where it was meant to state a requirement rather than a finding: an unmatched CPU can still be driven as long as the kernel exposes powercap sysfs. It reads as a diagnosis, so on a machine with a fully populated /sys/class/powercap/intel-rapl it points at the wrong subsystem and costs time to chase. Stat the path and report whichever case actually applies. Signed-off-by: Karan Shukla <karan_shukla@live.com>
Contributor
|
Applied thanks. |
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.
check_cpu_id()prints " Need Linux PowerCap sysfs" on anyintel_id_table[]miss, without checking whether powercap is actually present.The message goes back to 9b1fae1, where it was meant to state a requirement rather than a finding: an unmatched CPU can still be driven as long as the kernel exposes powercap sysfs. It reads as a diagnosis, so on a machine where
/sys/class/powercap/intel-raplis fully populated it points at the wrong subsystem. I chased it for a while on an unlisted platform before finding the real cause was the missing table entry (since fixed by dd0eb7e).This stats the path and reports whichever case applies:
CPU model not in the supported list, using Linux PowerCap sysfsUnsupported CPU model and no Linux PowerCap sysfsNo behavior change,
proc_list_matchedand the return value are untouched. Only the log line differs.Testing
Built clean on master at 19f29af.
The runtime path is hard for me to exercise honestly now: this box is Wildcat Lake, which dd0eb7e added to the table, so
!validis no longer reachable here. Forcing a table miss to reach it needs root and I only confirmed the pieces:csys_fs::exists()resolves tostat(base_path), and/sys/class/powercap/intel-rapl/stats successfully on this machine, so it would take the first row above. Compile-tested, not run through both branches.Follow-up to #598, which I closed as a duplicate.