Comment 40 for bug 1917813

Revision history for this message
In , dsmythies (dsmythies-linux-kernel-bugs) wrote :

It is true that the quicktest should at least check the idle state 2 is indeed C1E.

I ran the inverse impulse response test. Kernel 5.12-rc2. Processor i5-10600K. inverse gap 842 nSec:

1034 tests 0 fails.

with the patch as per comment 38 above, i.e. with C1E:

1000 tests 16 fails. 98.40% pass 1.60% fail.

I ran just the generic periodic test at 347 hertz and light load, stock kernel, i.e. no C1E:

HWP disabled: active/powersave:
doug@s19:~/freq-scalers$ /home/doug/c/consume 32.0 347 300 1
consume: 32.0 347 300 PID: 1280
 - fixed workpacket method: Elapsed: 300000158 Now: 1617030857155911
Total sleep: 169222343
Overruns: 0 Max ovr: 0
Loops: 104094 Ave. work percent: 43.592582

HWP enabled: active/powersave:
doug@s19:~$ /home/doug/c/consume 32.0 347 300 1
consume: 32.0 347 300 PID: 1293
 - fixed workpacket method: Elapsed: 300000654 Now: 1617031529268276
Total sleep: 171458395
Overruns: 725 Max ovr: 1449
Loops: 104094 Ave. work percent: 42.847326

The above was NOT due to CPU migration:

doug@s19:~$ taskset -c 10 /home/doug/c/consume 32.0 347 3600 1
consume: 32.0 347 3600 PID: 1341
 - fixed workpacket method: Elapsed: 3600002498 Now: 1617036391455519
Total sleep: 2086618739
Overruns: 3189 Max ovr: 1864
Loops: 1249133 Ave. work percent: 42.038409

Conclusion: there is still something very minor going on even without C1E being involved.

Notes:

I think HWPBOOST was, at least partially, programming around the C1E issue.

In addition to the ultimate rejection of the patch of the thread referenced in
comment 38, I think other processors should be rolled back to the same state. I have never been able to measure any energy consumption or performance difference for all of those deep idle states on my i5-9600K processor.

Call me dense, but I only figured out yesterday that HWP is called "Speed Shift" in other literature and BIOS.

It does not make sense that we spent so much effort a few years ago to make sure that we did not dwell in shallow idle states for long periods, only to have HWP set the requested pstate to minimum upon its (C1E) use, albeit under some other conditions. By definition the system is NOT actually idle, it it were we would have asked for a deep idle state.