Re: RELENG_13 and min cpu frequency

From: Ian Smith <smithi_at_nimnet.asn.au>
Date: Sun, 20 Nov 2022 19:37:48 UTC
On 20 November 2022 9:48:04 am AEDT, Kevin Oberman <rkoberman@gmail.com> wrote:
 > On Fri, Nov 18, 2022 at 9:41 PM Ian Smith <smithi@nimnet.asn.au>
 > wrote:
 > 
 > > On 19 November 2022 8:28:45 am AEDT, mike tancsa <mike@sentex.net>
 > wrote:

[...]

 > >  > dev.cpu.0.freq_levels: 3400/-1
 > >  > dev.cpu.0.freq: 1302
 > >
 > > So, hmm.  powerd reads and sets values in dev.cpu.0.freq_levels,
 > hence
 > > can't change it to anything but 3400.
 > >
 > > So how is cpu.0.freq changing at all?  Is cpufreq using est(4)? 
 > Are there
 > > more freqs in dev.est.0.freq_settings?
 > >
 > > Or is it using a _relative_ driver like acpi_throttle or p4tcc? 
 > Default
 > > /boot/device.hints has both of these disabled for good reason
 > (Kevin
 > > Oberman can elaborate)
 > >
 > >  > sysctl -A debug.cpufreq
 > >  > debug.cpufreq.verbose: 0
 > >  > debug.cpufreq.lowest: 0
 > >  >
 > >  >
 > >  > CPU is CPU: Intel(R) Xeon(R) E-2226G CPU @ 3.40GHz
 > >  > (3400.00-MHz K8-class CPU)
 > >
 > > Also noted that the usual +1 freq for turbo mode isn't there. 
 > Strange?
 > > (I don't speak Xeon though)

 > In recent processors, things have changed radically WRT CPU frequency
 > and thermal behavior.
 > 
 > I have an Alder Lake system (12th gen) and a Comet Lake (10th gen).
 > Both
 > now show a single frequency. On my Alder Lake I see:
 > dev.cpu.?.freq_levels: 2496/-1
 > This is shown for all CPU devices (threads) whether P or E cores.
 > Thermal
 > control does change these seeds continually. I have seen E cores at
 > 900M,
 > but rarely. I see them as 1.2G during buildworld. The P cores are at
 > 1.3G.
 > I have never seen ANY core running at over 2.5G. When I ordered my
 > T16, the
 > specs showed minimum, default, and maximum frequencies, but I can't
 > find
 > them any longer. All I can find are "Minimum" and "Max Turbo". It's
 > not
 > clear to me what the significance of this is, but it was clearly a
 > decision
 > of Intel. To me, it implies that Turbo is really no longer distinct ,
 > but
 > considered a portion of a continuum of frequencies.
 > 
 > Just looked again. buildworld is still running, and see all CPUs are
 > at
 > 2094, 2095, 2096, and 2097.   A few seconds later, 1997 to 2094. All
 > CPUs
 > are not always running at very similar speeds. This is very different
 > from
 > anything I have seen on older processors. I see no distinction
 > between P
 > and E cores. I also suspect that powerd is no longer relevant for
 > modern
 > CPUs.  Anyone have a pointer to information on CPU frequency and
 > thermal
 > management on newer Intel processors?

Thanks Kevin.  I went hunting through freebsd-acpi archives, and found your related comments in

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264775

Seems we need some overview on what FreeBSD can and can't do regarding changing CPU speeds, or whether it's even appropriate to try doing so on these latest processors?

I'm well behind; few years ago there wasn't even the concept of different cores running different frequencies. 

Maybe the best we can do with these is making sure that fans are up to keeping the system cool enough ..

Not that this helps mike's problem with apparent packet loss, but it's hard to see if that may be related. 

cheers, Ian