RFR: 8268228: TSC is not used for CPUTimeStampCounter on AMD processor [v2]

David Holmes david.holmes at oracle.com
Sun Jun 6 23:27:34 UTC 2021


Hi Yasumasa,

On 4/06/2021 3:42 pm, Yasumasa Suenaga wrote:
> On Fri, 4 Jun 2021 05:08:33 GMT, David Holmes <dholmes at openjdk.org> wrote:
> 
>>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>>>
>>>    Fix comments
>>
>> Hi Yasumasa,
>>
>> This seems reasonable to address the observed problem, though I have to wonder why a system with invariant TSC is not properly reporting a maximum frequency? Makes me wonder how many chips may actually be impacted here?
>>
>> Thanks,
>> David
> 
> Thanks @dholmes-ora for your review!
> I pushed new commit. Could you review again?
> 
>> This seems reasonable to address the observed problem, though I have to wonder why a system with invariant TSC is not properly reporting a maximum frequency?
> 
> I guess it is not specified to contain the frequency in brand string, I'm not sure.
> In AMD processor, we can seem to get effective frequency from MSR, but it requires kernel mode, so we can't use it.
> 
>> Makes me wonder how many chips may actually be impacted here?
> 
> I guess AMD processors are affected it at least. For example, Opteron and Athlon do not seem to have its frequency in their brand string.
> 
> https://www.cpu-world.com/cgi-bin/CPUID.pl?CPUID=73494
> https://www.cpu-world.com/cgi-bin/CPUID.pl?CPUID=74038

As per my update to the bug report I'm less inclined to support this 
change as the affects could be more far reaching than I first thought. 
Suddenly enabling the TSC usage on systems that currently do not use it 
may be disruptive, especially if those systems do not infact have a 
reliable invariant-TSC to use.

David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/4350
> 


More information about the hotspot-dev mailing list