RFR: 8307766: Linux: Provide the option to override the timer slack [v7]

David Holmes dholmes at openjdk.org
Mon Jul 3 08:06:57 UTC 2023


On Mon, 3 Jul 2023 07:58:07 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> IIUC using zero as default would be incorrect as that may reset an inherited customized value to the platform default. A value of -1 says "ignore this".
>
> We only call pctrl if the flag is >0. So, 0 has already the meaning of "ignore".

That seems a bug then. We should pass zero to pctrl if that is the value set (even if the current implementation does nothing for a value of zero).

>>> Or do threads inherit this override from their parent threads? So you only set it once for main thread?
>> 
>> Exactly. And my understanding is that we are only concerned with the main set of Java threads not any natively attached threads. If you have native threads then they can set their own values. We should not be second-guessing or trying to save/restore.
>
>> > Or do threads inherit this override from their parent threads? So you only set it once for main thread?
>> 
>> Exactly. And my understanding is that we are only concerned with the main set of Java threads not any natively attached threads. If you have native threads then they can set their own values. We should not be second-guessing or trying to save/restore.
> 
> That seems an strange omission and at odds with other runtime decisions we force upon attached threads, e.g. stack size / guard pages.
> 
> If that decision is deliberate, we should at least document it in the flag description.

??? We can't affect either the stacksize, nor guard pages of an existing native thread!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13889#discussion_r1250441567
PR Review Comment: https://git.openjdk.org/jdk/pull/13889#discussion_r1250439025


More information about the hotspot-runtime-dev mailing list