[crac] RFR: RFC: -XX:CPUFeatures=0xnumber for CPU migration [v22]
Jan Kratochvil
jkratochvil at openjdk.org
Wed May 31 13:21:33 UTC 2023
On Wed, 31 May 2023 11:03:44 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> I have remembered that was intentional for more safety of what jdk vs. glibc detect from CPU. I agree it is too expensive to do a jdk re-exec each time. The behavior you have seen can be now achieved by `-XX:CPUFeatures=verify`. Usefulness of this new option may not be too big.
>>
>> To disable everything around the CPU features is now possible by `-XX:CPUFeatures=ignore`. I agree it may be useful if the glibc interface for these CPU features gets somehow incompatible.
>
>> I have remembered that was intentional for more safety of what jdk vs. glibc detect from CPU.
>
> Could you elaborate a bit about the safety? In JDK we should have the same algorithm for determing glibc features. Do you mean the situation when JDK and GLIBC feature detection have diverged, e.g. due to update in the glibc?
I have removed the option `-XX:CPUFeatures=verify`. It had some effect only on old glibcs and even there it did only check jdk against jdk's own logic. Not against glibc.
Diversion of JDK and GLIBC feature detection is tested by default but only if either `CPU_FEATURE_ACTIVE` or `ld.so --list-diagnostics` are available
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/41#discussion_r1211706577
More information about the crac-dev
mailing list