Erlaubt der neue Linux Kernel stromsparende AMD Server?


mgutt

Recommended Posts

8 hours ago, Pillendreher said:

Er dreht z.T. schon voll auf:

 

grafik.png.497565689c6b756d17a9a0ce97380ffb.png

 

Ich habe eher den Eindruck, dass z.T. die Last nicht wirklich "ankommt", muss aber zugeben, dass ich das bisher nie beobachtet habe.

 

Hast du TipsAndTweaks installiert ? Schau mal bitte was bei dir dort im DropDown bei "Enable Intel Turbo/AMD Performance Boost" steht

Link to comment

Also wie bei mir. Daher meine Vermutung aber scheint ggf nur die Anzeige zu sein. Corefreq sagt ja es wäre da.

 

Jedoch ist bei dir CPPC blau, bei mir ist es grün. Scheint aber ggf an Zen3 bei dir zu liegen, die haben wohl hier erweiterte Unterstützung. Aber warum ist CC6 bei dir ebenfalls aktiv ? Laut Zenstates ist es bei mir aktiv, nicht nur Package.

cppc1.png

Link to comment
On 8/9/2022 at 2:35 PM, Pillendreher said:

Ich hab jetzt direkt an der Quelle nachgefragt:

 

Blau bedeutet also unterstützt, Grün unterstützt+aktiviert. Keine Ahnung wieso das bei mir dann nicht aktiviert ist; muss mir meine BIOS Einstellungen noch einmal genauer anschauen...

 

Interessant, ich meine du konntest ja dennoch den Treiber laden und aktivieren.

Hast du was herausgefunden?

Wie siehts mit aktiviertem shared-mem aus ?

Musste bei mir noch amd_pstate.shared_mem=1 setzen, jedoch sollte bei Cezanne (also deine CPU) laut https://docs.kernel.org/admin-guide/pm/amd-pstate.html "Full MSR Support" haben.

 

Hier der Ausschnitt:

Quote

Processor Support¶

The amd-pstate initialization will fail if the _CPC entry in the ACPI SBIOS does not exist in the detected processor. It uses acpi_cpc_valid to check the existence of _CPC. All Zen based processors support the legacy ACPI hardware P-States function, so when amd-pstate fails initialization, the kernel will fall back to initialize the acpi-cpufreq driver.

There are two types of hardware implementations for amd-pstate: one is Full MSR Support and another is Shared Memory Support. It can use the X86_FEATURE_CPPC feature flag to indicate the different types. (For details, refer to the Processor Programming Reference (PPR) for AMD Family 19h Model 51h, Revision A1 Processors 3.) amd-pstate is to register different static_call instances for different hardware implementations.

Currently, some of the Zen2 and Zen3 processors support amd-pstate. In the future, it will be supported on more and more AMD processors.

Full MSR Support¶

Some new Zen3 processors such as Cezanne provide the MSR registers directly while the X86_FEATURE_CPPC CPU feature flag is set. amd-pstate can handle the MSR register to implement the fast switch function in CPUFreq that can reduce the latency of frequency control in interrupt context. The functions with a pstate_xxx prefix represent the operations on MSR registers.

Shared Memory Support¶

If the X86_FEATURE_CPPC CPU feature flag is not set, the processor supports the shared memory solution. In this case, amd-pstate uses the cppc_acpi helper methods to implement the callback functions that are defined on static_call. The functions with the cppc_xxx prefix represent the operations of ACPI CPPC helpers for the shared memory solution.

AMD P-States and ACPI hardware P-States always can be supported in one processor. But AMD P-States has the higher priority and if it is enabled with MSR_AMD_CPPC_ENABLE or cppc_set_enable, it will respond to the request from AMD P-States.

Versuch mal die richtigen Optionen für diese zu setzen:

AMD P-States and ACPI hardware P-States always can be supported in one processor. But AMD P-States has the higher priority and if it is enabled with MSR_AMD_CPPC_ENABLE or cppc_set_enable, it will respond to the request from AMD P-States.

Edited by kdwg
Link to comment
On 8/11/2022 at 7:12 PM, Pillendreher said:

Im BIOS war bisher folgendes eingestellt:

 

grafik.thumb.png.6a4482c0dc93ed98704c552370678e4f.png

 

Jetzt habe ich auf Folgendes umgestellt:

 

grafik.thumb.png.be416da127b88a9b564f10b774aed9f9.png

 

CPPC wird mir aber weiterhin in corefreq-cli nur als "blau" angezeigt...

 

Es ist blau, weil CPPC von Firmware verwaltet wird; und nicht von MSR-Registern

 

Die 5000-Serie wird grün sein. Und die Verhältnisse können geändert werden.

 

(Traduit du français) 

Link to comment
11 hours ago, CyrIng said:

 

Es ist blau, weil CPPC von Firmware verwaltet wird; und nicht von MSR-Registern

 

Die 5000-Serie wird grün sein. Und die Verhältnisse können geändert werden.

 

(Traduit du français) 

And I do run 4650G Pro, Renoir. Shown a the flag as green. As far as I understood Renoir is not fully supported with MSR?

Link to comment
18 hours ago, Pillendreher said:

Well I do run a 5600G, so it should be green?

Die Frage: Was bringt es?

 

Weil aktuell sieht es ja eher so aus, als hätte CPPC rein gar nichts an dem Verbrauch geändert. Ziel war ja ein geringer Leerlaufverbrauch.

 

Eventuell sollte einer von euch mal mit Ubuntu testen. Gerade bei ASPM scheint bei Unraid noch einiges im Argen zu sein, weshalb ich da erstmal mit Ubuntu testen würde.

Link to comment

Wie jetzt. Also doch erst effizient ab 6.1 ?!

 

Quote

AMDs neue P-State-Treiber schaffen es nicht in Linux 6.0

Wie die auf Open Source und Linux spezialisierte Website Phoronix berichtet hat, hat AMD seinen überarbeiteten P-State-Treiber, den sogenannten „AMD P-State CPU frequency scaling Linux driver“ veröffentlicht.

 

Der Treiber soll eine bessere Energieeffizienz als der generische ACPI CPUFreq-Treiber bieten und ist für Zen 2, Zen 3, Zen 3+ und Zen 4 vorgesehen. Verbessert worden sein soll unter anderem der Precision Boost und die Leistung unter geringen Lasten.

 

Zeitlich kamen die sogenannten V5-Patches aber etwas zu spät und haben das Zeitfenster für Linux 6.0 und den aktuellen Release Candidate verpast. Die gepatchten P-State-Treiber werden damit voraussichtlich in Linux 6.1 mit einfließen.

 

Link to comment

In der Original-Meldung klingt das zumindest so, als handele es sich nur um Anpassungen am Treiber und nicht um einen neuen o.ä.:

 

https://www.phoronix.com/news/AMD-P-State-Update-But-Miss-6.0

 

Recently AMD has been working on precision boost control and other fixes to AMD P-State and that's the patches revised today. Those patches for the precision boost hardware control and fixes were sent out today in their fifth revision. 

 

EDIT:

 

In den Kommentaren wird auf diesen Diskussionsfaden verwiesen:

 

https://forum.endeavouros.com/t/how-to-use-amd-p-state-in-linux-5-17/25247

 

Schau ich mir auch mal an.

Edited by Pillendreher
Link to comment

Kernel 5.19 and Ryzen 3950X with amd_pstate enabled

 

The ACPI CPPC is involved: per CPU, the target ratio is scaling from a min of 5 up to a max linked to CPB boosted ratio. 

 

WiP: studying the amd_pstate source code; CoreFreq (development branch) can now alter the CPPC target ratio.  CPPC firmware has to be enabled : press same UI button as HWP.

 

See progress in this post

  • Like 3
Link to comment
On 8/15/2022 at 10:28 AM, Pillendreher said:

Man kann CPPC wohl in Corefreq aktivieren?!

 

https://github.com/cyring/CoreFreq/discussions/320

 

grafik.thumb.png.83cfea6160c2adb044adef6eb7dee1c3.png

 

@CyrIng keep up the good work! thank you so far!
As I am now on recent RC4 and also made an update to uefi firmware today (I know, shouldnt have taken this together), my CPPC flag wasn't green by default anymore. Could be I havent set all my recent BIOS settings, will check with time.

I added "corefreqk.HWP_Enable=1 corefreqk.HWP_EPP=1" as kernelparameters and do not need to enable it manually as from now. Will see how it behaves.

@Pillendreher , vielleicht auch für Dich interessant.
 

  • Like 1
  • Thanks 1
Link to comment

@CyrIng

 

OK, so this is what corefreq looks like after passing the following kernel parameters:

 

grafik.png.8b89ffeed05cd0a6d08a88d511b1d68e.png

 

grafik.png.358f17c9b23707e95e3161bab3bfc078.png

 

Here it loos like corefreq doesn't recognize the P-State driver:

 

grafik.png.8e95a2bb6071f30d59c1c1ea51622045.png

 

Yet here, P-State is mentioned:

 

grafik.png.22e572bc0dfa523715fec0552a44d841.png

 

 

And this is what the frequency-window looks like after "activating" CCP in the "Performance Monitoring" window:

 

grafik.png.ed509100538ac9ff2ff6858ba78af733.png

 

grafik.png.65d1312d36a57f226f6cdff79a8ce3fe.png

 

This does looks weird, doesn't it? "Min" higher than "Max"? Seems something's off:

 

grafik.png.2a14b39f466095dc3681191a9b168b1e.png

Link to comment

@Pillendreher Make sure to have register CoreFreq as P-states driver, but also Governor, and preferably Idle driver.

Registration can be done from UI menu Settings or as corefreqk.ko parameters. 

 

When is enabled the AMD CPPC, alias Intel HWP, you may find uninitialized Min, Max, Target P-states. 

You then have to set them. 

Remarks: Software CPPC is providing Target P-states only, whereas Hardware CPPC, most Zen3 and few Zen2, allow to alter Min, Max, Target P-states. 

 

As a general rule, CoreFreq discovers P-states, frequency ratios and many other features states with their current values. Even with the incoherencies. 

Users are in charge to alter Processor consequently. 

Link to comment
2 hours ago, CyrIng said:

Do you have any Unraid plug-in for CoreFreq development version to let @Pillendreher keeps up to date with work in progress ?

Sure thing, compiled and attached it here.

 

@Pillendreher wie ich aus deinem Screenshot oben sehe bist du auf Unraid 6.11.0-rc4 richtig? Wenn ja bitte ersetz die Dateien auf deinem USB Stick mit denen die ich hier Angehängt habe.

Die Dateien befinden sich in /boot/config/plugins/corefreq/packages/5.19.3/

 

Nachdem du sie ersetzt hast starte bitte deinen Server einmal neu.

(lass dich bitte nicht von der Version täuschen, ist die aktuelle develop version)

corefreq_AMD-1.91.7-x86_64-1.txz.md5 corefreq_AMD-1.91.7-x86_64-1.txz

  • Like 2
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.