[jdk16] RFR: 8259765: ZGC: Handle incorrect processor id reported by the operating system

David Holmes david.holmes at oracle.com
Tue Jan 19 10:00:30 UTC 2021


On 19/01/2021 7:42 pm, Per Liden wrote:
> On 1/19/21 10:31 AM, Florian Weimer wrote:
>> I tried to comment on the Github pull request, but Skara overwrite my
>> comment.
>>
>> You could perhaps look at the highest CPU in the affinity mask, add 1,
>> and take the maximum of that and the return value of
>> sysconf(_SC_NPROCESSORS_CONF). As long as OpenVZ is not altering CPU
>> masks dynamically, this should work around this particular issue, in a
>> way that doesn't increase overhead for everyone.
>>
>> It would be good to have someone from Virtuozzo comment to indicate
>> whether the affinity mask is actually reliable for this.  But they will
>> see test failures in low-level test suites if the affinity mask and
>> sched_getcpu are incompatible (I actually wrote a glibc test case for
>> this).
> 
> Glibc's tst-getcpu.c (which I assume is the test you are referring to?) 
> fails in their environment, so it seems like the affinity mask isn't 
> reliable either.

Then there will potentially be a number of other problems because the 
active processor count may not be correct either.

David
-----

> cheers,
> Per



More information about the hotspot-gc-dev mailing list