Announcement

Collapse
No announcement yet.

AMD P-State Tracer Tool To Be Included With Linux 5.18

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

  • AMD P-State Tracer Tool To Be Included With Linux 5.18

    Phoronix: AMD P-State Tracer Tool To Be Included With Linux 5.18

    One of the most prominent additions to the Linux 5.17 kernel is the introduction of the AMD P-State driver akin to Intel's P-State driver and aims to deliver better energy efficiency than AMD Zen 2 and newer processors currently on the ACPI CPUFreq driver. With Linux 5.18 an AMD P-State tracer tool is to be included with the kernel source tree for helping to analyze and tune this new driver...

    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
    Anyone got the pstate driver to load on a desktop CPU?

    Comment


    • #3
      Originally posted by ernstp View Post
      Anyone got the pstate driver to load on a desktop CPU?
      Lots of people. If your CPU doesn't have full MSR support (on desktop, I'm only aware of Cezanne having it), you need to activate shared memory mode by doing amd_pstate.shared_mem=1 on the kernel commandline.

      Comment


      • #4
        Originally posted by ernstp View Post
        Anyone got the pstate driver to load on a desktop CPU?
        Code:
        sudo 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: 2.27 GHz (asserted by call to kernel)
         boost state support:
           Supported: yes
           Active: yes
           Boost States: 0
           Total States: 3
           Pstate-P0:  3700MHz
           Pstate-P1:  1700MHz
           Pstate-P2:  1400MHz
        I have a custom /etc/modprobe.d/amd_pstate.conf with:
        Code:
        options amd_pstate shared_mem=1
        and /etc/modprobe.d/no-acpi-cpufreq.conf with:
        Code:
        blacklist acpi_cpufreq
        As you can see, I have-no_file-naming_standard. Sometimes I remember to shift, sometimes I don't

        Comment


        • #5
          On Ubuntu 22.04, I tried with https://kernel.ubuntu.com/~kernel-pp...ine/v5.17-rc7/ .

          I added amd_pstate.shared_mem=1 to boot cmdline and amd_pstate to /etc/initramfs-tools/modules
          lsinitramfs /boot/initrd.img-5.17.0-051700rc7-generic | grep pstate
          usr/lib/modules/5.17.0-051700rc7-generic/kernel/drivers/cpufreq/amd_pstate.ko

          but it's still going to acpi-cpufreq. I see that acpi-cpufreq is built in and AMD pstate is built as a module...

          Edit: Ah an extra initcall_blacklist=acpi_cpufreq_init to boot cmdline solved it!

          Comment


          • #6
            Yeah the mail to the patches said it would have higher priority than acpi-cpufreq but that seem not to be the case.
            First of all the module does not create any log messages to the kernel log when being loaded, which makes it hard to debug, especially if it ends up not being loaded.
            On my mobile 5800U it does not work at all, whereas on my 4650G it works after blacklisting acpi-cpufreq.

            Comment


            • #7
              Originally posted by DooMMasteR View Post
              Yeah the mail to the patches said it would have higher priority than acpi-cpufreq but that seem not to be the case.
              First of all the module does not create any log messages to the kernel log when being loaded, which makes it hard to debug, especially if it ends up not being loaded.
              On my mobile 5800U it does not work at all, whereas on my 4650G it works after blacklisting acpi-cpufreq.
              OMG, so much that. Such a fun one to figure out. I have a 4650G as well. I went between the docs and my configs so many times going "WTF am I doing wrong?!?" until I attempted the nuclear option of removing acpi-cpufreq.

              I have CONFIG_X86_AMD_PSTATE=y set. I wonder if that's the problem? If they've only tested it as a =m (that's the default option)? I thought about that as I was going to click to post.

              Comment


              • #8
                It should be noted that the AMD pstate tracer utility is highly leveraged off of, and utilizes parts of, the intel_pstate_tracer.py utility. The intel_pstate_tracer.py utility has been around since about 2014, but only in the kernel tree since 2017. The utilities (Intel, and I assume AMD) are incredibly useful for gaining insight into what is going on, with minimal interference with the system itself. Unfortunately I do not have an AMD processor to try both their pstate driver and tracer with.

                Comment

                Working...
                X