raptorlake support on 14.x/15.x for frequency scaling

From: David Cross <david_at_crossfamilyweb.com>
Date: Fri, 15 Aug 2025 22:00:39 UTC
I have been running on raptorlake (lenovo thinkpad P16s gen2) for awhile 
now (over a year), and yes, I know we don't handle P and E cores 
correctly yet; (I have been meaning to do some cheap experimentation 
where just looking to see if the last context switch was voluntary or 
involuntary and if involuntary move to a P core, otherwise keep it on E 
cores if available).

Anyway, I know and accept the scheduler limitation here, but the 
frequency scaling is not working as I would expect.  If  just idling the 
CPU floats around 1.8ghz, if I start a SINGLE CPU intensive process it 
will scale up to 5.1ghz (good), but NOT  stay there, dropping to 4.1ghz, 
whereas windows can maintain 5GHZ.  If I start MULTIPLE CPU intensive 
processes it scales the frequency DOWN to 1.1GHZ (or lower).  I have 
dev.hwpstate_intel.X.epp set to 0 for all cores, and it seems to 'work', 
if I have it set to 50 it tops out about 3.1ghz, setting to 100 drops it 
to 1.7ghz, and 0 lets me hit 5 (for single core workloads).

I do not appear to be thermally throttling, core temperatures are a cool 
~55C, no entries in the throttle log.  Fan control is set to automatic 
and does appear to scale (but not to the full that windows does).  If I 
set fan control to manual I can get the full gale force I observe in 
windows, but the CPUs will not go above the paltry 1.x GHZ when fully maxed.


Ideas?  Everything else works fantastically, and honestly this isn't too 
big a burden, but we should be able to do more.