[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AMD Ryzen 4000 (Mobile) cpufreq issues



On Tuesday, March 16th, 2021 at 10:57 PM, Jason Andryuk <jandryuk@xxxxxxxxx> 
wrote:

> On Mon, Mar 15, 2021 at 11:03 PM Dylanger Daly
>
> dylangerdaly@xxxxxxxxxxxxxx wrote:
>
> > Hi Xen Developers,
> >
> > It appears AMD Ryzen 4000 based CPUs are not supported by `xenpm`, running 
> > `xenpm get-cpufreq-states` returns nothing and `get-cpufreq-para` returns 
> > `failed to get cpufreq parameter`
>
> In dom0, do `modprobe xen-acpi-processor` and see if `xenpm get-cpufreq-para` 
> works. Xen needs Dom0 to load some ACPI info before
>
> xenpm can work.

Thanks for your reply Jason :)

Nice, indeed modprobing produces the following:

```
[   84.055724] xen_acpi_processor: Uploading Xen processor PM info
```

```
[user@dom0 ~]$ sudo xenpm get-cpufreq-states
cpu id               : 0
total P-states       : 3
usable P-states      : 3
current frequency    : 1400 MHz
P0         [1700 MHz]: transition [                 133]
                       residency  [                5350 ms]
P1         [1600 MHz]: transition [                  17]
                       residency  [                  98 ms]
*P2        [1400 MHz]: transition [                 130]
                       residency  [                4205 ms]

cpu id               : 2
total P-states       : 3
usable P-states      : 3
current frequency    : 1400 MHz
P0         [1700 MHz]: transition [                 128]
                       residency  [                4604 ms]
P1         [1600 MHz]: transition [                  13]
                       residency  [                 110 ms]
*P2        [1400 MHz]: transition [                 122]
                       residency  [                4030 ms]

cpu id               : 4
total P-states       : 3
usable P-states      : 3
current frequency    : 1400 MHz
P0         [1700 MHz]: transition [                 135]
                       residency  [                3785 ms]
P1         [1600 MHz]: transition [                  19]
                       residency  [                 124 ms]
*P2        [1400 MHz]: transition [                 131]
                       residency  [                4175 ms]

cpu id               : 6
total P-states       : 3
usable P-states      : 3
current frequency    : 1400 MHz
P0         [1700 MHz]: transition [                 131]
                       residency  [                4726 ms]
P1         [1600 MHz]: transition [                  11]
                       residency  [                  80 ms]
*P2        [1400 MHz]: transition [                 128]
                       residency  [                4125 ms]

cpu id               : 8
total P-states       : 3
usable P-states      : 3
current frequency    : 1400 MHz
P0         [1700 MHz]: transition [                 122]
                       residency  [                4237 ms]
P1         [1600 MHz]: transition [                  14]
                       residency  [                 151 ms]
*P2        [1400 MHz]: transition [                 115]
                       residency  [                4155 ms]

cpu id               : 10
total P-states       : 3
usable P-states      : 3
current frequency    : 1700 MHz
*P0        [1700 MHz]: transition [                 123]
                       residency  [                3897 ms]
P1         [1600 MHz]: transition [                  15]
                       residency  [                 125 ms]
P2         [1400 MHz]: transition [                 115]
                       residency  [                4146 ms]

cpu id               : 12
total P-states       : 3
usable P-states      : 3
current frequency    : 1400 MHz
P0         [1700 MHz]: transition [                 122]
                       residency  [                4625 ms]
P1         [1600 MHz]: transition [                  13]
                       residency  [                 127 ms]
*P2        [1400 MHz]: transition [                 116]
                       residency  [                4328 ms]

cpu id               : 14
total P-states       : 3
usable P-states      : 3
current frequency    : 1400 MHz
P0         [1700 MHz]: transition [                 119]
                       residency  [                3430 ms]
P1         [1600 MHz]: transition [                  11]
                       residency  [                 119 ms]
*P2        [1400 MHz]: transition [                 114]
                       residency  [                4065 ms]

[user@dom0 ~]$ sudo xenpm get-cpufreq-para
cpu id               : 0
affected_cpus        : 0
cpuinfo frequency    : max [1700000] min [1400000] cur [1400000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 1700000 1600000 *1400000
scaling frequency    : max [1700000] min [1400000] cur [1400000]
turbo mode           : enabled

[CPU1] failed to get cpufreq parameter
cpu id               : 2
affected_cpus        : 2
cpuinfo frequency    : max [1700000] min [1400000] cur [1400000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 1700000 1600000 *1400000
scaling frequency    : max [1700000] min [1400000] cur [1400000]
turbo mode           : enabled

[CPU3] failed to get cpufreq parameter
cpu id               : 4
affected_cpus        : 4
cpuinfo frequency    : max [1700000] min [1400000] cur [1400000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 1700000 1600000 *1400000
scaling frequency    : max [1700000] min [1400000] cur [1400000]
turbo mode           : enabled

[CPU5] failed to get cpufreq parameter
cpu id               : 6
affected_cpus        : 6
cpuinfo frequency    : max [1700000] min [1400000] cur [1400000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 1700000 1600000 *1400000
scaling frequency    : max [1700000] min [1400000] cur [1400000]
turbo mode           : enabled

[CPU7] failed to get cpufreq parameter
cpu id               : 8
affected_cpus        : 8
cpuinfo frequency    : max [1700000] min [1400000] cur [1400000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 1700000 1600000 *1400000
scaling frequency    : max [1700000] min [1400000] cur [1400000]
turbo mode           : enabled

[CPU9] failed to get cpufreq parameter
cpu id               : 10
affected_cpus        : 10
cpuinfo frequency    : max [1700000] min [1400000] cur [1400000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 1700000 1600000 *1400000
scaling frequency    : max [1700000] min [1400000] cur [1400000]
turbo mode           : enabled

[CPU11] failed to get cpufreq parameter
cpu id               : 12
affected_cpus        : 12
cpuinfo frequency    : max [1700000] min [1400000] cur [1700000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : *1700000 1600000 1400000
scaling frequency    : max [1700000] min [1400000] cur [1700000]
turbo mode           : enabled

[CPU13] failed to get cpufreq parameter
cpu id               : 14
affected_cpus        : 14
cpuinfo frequency    : max [1700000] min [1400000] cur [1400000]
scaling_driver       : powernow
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 1700000 1600000 *1400000
scaling frequency    : max [1700000] min [1400000] cur [1400000]
turbo mode           : enabled

[CPU15] failed to get cpufreq parameter
```

There's a lot more going on there then before, I'm noticing I'm now boosting 
~3Ghz! :tada:

```
[user@dom0 ~]$ xenpm start 1|grep Avg freq
  Avg freq2975000KHz
  Avg freq2975000KHz
  Avg freq3009000KHz
  Avg freq3009000KHz
  Avg freq3179000KHz
  Avg freq3179000KHz
  Avg freq3179000KHz
  Avg freq3179000KHz
  Avg freq2771000KHz
  Avg freq2771000KHz
  Avg freq2839000KHz
  Avg freq2839000KHz
  Avg freq2873000KHz
  Avg freq2873000KHz
  Avg freq2924000KHz
  Avg freq2924000KHz
```

>
> Are you running Qubes? For some reason xen-acpi-processor doesn't
>
> load there automatically.

Yeah I'm running Qubes 4.1 (Xen 4.14), interesting it's not auto loading, I'll 
create an issue.

>
> > This was somewhat expected as Ryzen 4000 series CPUs are quite new, so as a 
> > workaround I tried putting `cpufreq=dom0-kernel dom0_max_vcpus=8 
> > dom0_vcpus_pin` onto CMDLINE, from what I've read this should essentially 
> > pass control for CPU frequency scaling down to dom0's kernel (5.11.4).
> >
> > However acpi-cpufreq doesn't load, when trying to insmod it I get the 
> > following error `insmod: ERROR: could not insert module acpi-cpufreq.ko: No 
> > such device`
> >
> > I can't seem to see anything related to Xen relinquishing control to dom0 
> > in Xen's console, any help would be appreciated
>
> I haven't tried using cpufreq=dom0-kernel, so I can't help here.

No worries, I think it maybe a depreciated option now.

>
> Regards,
>
> Jason

Cheers, Dylanger



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.