Announcement

Collapse
No announcement yet.

New AMD P-State Driver Headlines The Power Management Updates For Linux 5.17

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

  • New AMD P-State Driver Headlines The Power Management Updates For Linux 5.17

    Phoronix: New AMD P-State Driver Headlines The Power Management Updates For Linux 5.17

    The power management subsystem updates were sent out yesterday and already mainlined for the in-development Linux 5.17 kernel. Most notable with the power management changes for this new version of the Linux kernel is the introduction of the AMD P-State driver developed in cooperation with Valve for the Steam Deck but stands to help CPU/SoC power efficiency across Zen 2 and newer hardware...

    https://www.phoronix.com/scan.php?pa...wer-Management

  • #2
    Looking forward to the new round of benchmarks Michael!

    Comment


    • #3
      While Micheal keeps claiming that this new driver is somehow really good or improves power efficiency, the results he posted earlier don't show much of a difference. Am I missing some nuance that makes this as good as Micheal claims it to be? Or is there some new version of this driver in the ether that drastically improves power management or performance per watt or frequency scaling?
      Last edited by Random_Jerk; 11 January 2022, 01:06 PM.

      Comment


      • #4
        Originally posted by Random_Jerk View Post
        While Micheal keeps claiming that this new driver is somehow really good or improves power efficiency, the results he posted earlier don't show much of a difference. Am I missing some nuance that makes this as good as Micheal claims it to be? Or is there some new version of this driver in the ether that drastically improves power management or performance per watt?
        According to some AMD people the only benefit of the AMD P-State driver is a fine-grained control over the CPU frequency. It is supposed to help in situations where you have some kind of power vs. performance target that you need to hit. I guess that it will mostly benefit server farms with arrays of EPYC servers; consumer-grade laptops or workstations won't see any meaningful difference.

        Comment


        • #5
          Originally posted by Random_Jerk View Post
          While Micheal keeps claiming that this new driver is somehow really good or improves power efficiency, the results he posted earlier don't show much of a difference. Am I missing some nuance that makes this as good as Micheal claims it to be? Or is there some new version of this driver in the ether that drastically improves power management or performance per watt?
          We're waiting to see. What I do know is that enabling it didn't hurt anything; that I noticed no negative side effects from using it. I'm in the process of changing distributions so I'm not in the position to comment any more than that.

          Well, I will add that if you have the cppc CPU flag, "cat /proc/cpuinfo | grep cppc" you probably only need to set "amd_pstate.enabled=1" to your kernel command line. If that doesn't work or you don't have the flag, try adding "amd_pstate.shared_memory=1". Not sure if this is the expected behavior, but "cppc" only shows up on an amd-pstate patched kernel on my PC.

          From there, set the governor to "ondemand" or "schedutil". The amd-pstate docs mention that it's primarily geared towards those governors.

          Just thought I'd share my 2 cents worth of amd-pstate usage.

          Comment


          • #6
            Originally posted by skeevy420 View Post

            We're waiting to see. What I do know is that enabling it didn't hurt anything; that I noticed no negative side effects from using it. I'm in the process of changing distributions so I'm not in the position to comment any more than that.

            Well, I will add that if you have the cppc CPU flag, "cat /proc/cpuinfo | grep cppc" you probably only need to set "amd_pstate.enabled=1" to your kernel command line. If that doesn't work or you don't have the flag, try adding "amd_pstate.shared_memory=1". Not sure if this is the expected behavior, but "cppc" only shows up on an amd-pstate patched kernel on my PC.

            From there, set the governor to "ondemand" or "schedutil". The amd-pstate docs mention that it's primarily geared towards those governors.

            Just thought I'd share my 2 cents worth of amd-pstate usage.
            Thank you for the update. The CPPC flag itself doesn't show up for me inspite of turnng on CPPC in the Bios. This is for a 5950x. I use the xanmod kernel and not sure if is p-state patched or not.

            Irrespective of the mechanism on how to make it work, I was wondering if this will improve schedutil or ondemand governors and their frequency response. I have Windows and other Linux KVM/QEMU VMs runnng with GPU passed through, and I have to switch to Performance governor on the host. Schedutil or Ondemand are horrible for VM performance, and I was hoping this could a good remedy to fix it.

            Comment


            • #7
              Originally posted by Random_Jerk View Post

              Thank you for the update. The CPPC flag itself doesn't show up for me inspite of turnng on CPPC in the Bios. This is for a 5950x. I use the xanmod kernel and not sure if is p-state patched or not.
              On my 4650G APU CPPC only shows up on a pstate patched kernel even if it's on in the bios. I don't think me having a Pro model matters here. Using either linux-pf or a CachyOS kernel on Manjaro was enough to get amd-pstate working and cppc showing in the flags (both have the patches). Based on the Xanmod changelog it has amd-pstate...at least with the latest latest one, 5.15.13.

              Irrespective of the mechanism on how to make it work, I was wondering if this will improve schedutil or ondemand governors and their frequency response. I have Windows and other Linux KVM/QEMU VMs runnng with GPU passed through, and I have to switch to Performance governor on the host. Schedutil or Ondemand are horrible for VM performance, and I was hoping this could a good remedy to fix it.
              Hopefully. I've been wondering the same thing about games I play where using Performance is simplest remedy.

              Comment


              • #8
                I patched my kernel manually but there is no cppc feature flag listed for my 5950x either although the module can be loaded. /sys/devices/system/cpu/cpuX/acpi_cppc/ is populated and the 'highest_perf" value corresponds to what I saw with a Windows installation. When using i.e. schedutil I see my cores clocking down to ~750MHz according to cyring's CoreFreq which they do not when using acpi-cpufreq.

                Comment


                • #9
                  Originally posted by MadCatX View Post
                  According to some AMD people the only benefit of the AMD P-State driver is a fine-grained control over the CPU frequency. It is supposed to help in situations where you have some kind of power vs. performance target that you need to hit. I guess that it will mostly benefit server farms with arrays of EPYC servers; consumer-grade laptops or workstations won't see any meaningful difference.
                  This is not about improving absolute performance. If you want the absolute best performance, you should just run your CPU at max clocks as much as possible. The idea is to only run the CPU as fast as you need to hit your work deadline. If you can hit your deadline with a lower clock and voltage, the frees up more headroom for other processes to hit higher targets if they need it or keeps overall power lower if they don't. You want the system to feel responsive while burning as little power as possible. This will likely impact laptops the most because in most cases, as long as the desktop is responsive, you don't really care if you are hitting the max performance, you'd rather have the extra battery and cooler temperatures. Rather than testing benchmarks, it would probably be better to test power draw over time with standard use cases (office apps, browsing, video playback, etc.).

                  CPPC gives you a continuum of frequencies to select from while the ACPI pstate interface gives you 3 hardcoded frequencies. For example, say your system has 3 hardcoded ACPI pstate frequencies (1Ghz, 2Ghz, 3Ghz). If your work only needs 2.1Ghz to hit it's deadline, you can do that with CPPC. However with the ACPI pstate interface, you will always be in the 3Ghz state. You absolute performance will be higher, but you'll also be burning more power.

                  All of that said, it really all comes down to the algorithm used by the governor and how well it can match work to performance requirements.

                  Comment


                  • #10
                    Originally posted by clouddrop View Post
                    I patched my kernel manually but there is no cppc feature flag listed for my 5950x either although the module can be loaded. /sys/devices/system/cpu/cpuX/acpi_cppc/ is populated and the 'highest_perf" value corresponds to what I saw with a Windows installation. When using i.e. schedutil I see my cores clocking down to ~750MHz according to cyring's CoreFreq which they do not when using acpi-cpufreq.
                    Same here, Turned on CPPC in the bios and set the appropriate flags in grub as mentioned by skeevy420 , but still don't see the cppc flag turned on. Since xanmod has the p-state driver built in, will try my VM workload using schedutil and see if it helps.

                    Comment

                    Working...
                    X