RFR: 8307766: Linux: Provide the option to override the timer slack [v7]
Thomas Stuefe
stuefe at openjdk.org
Mon Jul 3 12:17:55 UTC 2023
On Mon, 3 Jul 2023 11:29:53 GMT, David Holmes <dholmes at openjdk.org> wrote:
>>> ??? We can't affect either the stacksize, nor guard pages of an existing native thread!
>>
>> No, but we place guard pages into the stacks of attached threads. We also do other things, e.g. set the signal mask, or set the FPU control word.
>>
>> My point is that we attempt to minimize the differences between attached threads and created threads. Which makes sense. Therefore it feels odd that Java APIs that depend on blocking syscalls should show different behavior depending on whether they are called in a created or in an attached thread. The developer of the Java code may not even know. You may run with hotspot embedded into some custom launcher, and the launcher doing its own thread pooling.
>
> We only do to attached threads what we need to do to enable them to run Java - and those things should not affect them once they have detached. We don't mess with attached thread names for example. You can make the case either way for this - you may want the attached thread to behave exactly like a native Java thread, or you may be upset that the behaviour of an attached threads changes when executing non Java code because of some action attaching took. So I don't have a concern that native threads are not affected by this experimental flag at least at this initial stage of experimentation.
You are saying we do the minimum needed to run java, but leave them alone otherwise? Okay, I can see the logic in that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13889#discussion_r1250797148
More information about the hotspot-runtime-dev
mailing list