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

Florian Weimer fweimer at redhat.com
Tue Jan 19 09:31:03 UTC 2021


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).

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill




More information about the hotspot-gc-dev mailing list