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...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #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 atomsymbol

          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


          • #6
            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


            • #7
              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


              • #8
                Originally posted by atomsymbol

                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


                • #9
                  Originally posted by OmniNegro View Post
                  DRM was not Direct Rendering Method before.

                  While we dislike these acronyms being reused, shit happens.
                  Yeah. and DRI was a thrash band. For them, the resolution of the acronym was https://en.wikipedia.org/wiki/Dirty_Rotten_Imbeciles

                  Comment


                  • #10
                    Originally posted by atomsymbol

                    Whether it reduces CPU speed (such as: from 3.6 GHz to 2.2 GHz) is a number that is pointless by itself. One has to measure the energy (unit: Joules) it takes "ondemand" to complete a given task. An obvious issue here is that if the CPU lowers its power consumption by 50%, all other components in a desktop machine are still running at normal power levels (DDR4, SSD, HDD, GPU) and if it takes the CPU (at 50% power) 1.75 times longer to complete a task then the power consumption of the other components in the machine will overtake the CPU's power savings.

                    The CPU is automatically lowering the power consumption of unused parts of the chip even in case of the "performance" governor. (=1)

                    I haven't seen a single example of the "ondemand" governor resulting in a lower number of Joules consumed compared to "performance" governor, for any particular task that is CPU-limited. Even if the task is limited by something else (such as: SSD/HDD reads) it will be very hard for "ondemand" to save a meaningful amount of Joules compared to "performance" because of point (1) above.

                    Note: The electricity bill contains Joules (kWh) and the price is specified in €/kWh.

                    ----

                    If switching to "ondemand" was able to achieve power savings compared to "performance" when the CPU is idle - which is not the case - then using "ondemand" would by logical. The fact is that the CPU (Ryzen 3000 in my case) is consuming the same power when idle irrespective of whether I select "ondemand" or "performance". Running "turbostat" on my machine when the CPU is idle reports that CorWatt=2 and PkgWatt=22 irrespective of what the base-frequency of the idle CPU is.

                    If you have or can find an example of "ondemand" resulting in smaller power consumption (by more than just 1 Watt) compared to "performance" when the CPU is idle, then please post the example here.
                    Yep. As far as I remember, Ryzen CPUs also have their own internal power regulation. For example, Idle @ 4000 mhz might consume more or less the same power as idle @ 2200 mhz (or even @ 600 mhz) despite frequency differences.

                    Comment

                    Working...
                    X