Linux: Kernel benchmarks

Created on 1 Oct 2019  路  4Comments  路  Source: ClangBuiltLinux/linux

Hi,

do you guys know any benchmarks that allow me to get some reports how gcc vs. clang compiled kernel performs ?

Does this sounds legit ? https://github.com/intel/lkp-tests

question

Most helpful comment

Linux kernel compile benchmark from Thorsten Leemhuissounds promising.

It supports building with LLVM=1.

Version 0.9.0 to be released next week.

I asked for benchmark numbers with Linux v5.7 (see kcbench issue Benchmark numbers for Linux v5.7)

  1. https://gitlab.com/knurd42/kcbench/
  2. https://gitlab.com/knurd42/kcbench/-/blob/master/README.md
  3. https://gitlab.com/knurd42/kcbench/-/raw/master/kcbench.man1.md

All 4 comments

I never tried LKP myself, but it looks promising. Seeing a comparison table of GCC+BFD, GCC+LLD, Clang+BFD, Clang+LLD would be really cool.
As for correctness testing, there is a project called LTP. Right now we only check that kernel compiles and boots, but not testing individual syscalls. Would be good to run LTP on all four combinations and compare the results (they should be identical, but I believe that nobody really tested it yet).

There were some benchmarks on Phoronix recently with a 3900x and a 9900K : https://www.phoronix.com/scan.php?page=article&item=clang-linux-53&num=1

Hackbench on the 9900K showed the most some significant differences between a GCC and a Clang compiled kernel.

Linux kernel compile benchmark from Thorsten Leemhuissounds promising.

It supports building with LLVM=1.

Version 0.9.0 to be released next week.

I asked for benchmark numbers with Linux v5.7 (see kcbench issue Benchmark numbers for Linux v5.7)

  1. https://gitlab.com/knurd42/kcbench/
  2. https://gitlab.com/knurd42/kcbench/-/blob/master/README.md
  3. https://gitlab.com/knurd42/kcbench/-/raw/master/kcbench.man1.md

Sorry, I am busy with some other stuff and my workstation with sandybridge-cpu is not that powerful.

Can someone look into [2] and try kcbench with --add-make-args 'LD=ld.lld'?
You can set the target/host compiler via --cc <compiler>and --hostcc <compiler>.
As an example: Is the combination clang-10 and ld.lld-10 working?
And report back to Thorsten?

Thanks!

  1. https://gitlab.com/knurd42/kcbench/-/issues/11
  2. https://gitlab.com/knurd42/kcbench/-/commit/d05842eb45c67e4201b7655d0f32217b7c6ed778
Was this page helpful?
0 / 5 - 0 ratings

Related issues

nathanchance picture nathanchance  路  3Comments

nickdesaulniers picture nickdesaulniers  路  4Comments

nathanchance picture nathanchance  路  3Comments

nathanchance picture nathanchance  路  3Comments

tpimh picture tpimh  路  5Comments