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

Per Liden per.liden at oracle.com
Tue Jan 19 09:42:03 UTC 2021


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.

cheers,
Per



More information about the hotspot-gc-dev mailing list