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

Errors when changing to balance on a Ryzen system #695

Open
alosarjos opened this issue Oct 12, 2024 · 10 comments
Open

Errors when changing to balance on a Ryzen system #695

alosarjos opened this issue Oct 12, 2024 · 10 comments

Comments

@alosarjos
Copy link

Hi there!

I'm just giving a try to tuned instead of the regular PPD but I'm seeing some errors on the logs, not sure if an issue on my side or the program.

When changing to balance and running a tuneadm-verify I'm getting some errors. From the logs:

2024-10-12 09:42:02,415 ERROR tuned.utils.commands: Executing 'modprobe -r cpufreq_conservative' error: modprobe: FATAL: Module cpufreq_conservative is builtin.

2024-10-12 09:42:02,419 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy11/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,419 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu11'
2024-10-12 09:42:02,419 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy9/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,419 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu9'
2024-10-12 09:42:02,419 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy1/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,419 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu1'
2024-10-12 09:42:02,419 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy7/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,419 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu7'
2024-10-12 09:42:02,419 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy14/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,419 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu14'
2024-10-12 09:42:02,419 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy6/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,419 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu6'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy13/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu13'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy5/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu5'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy4/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu4'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy15/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu15'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy10/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu10'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy2/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu2'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy8/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu8'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy3/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu3'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy0/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu0'
2024-10-12 09:42:02,420 ERROR    tuned.utils.commands: Writing to file '/sys/devices/system/cpu/cpufreq/policy12/boost' error: '[Errno 22] Invalid argument'
2024-10-12 09:42:02,420 INFO     tuned.plugins.plugin_cpu: Setting boost value '1' for cpu 'cpu12'

Boost file seems to exists:

imagen

@zacikpa
Copy link
Contributor

zacikpa commented Oct 14, 2024

Hi, are you able to change the content of the boost file manually?

@alosarjos
Copy link
Author

Looks like I can't, maybe it's something that has yet to be enabled? Looking for some info, I found:

https://lore.kernel.org/linux-kernel/9725dfcbb8848d68ce5c8c099cd3c6805bebf20b.1718988436.git.perry.yuan@amd.com/T/

Which are some "recent" kernel patches

I dont have the ' /sys/devices/system/cpu/amd_pstate/cpb_boost' so maybe I cant change the boost yet?

@pallaswept
Copy link

I dont have the ' /sys/devices/system/cpu/amd_pstate/cpb_boost' so maybe I cant change the boost yet?

Tested this:

> ls  /sys/devices/system/cpu/amd_pstate/
prefcore  status

> cat /sys/devices/system/cpu/cpufreq/policy0/boost
1

> echo 0 |sudo tee /sys/devices/system/cpu/cpufreq/policy0/boost
0

> cat /sys/devices/system/cpu/cpufreq/policy0/boost
0

tuned-adm verify gets me :

2024-10-25 21:33:32,850 INFO     tuned.plugins.base: verify: passed: device cpu6: 'boost' = '1'
2024-10-25 21:33:32,850 INFO     tuned.plugins.base: verify: passed: device cpu22: 'boost' = '1'
2024-10-25 21:33:32,850 INFO     tuned.plugins.base: verify: passed: device cpu10: 'boost' = '1'

And so on, for all my cores.

Maybe this will be helpful:

6.11.3-2-default

> sudo cpupower frequency-info
analyzing CPU 9:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 9
  CPUs which need to have their frequency coordinated by software: 9
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 5.03 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 550 MHz and 5.03 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.74 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 5.03 GHz.
    AMD PSTATE Nominal Performance: 122. Nominal Frequency: 3.70 GHz.
    AMD PSTATE Lowest Non-linear Performance: 57. Lowest Non-linear Frequency: 1.73 GHz.
    AMD PSTATE Lowest Performance: 19. Lowest Frequency: 550 MHz.

Good luck OP. Sorry for the "works for me" but maybe it will help to figure out what's different between our machines. Feel free to @ me if I can help.

@alosarjos
Copy link
Author

I dont have the ' /sys/devices/system/cpu/amd_pstate/cpb_boost' so maybe I cant change the boost yet?

Tested this:

> ls  /sys/devices/system/cpu/amd_pstate/
prefcore  status

> cat /sys/devices/system/cpu/cpufreq/policy0/boost
1

> echo 0 |sudo tee /sys/devices/system/cpu/cpufreq/policy0/boost
0

> cat /sys/devices/system/cpu/cpufreq/policy0/boost
0

tuned-adm verify gets me :

2024-10-25 21:33:32,850 INFO     tuned.plugins.base: verify: passed: device cpu6: 'boost' = '1'
2024-10-25 21:33:32,850 INFO     tuned.plugins.base: verify: passed: device cpu22: 'boost' = '1'
2024-10-25 21:33:32,850 INFO     tuned.plugins.base: verify: passed: device cpu10: 'boost' = '1'

And so on, for all my cores.

Maybe this will be helpful:

6.11.3-2-default

> sudo cpupower frequency-info
analyzing CPU 9:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 9
  CPUs which need to have their frequency coordinated by software: 9
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 5.03 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 550 MHz and 5.03 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.74 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 5.03 GHz.
    AMD PSTATE Nominal Performance: 122. Nominal Frequency: 3.70 GHz.
    AMD PSTATE Lowest Non-linear Performance: 57. Lowest Non-linear Frequency: 1.73 GHz.
    AMD PSTATE Lowest Performance: 19. Lowest Frequency: 550 MHz.

Good luck OP. Sorry for the "works for me" but maybe it will help to figure out what's different between our machines. Feel free to @ me if I can help.

Actually doing that works for me, not sure why the tee works and a simple echo doesn't

imagen

@alosarjos
Copy link
Author

Now the only error I get when changing to balanced is:

tuned.utils.commands: Executing 'modprobe -r cpufreq_conservative' error: modprobe: FATAL: Module cpufreq_conservative is builtin.

I cant remember if there was a tuned update or maybe something on the kernel

@pallaswept
Copy link

Now the only error I get when changing to balanced is:

tuned.utils.commands: Executing 'modprobe -r cpufreq_conservative' error: modprobe: FATAL: Module cpufreq_conservative is builtin.

You can ignore this.

Refer to #192

not sure why the tee works and a simple echo doesn't

When you write sudo echo 0 > filename then you are running echo with sudo, but you are not running the redirection, > filename with sudo.

All solved :)

@alosarjos
Copy link
Author

alosarjos commented Oct 26, 2024

Now the only error I get when changing to balanced is:
tuned.utils.commands: Executing 'modprobe -r cpufreq_conservative' error: modprobe: FATAL: Module cpufreq_conservative is builtin.

You can ignore this.

Refer to #192

not sure why the tee works and a simple echo doesn't

When you write sudo echo 0 > filename then you are running echo with sudo, but you are not running the redirection, > filename with sudo.

All solved :)

Kinda, tuned-adm verify still showing as failed when changing to balanced.

@pallaswept
Copy link

That's because of your kernel config as you posted above, it is builtin. If you built the kernel you can alter this, or you could report it to your distro.

It's best to just paste text or attach logs, rather than videos or images - easier to read on the other side.

@alosarjos
Copy link
Author

alosarjos commented Oct 26, 2024

That's because of your kernel config as you posted above, it is builtin. If you built the kernel you can alter this, or you could report it to your distro.

It's best to just paste text or attach logs, rather than videos or images - easier to read on the other side.

How should I report this to the distro? What do I have to ask?

@pallaswept
Copy link

That the kernel config has the cpufreq_conservative driver builtin, and it is not loaded, so TuneD generates errors when balanced power profile is engaged.

Maybe they would prefer to alter the balanced profile to suit their kernel, rather than vice-versa. Possibly, they just refer you to #192 and the related issues/PRs... Or something else... I would just let them know about the error and they can decide the best course of action.

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

No branches or pull requests

3 participants