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

Read PSI information #38

Merged
merged 4 commits into from
Feb 9, 2021
Merged

Conversation

erthalion
Copy link
Contributor

Read and display Pressure Stall Information if available (which should be the case starting from Linux Kernel 4.20).

@coveralls
Copy link

coveralls commented Feb 5, 2021

Coverage Status

Coverage increased (+0.1%) to 89.118% when pulling b92ec15 on erthalion:feature/psi into 31c8f3a on CyberDem0n:master.

@erthalion erthalion force-pushed the feature/psi branch 2 times, most recently from 0ed31ed to 9b6448f Compare February 5, 2021 14:31
Comment on lines +110 to +112
if (strncmp(type, "full", 4) == 0)
p.type = FULL;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we get "full" from the "cpu" (e.g. new kernel)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand it should not be the case even for new kernels (the latest says only "the format for CPU ..." with no mentioning it being changed one day). But if needed it could be easily addressed by extending p_cpu array to two elements.

Use two element array for cpu as well for consistensy.
@CyberDem0n CyberDem0n merged commit 4c19197 into CyberDem0n:master Feb 9, 2021
CyberDem0n pushed a commit that referenced this pull request Feb 9, 2021
Should be the case starting from Linux Kernel 4.20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants