From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests: vDSO: Build vDSO tests with O2 optimisation
Date: Sun, 1 Sep 2024 20:11:07 +0200 [thread overview]
Message-ID: <ZtSuO2Bzbo5wL9se@zx2c4.com> (raw)
In-Reply-To: <46efa1f62e1604c98d10a1b6856a2b2aec0cfe9c.1725211324.git.christophe.leroy@csgroup.eu>
On Sun, Sep 01, 2024 at 07:24:03PM +0200, Christophe Leroy wrote:
> Without -O2, the generated code for testing chacha function is awful.
> GCC even implements rol32() as a function instead of just using the
> rotlwi instruction, that function is 20 instructions long.
>
> ~# time ./vdso_test_chacha
> TAP version 13
> 1..1
> ok 1 chacha: PASS
> real 0m 37.16s
> user 0m 36.89s
> sys 0m 0.26s
>
> Several other selftests directory add -O2, and the kernel is also
> always built with optimisation active. Do the same for vDSO selftests.
>
> With this patch the time is reduced by approx 15%.
>
> ~# time ./vdso_test_chacha
> TAP version 13
> 1..1
> ok 1 chacha: PASS
> real 0m 32.09s
> user 0m 31.86s
> sys 0m 0.22s
>
Seems reasonable. I'll queue it up.
Thanks.
Jason
prev parent reply other threads:[~2024-09-01 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-01 17:24 [PATCH] selftests: vDSO: Build vDSO tests with O2 optimisation Christophe Leroy
2024-09-01 18:11 ` Jason A. Donenfeld [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZtSuO2Bzbo5wL9se@zx2c4.com \
--to=jason@zx2c4.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox