[crac] RFR: PID adjustment on checkpoint [v3]
Anton Kozlov
akozlov at openjdk.org
Wed Jun 21 17:01:30 UTC 2023
On Wed, 21 Jun 2023 14:18:09 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> As far as I understand the max PID is not INT_MAX, it is 2^22. In case of CRAC_MIN_PID is greater than 2^22, we'd have a possible infinite loop while spinning the last PID.
>
> I wouldn't test what's in `/proc/sys/kernel/pid_max` explicitly, but if PID #N+1 is lower than PID #N we have probably overflowed and that's what we should detect, and fail gracefully.
Got it, in case user has provided some big value. For spin_last_pid, yes, it makes a lot of sense to build some safety, like Radim's suggestion. Or to limit number of attempts e.g. by the value itself (it should not take more than min_pid attempts to get pid>min_pid).
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/86#discussion_r1237316064
More information about the crac-dev
mailing list