RFR: 8268014: Build failure on SUSE Linux Enterprise Server 11.4 (s390x) due to 'SYS_get_mempolicy' was not declared [v4]
Matthias Baesken
mbaesken at openjdk.java.net
Wed Jun 2 13:16:29 UTC 2021
On Wed, 2 Jun 2021 11:28:46 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>> Hi all,
>>
>> Please review the patch which fixes the build failure on SUSE Linux Enterprise Server 11.4 (s390x).
>>
>> @dholmes-ora had reminded me of this bug in [1].
>> But I missed the fact that ZGC is currently only built on x64 and aarch64.
>> And I'm sorry for this breakage.
>>
>> The sys_call numbers of get_mempolicy for different platforms are just copied from the libnuma source code [2].
>>
>> Thanks.
>> Best regards,
>> Jie
>>
>>
>> [1] https://github.com/openjdk/jdk/pull/4205#discussion_r639708293
>> [2] https://github.com/numactl/numactl/blob/master/syscall.c
>
> Jie Fu has updated the pull request incrementally with one additional commit since the last revision:
>
> __NR_get_mempolicy may be also undefined
> I would prefer to see something smaller and S390 specific as there is only a problem on that platform.
>
> Also is the right check for S390 or **s390x** ? Different versions of this patch have used each of them. I have no idea what the classification of S390 machines is, so ni idea if these are in fact equivalent. ??
>
> Thanks,
> David
The S390 works nicely for both "flavors" it comes from our own autoconf/platform.m4
elif test "x$OPENJDK_$1_CPU" = xs390; then
HOTSPOT_$1_CPU_DEFINE=S390
elif test "x$OPENJDK_$1_CPU" = xs390x; then
HOTSPOT_$1_CPU_DEFINE=S390
So this looks reliable. The other one `__s390x__` seems to come from GNUC, see https://sourceforge.net/p/predef/wiki/Architectures/ . It worked too nicely in our night make. However I think the HS macro S390 would be prefered in HS coding (it is used at quite alot of places ).
Regarding a shorter version, then maybe this one (its ugly but should work my colleagues told me the old value 236 for the mempolicy would be recognized too ).
#if !defined(SYS_get_mempolicy) && defined(S390)
// No SYS_get_mempolicy definition on SUSE Linux Enterprise Server 11.4 (s390x)
#define SYS_get_mempolicy 236
#endif
-------------
PR: https://git.openjdk.java.net/jdk/pull/4277
More information about the hotspot-runtime-dev
mailing list