[crac] RFR: Support -XX:+IgnoreCPUFeatures during -XX:CRaCRestoreFrom [v3]

Jan Kratochvil jkratochvil at openjdk.org
Mon Aug 14 09:40:28 UTC 2023

On Wed, 9 Aug 2023 20:00:15 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> src/hotspot/cpu/x86/globals_x86.hpp line 229:
>>> 227:       "get an error during -XX:CRaCRestoreFrom on a different machine; "    \
>>> 228:       "-XX:CPUFeatures=native is the default; "                             \
>>> 229:       "-XX:CPUFeatures=ignore will disable the CPU features check; "        \
>> What happens when you set `CPUFeatures=ignore` on checkpoint?
> That should make to use the current CPU features, the option was supported, apparently just not documented.

There is now `-XX:+IgnoreCPUFeatures` instead.

>> src/hotspot/cpu/x86/vm_version_x86.cpp line 2569:
>>> 2567:       tty->print_raw(part2, sizeof(part2) - 1);
>>> 2568:       tty->cr();
>>> 2569:       vm_exit_during_initialization();
>> Will this work when you set `CPUFeatures=generic` before checkpoint and don't set anything during restore? The option will keep its value and this might trigger the error.
>> If you don't want to add some extra tests you might piggyback in `VMOptionsTest`.
> Agree. And we are unable to handle e.g. `generic` specified for restore, although it's documented. 
> Having dedicated IgnoreCPUFeatures would simplify the implementation a lot, and we'd also could make it Experimental, as it should be.

There are currently no tests. Implemented the `-XX:+IgnoreCPUFeatures` option.


PR Review Comment: https://git.openjdk.org/crac/pull/100#discussion_r1293218428
PR Review Comment: https://git.openjdk.org/crac/pull/100#discussion_r1293219378

More information about the crac-dev mailing list