On Wed, 4 Sep 2024 12:22:49 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

> Hi , my guess is too that it is the second call. In case we want to go for a 
> loop, should we have a maximum number of retry operations like 10 or 100 ? 
> Another option might be to always make the buffer a little bigger (how much 
> can be discussed) and use the larger buffer to account for some increase in 
> the number of processes.

It may have to loop indefinitely to allow for cases where something else is 
forking 100+ processes. In practise I assume it will only need to retry once or 
twice. You could combine the approaches so that you allocate a bit more than is 
required to take account of a few processes created in the window between the 
two calls to sysctl.

So I think we should just do this. We still need to figure out the exception 
when sys call fails for some other reason.

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

PR Comment: https://git.openjdk.org/jdk/pull/20839#issuecomment-2329251128

Reply via email to