Skip to content

[clang-21] Possible performance regression with hackbench? #2115

@torvic9

Description

@torvic9

Hi,

I usually run a series of benchmarks when a new major kernel version is released, and the hackbench benchmark results caught my attention:

When using a 6.16 kernel built with clang-20, I get the following results (average of 5 runs):

  1. hackbench -g 10 -l 2000 (process mode): 5.844 seconds
  2. hackbench -g 10 -l 2000 -T (thread mode): 5.704 seconds

Now, when using a kernel built with clang-21 (ceteris paribus):

  1. process mode: 5.890 seconds
  2. thread mode: 5.891 seconds

When I also add ThinLTO to the clang-21 kernel, it gets worse:

  1. process mode: 5.969 seconds
  2. thread mode: 5.980 seconds

In all the other benchmarks I've run so far, there is basically no difference (or just noise) between clang-20 and clang-21, but not so much with hackbench.

Not sure what to make of this, but I thought I should report it.


N.B.: I used the prebuilt clangs from kernel.org, versions 20.1.8 and 21.1.0-rc2, on an up-to-date Arch Linux installation, running on a Skylake laptop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions