[crac] RFR: RFC: -XX:CPUFeatures=0xnumber for CPU migration [v2]

Ashutosh Mehra duke at openjdk.org
Wed Feb 15 18:28:21 UTC 2023


On Mon, 13 Feb 2023 05:11:07 GMT, Jan Kratochvil <duke at openjdk.org> wrote:

> So one should just run it once on the oldest farm machine and copy/paste the number to the snapshotting script. Or just to run it on all of the farm machines and do a logical AND of all the numbers if one is unsure which machine is the oldest one in your farm.

Challenge with this approach is the user needs to have access to all the farm machines. This may not always be the case. If I am running my application on cloud, it wouldn't be possible for me to do this in anyway.
For cloud workloads where the user does not know the cpu features of the systems, I think it makes sense to enable only a baseline set of cpu features.

The mechanism currently proposed would work in the scenario where systems are known, but it sounds cumbersome to use from the way it is described. The user has to create a checkpoint, migrate it to another system and restore it just to find out the cpu features to use. We can achieve the same without the need to create any checkpoint. All we need is an option to display the hex value of feature flags for the cpu features currently enabled.
eg java -XX:CPUFeatures=native -XX:+ShowFeatureFlagsInHex would show the feature flags enabled by the JVM based on native system features.
Now, as mentioned earlier in the comment , user can run  -XX:CPUFeatures=native -XX:+ShowFeatureFlagsInHex on all the systems and do a logical AND to find the common set of features to enable.

Nonetheless, we should keep the proposed mechanism as well to detect incompatible CPU features, but IMO it should not be used as a way to discover the common CPU features for a set of systems, and it also does not solve the problem when the set of target systems are not known.

-------------

PR: https://git.openjdk.org/crac/pull/41


More information about the crac-dev mailing list