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

Dan Heidinga heidinga at openjdk.org
Thu Feb 2 14:53:10 UTC 2023


On Thu, 2 Feb 2023 06:07:59 GMT, Jan Kratochvil <duke at openjdk.org> wrote:

> > This is very similar to the approach the OpenJ9 team has taken in their CRIU efforts and have found that it works reasonable well for the use cases they have targeted (mostly restore inside a container).
> 
> Could you send some more specific link for that functionality?

Details on the glibc tunables used by OpenJ9 are in: https://github.com/eclipse-openj9/openj9/issues/14253

A script setting them for some of the tests: https://github.com/eclipse-openj9/openj9/commit/172bcf7244116186d4edde019473db69fb5d9559

Open Liberty also sets the glibc tuneables as part of their server scripts for use with CRIU which I think shows consumers need to be aware of the issue: https://github.com/OpenLiberty/open-liberty/pull/22132

> > Ashutosh suggested an alternative approach back in Feb 2022 [0] [1] of providing a single "-XX:[+-]PortableCode" with a common enough baseline set of features
> 
> IIUC you can just use `-XX:CPUFeatures=0` with this patch for the same effect. As my employer is all about Java Performance I find useful to provide the option of more optimal runtime JIT features.

Also a big fan of Java performance and a fan of avoiding foot-guns =)  There are benefits to both approaches, I think most users will want a simple "make it portable given a good baseline system" (aka how most native binaries are built) and those who need the most performance can use the existing Hotspot enable/disable flags to allow particular cpu features.

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

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


More information about the crac-dev mailing list