Re: [PATCH] selftests: vDSO: Build vDSO tests with O2 optimisation

From
Jason A. Donenfeld <Jason@zx2c4.com>
Date
2024-09-01 18:11:12
Also in
linux-kselftest, lkml
Reply to
Christophe Leroy, 2024-09-01
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
Thread (2 messages) 2 messages, 2 authors, last reply 2024-09-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help