Announcement

Collapse
No announcement yet.

AMD P-State Support Coming For The CPUPower Tool

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

  • AMD P-State Support Coming For The CPUPower Tool

    Phoronix: AMD P-State Support Coming For The CPUPower Tool

    With the forthcoming Linux 5.17 kernel there is the new AMD P-State driver aiming to provide better power efficiency than the ACPI CPUFreq driver that has long been used on AMD platforms. For complementing that AMD P-State driver, AMD has also been working on adding their CPU P-State support to Linux's cpupower tool...

    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
    Currently amd_pstate is not working well on zen2 and zen3 CPU's except Cezzane. I have a lot of slowdowns when i am playing emulators or steam games using any cpu governor other than performance.

    More info here: https://www.kernel.org/doc/html/late...for-amd-pstate

    Comment


    • #3
      Originally posted by HD7950 View Post
      Currently amd_pstate is not working well on zen2 and zen3 CPU's except Cezzane. I have a lot of slowdowns when i am playing emulators or steam games using any cpu governor other than performance.

      More info here: https://www.kernel.org/doc/html/late...for-amd-pstate
      Try setting "clocksource=tsc tsc=reliable" in your kernel command line (that's probably overkill; only tsc=reliable should be necessary). Enabling C-States can make tsc have an issue (forgot the link) so the kernel switches the clocksource to hpet and hpet can have horrible gaming results. I'm wondering if that's what's happening here.

      I'm also using cfs and a tkg-patched ondemand. You can get close enough to that with cfs-zen-tweaks or a linux-zen kernel.

      That's my basic setup and amd_pstate works just fine.

      Comment


      • #4
        Originally posted by skeevy420 View Post

        Try setting "clocksource=tsc tsc=reliable" in your kernel command line (that's probably overkill; only tsc=reliable should be necessary). Enabling C-States can make tsc have an issue (forgot the link) so the kernel switches the clocksource to hpet and hpet can have horrible gaming results. I'm wondering if that's what's happening here.

        I'm also using cfs and a tkg-patched ondemand. You can get close enough to that with cfs-zen-tweaks or a linux-zen kernel.

        That's my basic setup and amd_pstate works just fine.
        Code:
        # cat /sys/devices/system/clocksource/clocksource*/current_clocksource
        tsc
        This does not seem to be my case.

        Can you post your cpupower frequency-info?
        Code:
        # cpupower frequency-info
        analyzing CPU 0:
         driver: amd-pstate
         CPUs which run at the same hardware frequency: 0
         CPUs which need to have their frequency coordinated by software: 0
         maximum transition latency: 131 us
         hardware limits: 550 MHz - 4.43 GHz
         available cpufreq governors: ondemand powersave performance schedutil
         current policy: frequency should be within 550 MHz and 4.43 GHz.
                         The governor "schedutil" may decide which speed to use
                         within this range.
         current CPU frequency: Unable to call hardware
         current CPU frequency: 4.04 GHz (asserted by call to kernel)
         boost state support:
           Supported: yes
           Active: yes
           Boost States: 0
           Total States: 3
           Pstate-P0:  3600MHz
           Pstate-P1:  2800MHz
           Pstate-P2:  2200MHz
        Last edited by HD7950; 16 February 2022, 09:07 AM.

        Comment


        • #5
          This is with the v7 patches; w/o these cpupower patches. I'll try these out later on today.

          Code:
          cpupower frequency-info
          analyzing CPU 0:
           driver: amd-pstate
           CPUs which run at the same hardware frequency: 0
           CPUs which need to have their frequency coordinated by software: 0
           maximum transition latency: 131 us
           hardware limits: 400 MHz - 4.31 GHz
           available cpufreq governors: conservative ondemand userspace powersave performance schedutil
           current policy: frequency should be within 400 MHz and 4.31 GHz.
                           The governor "ondemand" may decide which speed to use
                           within this range.
           current CPU frequency: Unable to call hardware
           current CPU frequency: 3.69 GHz (asserted by call to kernel)
           boost state support:
             Supported: yes
             Active: no

          Comment


          • #6
            Originally posted by skeevy420 View Post
            This is with the v7 patches; w/o these cpupower patches. I'll try these out later on today.

            Code:
            cpupower frequency-info
            analyzing CPU 0:
            driver: amd-pstate
            CPUs which run at the same hardware frequency: 0
            CPUs which need to have their frequency coordinated by software: 0
            maximum transition latency: 131 us
            hardware limits: 400 MHz - 4.31 GHz
            available cpufreq governors: conservative ondemand userspace powersave performance schedutil
            current policy: frequency should be within 400 MHz and 4.31 GHz.
            The governor "ondemand" may decide which speed to use
            within this range.
            current CPU frequency: Unable to call hardware
            current CPU frequency: 3.69 GHz (asserted by call to kernel)
            boost state support:
            Supported: yes
            Active: no
            Run it as root.

            Comment


            • #7
              HD7950

              Here's mine if you need. Getting different readouts on 5.17-rc4 vs 5.16.10. Both custom kernels.

              5.16.10:
              Code:
              # cpupower frequency-info
              analyzing CPU 0:
              driver: amd-pstate
              CPUs which run at the same hardware frequency: 0
              CPUs which need to have their frequency coordinated by software: 0
              maximum transition latency: 131 us
              hardware limits: 550 MHz - 4.93 GHz
              available cpufreq governors: conservative ondemand userspace powersave performance schedutil
              current policy: frequency should be within 550 MHz and 4.93 GHz.
              The governor "performance" may decide which speed to use
              within this range.
              current CPU frequency: Unable to call hardware
              current CPU frequency: 3.61 GHz (asserted by call to kernel)
              boost state support:
              Supported: yes
              Active: yes
              AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.93 GHz.
              AMD PSTATE Nominal Performance: 128. Nominal Frequency: 3.80 GHz.
              AMD PSTATE Lowest Non-linear Performance: 59. Lowest Non-linear Frequency: 1.75 GHz.
              AMD PSTATE Lowest Performance: 19. Lowest Frequency: 550 MHz.
              5.17-rc4:
              Code:
              # cpupower frequency-info
              analyzing CPU 0:
              driver: amd-pstate
              CPUs which run at the same hardware frequency: 0
              CPUs which need to have their frequency coordinated by software: 0
              maximum transition latency: 131 us
              hardware limits: 550 MHz - 4.93 GHz
              available cpufreq governors: conservative ondemand userspace powersave performance schedutil
              current policy: frequency should be within 550 MHz and 4.93 GHz.
              The governor "performance" may decide which speed to use
              within this range.
              current CPU frequency: Unable to call hardware
              current CPU frequency: 3.76 GHz (asserted by call to kernel)
              boost state support:
              Supported: yes
              Active: yes
              Boost States: 0
              Total States: 3
              Pstate-P0: 3800MHz
              Pstate-P1: 2800MHz
              Pstate-P2: 2200MHz

              Comment


              • #8
                perpetually high

                current policy: frequency should be within 550 MHz and 4.93 GHz.
                Lowest Non-linear Performance: 59. Lowest Non-linear Frequency: 1.75 GHz.
                If I recall and understand correctly what AMD employees have posted on the mailing list, that means there is no perf/watt gain for any frequency below 1.75 GHz, and therefore no reason to use them unless your CPU is overheating. So for best battery life from race-to-idle, you probably want to:

                Code:
                # cpupower frequency-set -d 1.75GHz

                Comment

                Working...
                X