[jdk11u-dev] RFR: 8234930: Use MAP_JIT when allocating pages for code cache on macOS [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Wed Dec 8 05:29:20 UTC 2021
On Tue, 7 Dec 2021 20:07:50 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
> However, would not it be useful to have a queue of clean(er) backports, for ease of review as each patch is altered minimally?
> And for the long-term maintenance, as the result will be less different from the mainline?
11u is in maintenance mode. See Andrews mail: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2021-October/009521.html . So we expect the codebase to diverge from upstream, that's unavoidable.
As mentioned in that mail, fixes for new OS releases fall into a grey area. MacOS is an important platform, so I'm sure we'd decide in favor here. I'm fine with downporting if it cannot be avoided. But it would still be nice if this could be done with a smaller patch focused solely on MacOS. The problem seems so simple... and it does not have to be pretty like in head, just stable and working.
Maybe stupid ideas, but how about always passing MAP_JIT? Or somewhere storing, in a global variable, the code cache address range, and only applying MAP_JIT to mmap calls that modify that range? Those changes could be kept local to os_bsd.cpp then.
Have these patches downported by Oracle into their 11u? If yes, we should downport them too for parity with Oracle. If not, we would diverge from Oracle's 11u downport version. Not sure how bad that would be.
I let @GoeLin chime in here and decide with his maintainer hat on.
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/580
More information about the jdk-updates-dev
mailing list