So are we seeing results of the actual Kernels here or the benchmark programs ? Because unless Michael used binaries built using the SAME compiler across these tests, we're not really benchmarking the kernels. If he, as I assume, ran the GCC built kernel against GCC built benchmark programs, and the Clang built Kernel against Clang built benchmark programs, the result likely has very little to do with the performance of the underlying kernel and just how well the respective compilers optimized said benchmarks.
Announcement
Collapse
No announcement yet.
Ringing In 2020 By Clang'ing The Linux 5.5 Kernel - Benchmarks Of GCC vs. Clang Built Kernels
Collapse
X
-
Originally posted by Grinch View PostSo are we seeing results of the actual Kernels here or the benchmark programs ? Because unless Michael used binaries built using the SAME compiler across these tests, we're not really benchmarking the kernels. If he, as I assume, ran the GCC built kernel against GCC built benchmark programs, and the Clang built Kernel against Clang built benchmark programs, the result likely has very little to do with the performance of the underlying kernel and just how well the respective compilers optimized said benchmarks.Michael Larabel
https://www.michaellarabel.com/
- Likes 3
Comment
-
Originally posted by Michael View PostAs said in the article, the only change is the kernel built by the different compilers. The compiler for the software under test isn't changing in this article.
- Likes 1
Comment
-
Originally posted by CommunityMember View PostWhile it was never, exactly, a competition, the friendly goal of being at least equal, if not better, than the other one, have managed to encourage improvements to both compilers to the point of essentially equivalent generated code performance. That has been a good result for all.
in any event this is great news. This should lead to higher quality code in the kernel repository. .
Comment
-
I just attempted this.
The clang binary ended up being about 5% smaller and boots fine.
The first issue i'm seeing is when I run clinfo
It goes defunct and dmesg shows the following:
[ 158.153940] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 158.153943] #PF: supervisor write access in kernel mode
[ 158.153944] #PF: error_code(0x0002) - not-present page
[ 158.153945] PGD f5f785067 P4D f5f785067 PUD fa86e1067 PMD 0
[ 158.153947] Oops: 0002 [#1] SMP
...
[ 158.153992] Fixing recursive fault but reboot is needed!
[ 275.310239] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 275.310242] #PF: supervisor write access in kernel mode
[ 275.310243] #PF: error_code(0x0002) - not-present page
[ 275.310243] PGD f54ea0067 P4D f54ea0067 PUD fce79a067 PMD 0
[ 275.310245] Oops: 0002 [#2] SMP
[ 275.310247] CPU: 13 PID: 2093 Comm: clinfo Tainted: G D 5.4.7 #7
Anyone else have this issue ?
Comment
-
Originally posted by FireBurn View PostWould love to know the difference between compiling the kernel with ld.bfd and ld.lld linkers, ls LLVM's offering faster?
Comment
Comment