Giter Club home page Giter Club logo

kernel_gcc_patch's Introduction

Kernel_gcc_patch

This kernel patch adds additional CPU options to the Linux kernel accessible under:

 Processor type and features  --->
 Processor family --->

Why a specific patch?

The kernel uses its own set of CFLAGS, KCFLAGS. For example, see:

Expanded CPUs include

CPU Family GCC Optimization Min GCC Ver
Native optimizations autodetected by GCC -march=native 9.3
Generic 64-bit level v2 -march=x86-64-v2 11.0
Generic 64-bit level v3 -march=x86-64-v3 11.0
Generic 64-bit level v4 -march=x86-64-v4 11.0
AMD Improved K8-family -march=k8-sse3 9.3
AMD K10-family -march=amdfam10 9.3
AMD Family 10h (Barcelona) -march=barcelona 9.3
AMD Family 14h (Bobcat) -march=btver1 9.3
AMD Family 16h (Jaguar) -march=btver2 9.3
AMD Family 15h (Bulldozer) -march=bdver1 9.3
AMD Family 15h (Piledriver) -march=bdver2 9.3
AMD Family 15h (Steamroller) -march=bdver3 9.3
AMD Family 15h (Excavator) -march=bdver4 9.3
AMD Family 17h (Zen) -march=znver1 9.3
AMD Family 17h (Zen 2) -march=znver2 9.3
AMD Family 19h (Zen 3) -march=znver3 10.3
Intel Bonnell family Atom -march=bonnell 9.3
Intel Silvermont family Atom -march=silvermont 9.3
Intel Goldmont family Atom (Apollo Lake and Denverton) -march=goldmont 9.3
Intel Goldmont Plus family Atom (Gemini Lake) -march=goldmont-plus 9.3
Intel 1st Gen Core i3/i5/i7-family (Nehalem) -march=nehalem 9.3
Intel 1.5 Gen Core i3/i5/i7-family (Westmere) -march=westmere 9.3
Intel 2nd Gen Core i3/i5/i7-family (Sandybridge) -march=sandybridge 9.3
Intel 3rd Gen Core i3/i5/i7-family (Ivybridge) -march=ivybridge 9.3
Intel 4th Gen Core i3/i5/i7-family (Haswell) -march=haswell 9.3
Intel 5th Gen Core i3/i5/i7-family (Broadwell) -march=broadwell 9.3
Intel 6th Gen Core i3/i5/i7-family (Skylake) -march=skylake 9.3
Intel 6th Gen Core i7/i9-family (Skylake X) -march=skylake-avx512 9.3
Intel 8th Gen Core i3/i5/i7-family (Cannon Lake) -march=cannonlake 9.3
Intel 10th Gen Core i7/i9-family (Ice Lake) -march=icelake-client 9.3
Intel Xeon (Cascade Lake) -march=cascadelake 10.2
Intel Xeon (Cooper Lake) -march=cooperlake 10.2
Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake) -march=cooperlake 10.2
Intel 3rd Gen 10nm++ Xeon (Sapphire Rapids) -march=sapphirerapids 11.0
Intel 11th Gen i3/i5/i7/i9-family (Rocket Lake) -march=rocketlake 11.0
Intel 12th Gen i3/i5/i7/i9-family (Alder Lake) -march=alderlake 11.0

Benchmarks

Intro

Three different machines running a generic x86-64 kernel and an otherwise identical kernel running with the optimized gcc options were tested using a make based endpoint.

Conclusion

There are small but real speed increases to running with this patch as judged by a make endpoint. The increases are on par with the speed increase that the upstream sanctioned core2 option gives users, so not including additional options seems somewhat arbitrary to me.

Details

  1. Three test machines: Intel Xeon X3360, Intel i7-2620M, Intel Core i7-3660K.
  2. All ran the make benchmark (linked below) 35 times while booted into a 'generic' kernel. Then all ran the same make benchmark 35 times after booting into an optimized kernel. Below are the optimizations chosen for each machine.
    • X3360 = core2
    • i7-2620M = sandybridge
    • i7-3660K = ivybridge
  3. Results were analyzed for statistical significance via ANOVA plots that clearly show statistically significant albeit small differences.

Discussion

  1. All the assumptions for ANOVA are met:
    • Data are normally distributed as show in the normal quantile plots.
    • The population variances are fairly equal (Levene and Barlett tests).
  2. The ANOVA plots clearly show significance.
    • Pair-wise analysis by Tukey-Kramer shows significance at the 0.05 level for all CPUs compared.

Below are the differences in median values:

CPU Difference in median value
core2 +87.5 ms
sandybridge +79.7 ms
ivybridge +257.2 ms

References

Credit

Legacy support

Find support for older version of the linux kernel and of gcc in the outdated_versions directory.

Data

Sandybridge vs. Generic

2620_m

Ivybridge vs. Generic

3770_k

Core2 vs. Generic

x3360

kernel_gcc_patch's People

Contributors

bircoph avatar bryant1410 avatar dougvj avatar emcek avatar ferroin avatar graysky2 avatar montjoie avatar omkhar avatar pfactum avatar sirlucjan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.