[crac] RFR: RFC: -XX:CPUFeatures=0xnumber for CPU migration [v3]
Jan Kratochvil
duke at openjdk.org
Mon Feb 13 08:04:32 UTC 2023
On Thu, 2 Feb 2023 06:09:18 GMT, Jan Kratochvil <duke at openjdk.org> wrote:
>> src/hotspot/os/linux/os_linux.cpp line 6177:
>>
>>> 6175: assert(sig == RESTORE_SIGNAL, "got what requested");
>>> 6176:
>>> 6177: linux_ifunc_reset();
>>
>> Assuming we're freezing all the threads to allow resetting the linux_ifuncs, it would be good to comment explicitly about why that's the right approach and/or necessary.
>>
>> Also, what if we stopped a thread that was about to be call one of these ifuncs - that had already loaded the old address into a register - before we did the reset? Wouldn't it still have the wrong value and with the right (wrong?) thread scheduling, still abort after the restore?
>>
>> Basically, I think there is probably a race here still.
>
> You are right, there is a race, I will fix that, thanks.
The race should be fixed now. Although still all threads of OpenJDK should be at a safepoint but in practice they are not, why so?
-------------
PR: https://git.openjdk.org/crac/pull/41
More information about the crac-dev
mailing list