RFR: 6942632: Hotspot should be able to use more than 64 logical processors on Windows [v3]

David Holmes dholmes at openjdk.org
Mon Mar 4 06:36:55 UTC 2024


On Fri, 1 Mar 2024 06:17:21 GMT, Saint Wesonga <duke at openjdk.org> wrote:

>> Sorry I'm still not clear here. From my reading `GetProcessAffinityMask` is either going to return a zero mask or a non-zero mask. In the non-zero case, the count must be <=64. So even if we intend to use > 64 processors, this mask reading will always limit us to a value < 64. And the zero mask is only for one special case. So regardless of the use of the "start" command, it seems to me this will cause us to bail out at line 903. ??
>
>> Sorry I'm still not clear here. From my reading `GetProcessAffinityMask` is either going to return a zero mask or a non-zero mask. In the non-zero case, the count must be <=64. So even if we intend to use > 64 processors, this mask reading will always limit us to a value < 64. And the zero mask is only for one special case. So regardless of the use of the "start" command, it seems to me this will cause us to bail out at line 903. ??
> 
> If there are 64 bits set in the process affinity mask, there is no way to tell whether or not the start command was used to set this mask. This implementation treats this case as equivalent to the user not restricting processor affinities at all. We don't bail out at line 903 because in this case, logical_processors == si.dwNumberOfProcessors and all 65+ processors from line 964 will therefore be usable.

Sorry to belabour this but IIUC the only time we will use > 64 processors is if the affinity masks is all ones - right? But we cannot distinguish between the cases of only wanting to use 64 processors and wanting to use > 64 processors. And if we didn't use the start command and have not otherwise set the affinity mask, then that mask will be all ones.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17576#discussion_r1510650651


More information about the hotspot-runtime-dev mailing list