Erlaubt der neue Linux Kernel stromsparende AMD Server?


mgutt

Recommended Posts

OK, so I've installed the latest version (Danke @ich777!) and tried registering everything. This is as far as I got:

 

grafik.png.cc93e9b891334f9e9a231fdde5b45c23.png

 

This is what happens when trying to register the Idle driver:

 

grafik.png.5423ef8be751143690168615b311c53c.png

 

This is what the Kernel data looks like:

 

grafik.png.c7351e1b7a8a2e58f5387211fd0ee76c.png

 

PS: Idle Limit C3? Any way to change that? Also, it looks like the CPU is never quite leaving C1:

 

grafik.png.65098e73c171b3084a8c1b0b3ab367a7.png

 

Anyway, this is the core power draw in idle:

 

grafik.png.7da74f076f7cdc28418b422b26266cbf.png

 

And now the CPPC "ranges" are set to auto:

 

grafik.png.77767fc28ddccf5ccf8f8f8e8556c26e.png

Link to comment

@Pillendreher You have to unload or blacklist any drivers

## Boot command line (for a AMD Ryzen 3950X)
nmi_watchdog=0 modprobe.blacklist=k10temp,sp5100_tco,acpi_cpufreq amd_pstate.shared_mem=1 idle=halt nowatchdog

## You can also try to unload current ACPI driver
modprobe -r acpi-cpufreq

## You can pass Registration and Idle route as parameters
insmod corefreqk.ko Idle_Route=1 Register_ClockSource=1 Register_Governor=1 Register_CPU_Freq=1 Register_CPU_Idle=1

## Or from the UI settings, do all registrations and select again route to "IO"

 

Remarks:

  • ClockSource registration is still a Compilation option; project has to be built as below:
    make DELAY_TSC=1
  • UMC Memory Controller channels frequency can be built as below:
    make ARCH_PMC=UMC
  • And options can be combined:
  • make ARCH_PMC=UMC DELAY_TSC=1

 

Link to comment
2 hours ago, ich777 said:

Should I change my build script to compile the AMD package with these two options?

 

DELAY_TSC=1 appears safe, you can include it in your compilation

A compilation message will show up to warn that feature is builtin

 

ARCH_PMC=UMC is stable with my 3950X and 5300U but I don't have other reports from other AMDs

Link to comment
4 hours ago, CyrIng said:

@Pillendreher You have to unload or blacklist any drivers

## Boot command line (for a AMD Ryzen 3950X)
nmi_watchdog=0 modprobe.blacklist=k10temp,sp5100_tco,acpi_cpufreq amd_pstate.shared_mem=1 idle=halt nowatchdog

## You can also try to unload current ACPI driver
modprobe -r acpi-cpufreq

## You can pass Registration and Idle route as parameters
insmod corefreqk.ko Idle_Route=1 Register_ClockSource=1 Register_Governor=1 Register_CPU_Freq=1 Register_CPU_Idle=1

## Or from the UI settings, do all registrations and select again route to "IO"

 

Remarks:

  • ClockSource registration is still a Compilation option; project has to be built as below:
    make DELAY_TSC=1
  • UMC Memory Controller channels frequency can be built as below:
    make ARCH_PMC=UMC
  • And options can be combined:
  • make ARCH_PMC=UMC DELAY_TSC=1

 

 

OK, so the first line (with a "modprobe amd-pstate" attached to it) lets me register the Idle-driver. Yet now I can't register the freq-driver:

 

grafik.png.b62ecaa756cb3a97ffa1c19ada257034.png

Link to comment
3 hours ago, Pillendreher said:

...

Powerdraw is basically identical though compared to the previous configuration:

 

grafik.png.e7ea9ac2989ca86d5a11c28c9327ec05.png

 

Unfortunately, no hardware counter registers specified with AMD Zen.

CoreFreq is thus making virtual counter VPMC per idle level entry.

 

Using 3950X, I have noticed a Package power consumed difference between I/O-WAIT and MWAIT. That's why I/O or HALT is default idle asm instruction suggested in [Settings][CPU-IDLE route]

 

In [Performance Monitoring] window PC6 and CC6 are making a Power difference.

 

2022-08-28-002259_564x940_scrot.thumb.png.e6ca5ce01ebddf905e83836e8227da97.png

 

In [Power, Current & Thermal] window, when [Settings][HSMP enablement] can be enabled, [Thermal Design Power] can be altered.

With 3950X, I can't programmed better than Minus/Plus 5 watts

 

2022-08-28-002223_564x940_scrot.thumb.png.448d7941973b171e86d8032d75c5479c.png

 

You may also cap the Core frequency (press [!] for Absolute monitoring); enable CPPC and decrease the target [TGT] ratio.

With 3950X where CPPC is a firmware implementation, I'm observing a Core Power decreased

 

2022-08-28-002918_564x940_scrot.thumb.png.e799af5fd9096d6d21959837dc639482.png

Link to comment

 

9 hours ago, CyrIng said:

Unfortunately, no hardware counter registers specified with AMD Zen.

CoreFreq is thus making virtual counter VPMC per idle level entry.

 

Which means? Is something missing in my UEFI settings?

 

9 hours ago, CyrIng said:

Using 3950X, I have noticed a Package power consumed difference between I/O-WAIT and MWAIT. That's why I/O or HALT is default idle asm instruction suggested in [Settings][CPU-IDLE route]

 

I'll give the other options a try.

 

9 hours ago, CyrIng said:

In [Performance Monitoring] window PC6 and CC6 are making a Power difference.

 

2022-08-28-002259_564x940_scrot.thumb.png.e6ca5ce01ebddf905e83836e8227da97.png

 

Both are already enabled.

 

9 hours ago, CyrIng said:

In [Power, Current & Thermal] window, when [Settings][HSMP enablement] can be enabled, [Thermal Design Power] can be altered.

With 3950X, I can't programmed better than Minus/Plus 5 watts

 

2022-08-28-002223_564x940_scrot.thumb.png.448d7941973b171e86d8032d75c5479c.png

 

Unfortunately, I can't enable "HSMP". It's currently set to "off":

 

 

grafik.png.ce5518d5c62eb89dad8e2eda183cd657.png

 

Yet when I try to enable it, nothing happens:

 

grafik.png.69fc3710ae71b12be87039ed53543721.png

 

 

And the CPU-Freq driver still can't be enabled either:

 

grafik.png.10b82ccad11258ca60d094438476d15b.png

 

 

 

9 hours ago, CyrIng said:

 

You may also cap the Core frequency (press [!] for Absolute monitoring); enable CPPC and decrease the target [TGT] ratio.

With 3950X where CPPC is a firmware implementation, I'm observing a Core Power decreased

 

2022-08-28-002918_564x940_scrot.thumb.png.e799af5fd9096d6d21959837dc639482.png

 

I've put it at "1" (99,81 MHz):

 

grafik.png.ed5c55db6e1b64332ec5ec2aa32f1d8c.png

 

Compared to what I posted yesterday (7.4 W total), I'm now at 4,74 W total in this screenshot - nice improvement :)

 

PS: What is "absolute frequency" in this setting? It's much higher than the accumulated cores' frequencies?

Link to comment

Hardware counters: I mean registers like Intel MSR which counts number of cycles elapsed per C-states 

 

AMD does not provide information about such registers. NDA or no will. 

All Zen impacted. 

 

My workaround has been to hook kernel idle entries to estimate the cycles delay, from TSC, spent in idle level. 

 

  • Like 1
Link to comment

Relative frequency is a usage, delta of cycles over a sample period : 1 second

 

Absolute frequency is an immediate reading of current frequency which is made once per period. 

 

Indeed absolute mode is the way to get true frequency, especially when system is loaded whereas relative can measure the tiny variations of GHz processors. 

 

Relative frequency is the Intel recommandation. 

Edited by CyrIng
  • Like 1
Link to comment
51 minutes ago, Pillendreher said:

And the CPU-Freq driver still can't be enabled either:

When you reach that issue, give a look to kernel window to get the current driver name. 

Then try to unload it or blacklist it from boot. 

 

When "Missing" is written, it means the room is empty and CoreFreq can register. 

 

It's the same for Idle driver. 

 

I'm sorry if I can't make easier but Linux kernel was made that eavy way in some part of its code. 

  • Like 1
Link to comment
6 hours ago, CyrIng said:

When you reach that issue, give a look to kernel window to get the current driver name. 

Then try to unload it or blacklist it from boot. 

 

When "Missing" is written, it means the room is empty and CoreFreq can register. 

 

It's the same for Idle driver. 

 

I'm sorry if I can't make easier but Linux kernel was made that eavy way in some part of its code. 

 

It says that the p-state driver is the current CPU-Freq driver:

 

grafik.png.322a4e0cef66fc4474af434f9290b4cb.png

 

I'll try not loading it at boot, maybe that will help.

 

EDIT:

 

grafik.png.b3e5555234a25d3d02d6ed439791c45e.png

 

So now that everything is missing, I can successfully register everything via corefreq (Still can't enable HSMP though):

 

grafik.png.0caf89550fbe90a1a4039a688410e0b7.png

 

Although now the Governor driver seems to be missing, which - I assume - isn't good.

 

grafik.png.2c4e2eac947fb7f854124074f100a608.png

 

 

Edited by Pillendreher
Link to comment
3 hours ago, Pillendreher said:

So now that everything is missing, I can successfully register everything via corefreq (Still can't enable HSMP though):

 

I have found the HSMP protocol into the EPYC datasheet; and probably also the same specs for ThreadRippers.

 

Except some HEDT Deskop Ryzen 3950X, 5950X, I have also noticed that HSMP is not implemented into Ryzen APU, like my laptop 5300U

  • Like 1
Link to comment
  • 1 month later...
On 8/28/2022 at 7:01 PM, CyrIng said:

I have found the HSMP protocol into the EPYC datasheet; and probably also the same specs for ThreadRippers.

 

Except some HEDT Deskop Ryzen 3950X, 5950X, I have also noticed that HSMP is not implemented into Ryzen APU, like my laptop 5300U

Bad news. Received a laptop 6600H based where Rembrandt has no HSMP, most SMU registers I need for voltage Vcore and UMC memory controller are empty. 

 

Fortunately legacy p-state, CPUID, Thermal are still  monitoring OK. 

 

So far I've not found a registers datasheet of this Zen3+

... and I fear it may be worst with Zen4 (but no test received) 

Link to comment
22 hours ago, ich777 said:

@Pillendreher gehe ich recht in der Annahme das du deiner syslinux.config das hinzugefügt hast:

initcall_blacklist=acpi_cpufreq_init

 

...und dann noch die Datei:

/boot/config/modprobe.d/amd_pstate.conf

 

um den Treiber zu laden?

 

Geht mir nur um die Klarheit für andere User die den amd_pstate Treiber zu aktivieren versuchen.

 

Ja, oder eben im go-file

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.