• MariaDB 10.11 issue on armel/armhf

    From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Tue Jan 17 04:30:01 2023
    Hi!

    Are there any ARM experts here interested in helping MariaDB 10.11 run
    better on armel/armhf?

    The issue is explained well in upstream bug https://jira.mariadb.org/browse/MDEV-30411 but upstream is not
    investing developers/testing into armel/armhf, so I wanted to check if
    anybody here could help.

    Basically the upstream header https://github.com/MariaDB/server/tree/10.11/include/my_rdtsc.h needs
    to be extended to handle armel/armhf (and maybe also mipsel and
    mips64el) properly so it would make all official Debian architectures
    happy.

    - Otto

    PS. I am not on the list, please Reply-to-All

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeffrey Walton@21:1/5 to otto@debian.org on Tue Jan 17 05:10:01 2023
    On Mon, Jan 16, 2023 at 10:21 PM Otto Kekäläinen <otto@debian.org> wrote:

    Are there any ARM experts here interested in helping MariaDB 10.11 run
    better on armel/armhf?

    The issue is explained well in upstream bug https://jira.mariadb.org/browse/MDEV-30411 but upstream is not
    investing developers/testing into armel/armhf, so I wanted to check if anybody here could help.

    Basically the upstream header https://github.com/MariaDB/server/tree/10.11/include/my_rdtsc.h needs
    to be extended to handle armel/armhf (and maybe also mipsel and
    mips64el) properly so it would make all official Debian architectures
    happy.

    I believe Andy Polyakov performed the heavy lifting for OpenSSL. I
    would check the OpenSSL code. It should not be much more than a
    copy/paste. Or if you don't like the license, convert the *.pl file to
    a source file to see how OpenSSL does it, then write your own.

    openssl$ grep -IR rdtsc | ...

    crypto/alphacpuid.pl:.end OPENSSL_rdtsc
    crypto/alphacpuid.pl:.ent OPENSSL_rdtsc
    crypto/alphacpuid.pl:.globl OPENSSL_rdtsc crypto/alphacpuid.pl:OPENSSL_rdtsc:
    crypto/armcap.c:uint32_t OPENSSL_rdtsc(void)
    crypto/c64xpluscpuid.pl: .asg OPENSSL_rdtsc,_OPENSSL_rdtsc crypto/c64xpluscpuid.pl: .global _OPENSSL_rdtsc crypto/c64xpluscpuid.pl:_OPENSSL_rdtsc:
    crypto/cpuid.c:uint32_t OPENSSL_rdtsc(void)
    crypto/ia64cpuid.S:.endp OPENSSL_rdtsc#
    crypto/ia64cpuid.S:.global OPENSSL_rdtsc#
    crypto/ia64cpuid.S:.proc OPENSSL_rdtsc# crypto/ia64cpuid.S:OPENSSL_rdtsc:
    crypto/loongarch64cpuid.pl:# uint32_t OPENSSL_rdtsc(void) crypto/loongarch64cpuid.pl:.globl OPENSSL_rdtsc crypto/loongarch64cpuid.pl:.type OPENSSL_rdtsc,\@function crypto/loongarch64cpuid.pl:OPENSSL_rdtsc:
    crypto/pariscid.pl: .EXPORT OPENSSL_rdtsc,ENTRY crypto/pariscid.pl:OPENSSL_rdtsc
    crypto/ppccap.c: OPENSSL_rdtsc_mfspr268();
    crypto/ppccap.c: OPENSSL_rdtsc_mftb();
    crypto/ppccap.c: return OPENSSL_rdtsc_mfspr268();
    crypto/ppccap.c: return OPENSSL_rdtsc_mftb();
    crypto/ppccap.c:long OPENSSL_rdtsc_mfspr268(void);
    crypto/ppccap.c:long OPENSSL_rdtsc_mftb(void);
    crypto/ppccap.c:uint32_t OPENSSL_rdtsc(void) crypto/ppccpuid.pl:.OPENSSL_rdtsc_mfspr268: crypto/ppccpuid.pl:.OPENSSL_rdtsc_mftb:
    crypto/ppccpuid.pl:.globl .OPENSSL_rdtsc_mfspr268 crypto/ppccpuid.pl:.globl .OPENSSL_rdtsc_mftb
    crypto/riscvcap.c:uint32_t OPENSSL_rdtsc(void)
    crypto/s390xcpuid.pl:.globl OPENSSL_rdtsc
    crypto/s390xcpuid.pl:.size OPENSSL_rdtsc,.-OPENSSL_rdtsc crypto/s390xcpuid.pl:.type OPENSSL_rdtsc,\@function crypto/s390xcpuid.pl:OPENSSL_rdtsc:
    crypto/sparcv9cap.c:uint32_t OPENSSL_rdtsc(void)
    crypto/x86_64cpuid.pl: rdtsc
    crypto/x86_64cpuid.pl: rdtsc # collect 1st diff crypto/x86_64cpuid.pl: rdtsc # collect 1st tick crypto/x86_64cpuid.pl:.Loop: rdtsc
    crypto/x86_64cpuid.pl:.globl OPENSSL_rdtsc
    crypto/x86_64cpuid.pl:.size OPENSSL_rdtsc,.-OPENSSL_rdtsc crypto/x86_64cpuid.pl:.type OPENSSL_rdtsc,\@abi-omnipotent crypto/x86_64cpuid.pl:OPENSSL_rdtsc:
    crypto/x86cpuid.pl: &rdtsc ();

    You can convert a *.pl file to a source file that can be assembled or
    compiled by following the instructions at https://wiki.openssl.org/index.php/Cryptogams_AES or https://wiki.openssl.org/index.php/Cryptogams_SHA.

    Jeff

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Jeffrey Walton on Tue Jan 17 09:20:01 2023
    Hi Jeffrey!

    On 1/17/23 04:59, Jeffrey Walton wrote:
    I believe Andy Polyakov performed the heavy lifting for OpenSSL. I
    would check the OpenSSL code. It should not be much more than a
    copy/paste. Or if you don't like the license, convert the *.pl file to
    a source file to see how OpenSSL does it, then write your own.

    openssl$ grep -IR rdtsc | ...

    (...)

    You can convert a *.pl file to a source file that can be assembled or compiled by following the instructions at https://wiki.openssl.org/index.php/Cryptogams_AES or https://wiki.openssl.org/index.php/Cryptogams_SHA.

    Thanks for this very useful reference. I think, this should give the MariaDB developers
    all the information they need to implement the rdtsc calls for the remaining architectures.

    Wondering why they simply didn't use the OpenSSL code, the license shouldn't be a problem,
    should it?

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to All on Tue Jan 17 20:50:01 2023
    Hello Otto!

    On 1/17/23 20:33, Otto Kekäläinen wrote:
    Thanks for the pointers!

    I suspect MariaDB developers will not do any code changes. The patch to fix https://github.com/MariaDB/server/tree/10.11/include/my_rdtsc.h needs to come from somebody with easy access to armel/armhf/mipsel/mips64el to test the patch
    and the knowledge to argument why the code change is correct.

    MIPS machines are available through the GCC compile farm:

    https://gcc.gnu.org/wiki/CompileFarm

    Access to ARM32 platforms is available to anyone with a Raspberry Pi.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Tue Jan 17 21:00:01 2023
    Thanks for the pointers!

    I suspect MariaDB developers will not do any code changes. The patch to fix https://github.com/MariaDB/server/tree/10.11/include/my_rdtsc.h needs to
    come from somebody with easy access to armel/armhf/mipsel/mips64el to test
    the patch and the knowledge to argument why the code change is correct.

    Anybody here willing to take a stab on it?

    <div dir="auto">Thanks for the pointers!<div dir="auto"><br></div><div dir="auto">I suspect MariaDB developers will not do any code changes. The patch to fix <a href="https://github.com/MariaDB/server/tree/10.11/include/my_rdtsc.h">https://github.com/
    MariaDB/server/tree/10.11/include/my_rdtsc.h</a> needs to come from somebody with easy access to armel/armhf/mipsel/mips64el to test the patch and the knowledge to argument why the code change is correct.</div><div dir="auto"><br></div><div dir="auto">
    Anybody here willing to take a stab on it?</div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)