Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[collectd 6] cpufreq plugin: migration to collectd 6. #4277

Open
wants to merge 1 commit into
base: collectd-6.0
Choose a base branch
from

Conversation

octo
Copy link
Member

@octo octo commented Feb 7, 2024

ChangeLog: cpufreq plugin: Migration to v6.0. Support for the "cpufreq-stats" Linux driver has been dropped because the code was hard to port and had no test coverage.

@octo octo added the Feature label Feb 7, 2024
@octo octo requested a review from a team as a code owner February 7, 2024 19:57
@collectd-bot collectd-bot added this to the 6.0 milestone Feb 7, 2024
@eero-t
Copy link
Contributor

eero-t commented Feb 12, 2024

Time-in-state stats are not enabled by default in kernel, and not available for CPUs which frequency / power management is done by firmware (instead of kernel being in control of changing the frequencies by itself): https://www.kernel.org/doc/Documentation/cpu-freq/cpufreq-stats.txt

=> dropping that info is OK'ish.

However, Changelog entry should mention that time-in-state info is dropped, as that's the actually useful information, whereas scaling frequency value is just a sample of a value that can fluctuate between its min & max values at few millisecond intervals (i.e. basically a random value for anything else than steady-state workloads)...

@octo
Copy link
Member Author

octo commented Feb 12, 2024

Reworded the ChangeLog entry. I agree that the time-in-state info is much more meaningful than the point-in-time information. I'll see if I can find the cpufreq-stats kernel module on my development machine.

@eero-t
Copy link
Contributor

eero-t commented Feb 13, 2024

For unit tests, you could change plugin code to take prefix for the sysfs stats directory, and point the code to a directory with fake time-in-state files (which content could be e.g. copied from the linked kernel doc).

Those files could be either generated at run-time to randomized dir, or pre-created e.g. under src/test-files/cpufreq/{stats1,stats2,invalid}/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants