Announcement

Collapse
No announcement yet.

AMD P-State EPP Driver Updated For Improving Linux Power Efficiency

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • AMD P-State EPP Driver Updated For Improving Linux Power Efficiency

    Phoronix: AMD P-State EPP Driver Updated For Improving Linux Power Efficiency

    In early September AMD announced their new P-State "EPP" driver for Linux systems to further evolve their P-State driver effort started last year. This P-State EPP driver effort is aiming for better performance and power control while this weekend they sent out the second iteration of these Linux kernel patches...

    https://www.phoronix.com/news/AMD-P-State-EPP-Linux-v2

  • #2
    Please, don't reuse acronyms. EPP was and will ever be short for the Enhanced Parallel Port.

    Comment


    • #3
      DRM was not Direct Rendering Method before.

      While we dislike these acronyms being reused, shit happens.

      Comment


      • #4
        Any news if it will work with desktop CPUs this time? Previous driver only worked with APUs properly because desktop CPUs were lacking some registers to make it work without too much latency. May be new Zen 4 CPUs have these registers already?

        Comment


        • #5
          Originally posted by shmerl View Post
          Any news if it will work with desktop CPUs this time? Previous driver only worked with APUs properly because desktop CPUs were lacking some registers to make it work without too much latency. May be new Zen 4 CPUs have these registers already?
          It works with my Ryzen 3000 desktop CPU, but requires the following changes:

          Code:
          Linux kernel arguments in grub.cfg:
          amd_pstate.shared_mem=1 initcall_blacklist=acpi_cpufreq_init
          
          /etc/modules-load.d/cpupower.conf:
          amd_pstate
          
          Kernel config:
          CONFIG_X86_ACPI_CPUFREQ=m  (instead of =y)
          I am not sure whether all of the above items are still needed with the newest Linux kernel.

          NOTE: In my experience, using "ondemand" doesn't save any power at all at the wall socket compared to the "performance" CPU governor. Thus, the governor I am using most of the time is "performance". Another downside is that "ondemand" causes certain apps to run up to 2 times slower compared to the "performance" governor. In general: Any program that contains short bursts of parallel executions (such as: the program is running multiple background jobs and a background job takes less than 100 milliseconds to complete) will be severely slowed down by "ondemand" scheduling.

          Comment


          • #6
            Originally posted by atomsymbol View Post

            It works with my Ryzen 3000 desktop CPU, but requires the following changes:

            Code:
            Linux kernel arguments in grub.cfg:
            amd_pstate.shared_mem=1 initcall_blacklist=acpi_cpufreq_init
            amd_pstate.shared_mem=1 was a problem with the previous version of the driver for desktop CPUs. It "worked" but with bad latency. The fact that you need to enable it for the new version too means it still relies on hardware that's missing in your CPU to work properly.

            What I'm curious is whether Zen 4 desktop CPUs already have it.

            More details here: https://www.kernel.org/doc/html/late...md-pstate.html

            shared_mem Use a module param (shared_mem) to enable related processors manually with amd_pstate.shared_mem=1. Due to the performance issue on the processors with Shared Memory Support, we disable it presently and will re-enable this by default once we address performance issue with this solution.
            Last edited by shmerl; 09 October 2022, 03:44 PM.

            Comment


            • #7
              Originally posted by shmerl View Post
              amd_pstate.shared_mem=1 was a problem with the previous version for desktop CPUs. It "worked" but with bad latency. The fact that you need to enable it for the new version too means it still relies on hardware that's missing in your CPU to work properly.
              Yes, I forgot about that.

              An advantage of amd_pstate compared to acpi_cpufreq ---- even if amd_pstate falls back to the ACPI implementation on desktop CPUs unsupported by amd_pstate ---- is that [on my machine] the lowest frequency is 600 MHz with amd_pstate and 2200 MHz with acpi_cpufreq.

              The amd_pstate quirks in grub.cfg on my machine are present there only because I wanted to try it out. But at the wall socket, there is zero difference - when the CPU is idle - between 600 MHz and 2200 MHz even if I select the "powersave" governor. Thus, I am going to remove those quirks from grub.cfg.
              Last edited by atomsymbol; 09 October 2022, 04:09 PM. Reason: Add "when the CPU is idle"

              Comment


              • #8
                Actually the updated v2 amd-pstate-epp patches now fine on top of the 6.0 kernel and does not need any other patches from the -next branch.
                amd_pstate_epp is now disabled as default and needs:

                Code:
                amd_pstate.epp_enabled=1

                In the cmdline. Then it works fine!

                Comment


                • #9
                  Looks like same idea here, shared mem and dedicated register hardware cases:


                  https://lore.kernel.org/lkml/[email protected]/

                  Add Energy Performance Preference support for AMD SOCs which do not
                  contain a designated MSR for CPPC support. A shared memory interface
                  is used for CPPC on these SOCs and the ACPI PCC channel is used to
                  enable EPP and reset the desired performance.‚Äč
                  I don't have a Zen 4 CPU to check the above, but it can be checked like this:

                  Code:
                  lscpu | grep cppc
                  Last edited by shmerl; 09 October 2022, 04:37 PM.

                  Comment


                  • #10
                    Originally posted by atomsymbol View Post

                    NOTE: In my experience, using "ondemand" doesn't save any power at all at the wall socket compared to the "performance" CPU governor.
                    That's simply untrue. Ondemand is highly configurable, and maybe the defaults don't work great for you, but I've certainly seen it reduce the cpu speed and the corresponding wattage at the wall using a meter.

                    Comment

                    Working...
                    X