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

Re: HWP vs "xenpm get-cpufreq-..."



Hi Jan,

On Mon, Jan 15, 2024 at 11:04 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> Jason,
>
> I thought I'd try hwp on a SapphireRapids system, and of course - short
> of easy other ways of seeing whether it actually has any apparent
> effect - I've looked at "xenpm get-cpufreq-states" output. Just to find
> that according to this, the system never enters any of the designated
> Pn states (all CPUs are always claimed to be in P0), while at the same
> time the P0 residencies remain in the hundreds of milliseconds. The
> latter suggests CPUs do leave P0, yet it's then unclear what state they
> are in during such time periods.

The `xenpm get-cpufreq-states` output may be stale under HWP.  If
normally the acpi-cpufreq driver is updating them, they won't be
updated under HWP.  I'll have to look into that more, but I guess they
shouldn't be returned under HWP.

> I was also a little puzzled when comparing "xenpm get-cpufreq-para"
> output with hwp against that with acpi-cpufreq: The latter lists a range
> of 800MHz ... 2501MHz, while with hwp base is 2500MHz and max is 4800MHz.
>
> Do you have any explanation for these apparent anomalies?

The 1 in 2501 indicates the ACPI entry for the turbo frequencies.
It's a limitation of the ACPI tables, AFAIU.  The tables weren't
designed for turbo mode where the thermal constraints dynamically
limit the maximum speed.  On systems I've looked at, there would also
be a 2500MHz ACPI entry, which matches the HWP base.

The HWP 2500MHz & 4800MHz values are taken from cpuid output - I feel
confident they are correct.  The output of `xenpm get-cpufreq-average`
under HWP looks reasonable for scaling all the way up to 4800MHz
(which can only be hit briefly before throttling down) - I think I've
only seen ~4700MHz as a maximum in my use, and they it may drop to
~4200MHz for extended preiods.  Maybe try that command on your test
system?

I introduced struct cpufreq_cpuinfo .perf_freq to correct the reported
cpu frequency under HWP.  I wonder if that should also be used for
ACPI to get correct aperf/mperf output under acpi-cpufreq.  There have
been a fair number of reports from users being confused by the
reported cpu frequency.  The presence of 2501 is similarly confusing
to users since that is a made up value and doesn't match the CPU
specs.

Regards,
Jason



 


Rackspace

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