cyring / CoreFreq

CoreFreq : CPU monitoring and tuning software designed for 64-bit processors.
https://www.cyring.fr
GNU General Public License v2.0
1.97k stars 126 forks source link

Ryzen 3950X - Unknown S3 issue within fixed performance counters #291

Closed cyring closed 2 years ago

cyring commented 2 years ago

AMD/Matisse

This is an unsolved issue about counters corruption after resuming processor from S3 (Suspend To Ram).

Looking into the UCC column, delta value of 18446744073709551615, the positive value of -1, let me think that the counter is stuck to reset.

UCC is bound to the x86 register MSR_IA32_APERF https://github.com/cyring/CoreFreq/blob/07069d5c80acb48f55f1b944b1424f6109175f6e/corefreqk.c#L10548

The same test on a 5300U does not produce such issue!

Searching among the AMD specification updates has not revealed an errata.

Before S3

2021-11-11-034240_1580x550_scrot 2021-11-11-034325_644x550_scrot

After S3

2021-11-11-034450_1588x550_scrot 2021-11-11-034654_644x550_scrot

Unexpected workaround

Strangely, the effect tends to disappear over several periods and the MSR_IA32_APERF per CPU starts to count again, with occasional corruptions.