diff --git a/pkgbuilds/linux-omarchy-bore/0011-kbuild-optimize-for-performance-o3.patch b/pkgbuilds/linux-omarchy-bore/0011-kbuild-optimize-for-performance-o3.patch new file mode 100644 index 0000000..9506ee1 --- /dev/null +++ b/pkgbuilds/linux-omarchy-bore/0011-kbuild-optimize-for-performance-o3.patch @@ -0,0 +1,31 @@ +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -935,6 +935,9 @@ KBUILD_RUSTFLAGS += -Copt-level=2 + else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE + KBUILD_CFLAGS += -Os + KBUILD_RUSTFLAGS += -Copt-level=s ++else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 ++KBUILD_CFLAGS += -O3 ++KBUILD_RUSTFLAGS += -Copt-level=3 + endif + + # Always set `debug-assertions` and `overflow-checks` because their default +diff --git a/init/Kconfig b/init/Kconfig +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -1622,6 +1622,14 @@ config CC_OPTIMIZE_FOR_SIZE + Choosing this option will pass "-Os" to your compiler resulting + in a smaller kernel. + ++config CC_OPTIMIZE_FOR_PERFORMANCE_O3 ++ bool "Optimize harder for performance (-O3)" ++ help ++ Build with the "-O3" compiler flag: more inlining, loop ++ unrolling and vectorization than -O2, at the cost of a larger ++ kernel image and larger modules. Rust code is built at ++ opt-level 3. ++ + endchoice + + config HAVE_LD_DEAD_CODE_DATA_ELIMINATION diff --git a/pkgbuilds/linux-omarchy-bore/0011-kbuild-optimize-for-performance-o3.patch.sig b/pkgbuilds/linux-omarchy-bore/0011-kbuild-optimize-for-performance-o3.patch.sig new file mode 100644 index 0000000..48ab131 Binary files /dev/null and b/pkgbuilds/linux-omarchy-bore/0011-kbuild-optimize-for-performance-o3.patch.sig differ diff --git a/pkgbuilds/linux-omarchy-bore/PKGBUILD b/pkgbuilds/linux-omarchy-bore/PKGBUILD index 3f38f93..a7f01ac 100644 --- a/pkgbuilds/linux-omarchy-bore/PKGBUILD +++ b/pkgbuilds/linux-omarchy-bore/PKGBUILD @@ -49,6 +49,7 @@ source=( ${_rcpatch:+https://cdn.kernel.org/pub/linux/kernel/v${_major}.x/stable-review/${_rcpatch}.xz} ${_rcpatch:+https://cdn.kernel.org/pub/linux/kernel/v${_major}.x/stable-review/${_rcpatch}.sign} 0010-archlinux-base.patch{,.sig} + 0011-kbuild-optimize-for-performance-o3.patch{,.sig} 0110-bore-6.8.0.patch{,.sig} 0120-tlbpull.patch{,.sig} 0121-smp-preempt.patch{,.sig} @@ -152,6 +153,8 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a 'SKIP' '6d92fb81077232b8cd1ae500b3aabc71434792e750ea6126dc095e50d4278d3e42b3cfdc3c8bc693ea14b109f6adfa3a1ed095187fc5501962fbe8f049f867bc' 'SKIP' + 'cc2a66a097b5567e80c59b7d6c492fef5e667fc71a0390908712c69512c4136dbaf3d150b62d04eff960c796f7a94e6d0915d3b92cb336318b49f5f516a3bba6' + 'SKIP' 'a32edb39b4ee9c0378239f4998f477fe5371e6931c188d660874b360ca6d3bdcfff71cf088bed071365627d87458eca0be625e154ca3d1e8150e5e0bdf64175c' 'SKIP' 'f6c00ac2400580dffe3605d2693809396e18185f0c59b21b86f1f22a1f8d6529c51e8cc2474bc40f74a96631f415da51521a8b35d5b096e9b9d164c2755fb091' @@ -336,13 +339,15 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a 'SKIP' 'b69cf36cc5633e507866e67f59557646dda7d6ea436b145f3f3356c4b12e1300c94977a7d1214835f2476c94a30dd672076241b920d96d744fbc199539df506f' 'SKIP') -b2sums_x86_64=('54148fc55a2b611f84f62d0b1c19caf911e029cd29bda6f032b15cc2f3484a1cc648af63e101eb293b048b54df4a0efacdb39cbbaa5b13d8ea1dfc22b981ec6b') +b2sums_x86_64=('5abfe289c4487fd774890fbbe3989bb87e6b8d67e146c401ac6821b71be85a17816520b18eb874ff83e43ddece236273b2ac155943d2fdfabb1a444ba7162291') # https://www.kernel.org/pub/linux/kernel/v7.x/sha256sums.asc sha256sums=('55ddf0df8325d9dad96fcff7bd93977d22e3f50af06527572af59b77c7632b78' 'SKIP' '95f3e9209629044028373af987dc0e270a5a15acb8c8e49c5f05057220c75fe2' 'SKIP' + '6cf74fc3f28a751354187b6cf610c3e43cf9088b5f730b68dbb575828c3a7478' + 'SKIP' 'daf0aaebff3cf4679d0bb8137ace6c9a2de62f75aa4655a0a02ddf759f3c7f26' 'SKIP' 'a9171e731d08a454a50174889af8936fab962b33c37c67169b0cdf21b0b80821' diff --git a/pkgbuilds/linux-omarchy-bore/config.x86_64 b/pkgbuilds/linux-omarchy-bore/config.x86_64 index a4ddcba..4d90b02 100644 --- a/pkgbuilds/linux-omarchy-bore/config.x86_64 +++ b/pkgbuilds/linux-omarchy-bore/config.x86_64 @@ -278,8 +278,9 @@ CONFIG_BOOT_CONFIG=y # CONFIG_BOOT_CONFIG_EMBED is not set CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN=1021 CONFIG_INITRAMFS_PRESERVE_MTIME=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y +# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_LD_ORPHAN_WARN=y CONFIG_LD_ORPHAN_WARN_LEVEL="warn" CONFIG_SYSCTL=y diff --git a/pkgbuilds/linux-omarchy/0011-kbuild-optimize-for-performance-o3.patch b/pkgbuilds/linux-omarchy/0011-kbuild-optimize-for-performance-o3.patch new file mode 100644 index 0000000..9506ee1 --- /dev/null +++ b/pkgbuilds/linux-omarchy/0011-kbuild-optimize-for-performance-o3.patch @@ -0,0 +1,31 @@ +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -935,6 +935,9 @@ KBUILD_RUSTFLAGS += -Copt-level=2 + else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE + KBUILD_CFLAGS += -Os + KBUILD_RUSTFLAGS += -Copt-level=s ++else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 ++KBUILD_CFLAGS += -O3 ++KBUILD_RUSTFLAGS += -Copt-level=3 + endif + + # Always set `debug-assertions` and `overflow-checks` because their default +diff --git a/init/Kconfig b/init/Kconfig +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -1622,6 +1622,14 @@ config CC_OPTIMIZE_FOR_SIZE + Choosing this option will pass "-Os" to your compiler resulting + in a smaller kernel. + ++config CC_OPTIMIZE_FOR_PERFORMANCE_O3 ++ bool "Optimize harder for performance (-O3)" ++ help ++ Build with the "-O3" compiler flag: more inlining, loop ++ unrolling and vectorization than -O2, at the cost of a larger ++ kernel image and larger modules. Rust code is built at ++ opt-level 3. ++ + endchoice + + config HAVE_LD_DEAD_CODE_DATA_ELIMINATION diff --git a/pkgbuilds/linux-omarchy/0011-kbuild-optimize-for-performance-o3.patch.sig b/pkgbuilds/linux-omarchy/0011-kbuild-optimize-for-performance-o3.patch.sig new file mode 100644 index 0000000..90d5219 Binary files /dev/null and b/pkgbuilds/linux-omarchy/0011-kbuild-optimize-for-performance-o3.patch.sig differ diff --git a/pkgbuilds/linux-omarchy/PKGBUILD b/pkgbuilds/linux-omarchy/PKGBUILD index 8a63277..2e0bddf 100644 --- a/pkgbuilds/linux-omarchy/PKGBUILD +++ b/pkgbuilds/linux-omarchy/PKGBUILD @@ -49,6 +49,7 @@ source=( ${_rcpatch:+https://cdn.kernel.org/pub/linux/kernel/v${_major}.x/stable-review/${_rcpatch}.xz} ${_rcpatch:+https://cdn.kernel.org/pub/linux/kernel/v${_major}.x/stable-review/${_rcpatch}.sign} 0010-archlinux-base.patch{,.sig} + 0011-kbuild-optimize-for-performance-o3.patch{,.sig} 0120-tlbpull.patch{,.sig} 0121-smp-preempt.patch{,.sig} 0130-sched-detach-tasks.patch{,.sig} @@ -151,6 +152,8 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a 'SKIP' '6d92fb81077232b8cd1ae500b3aabc71434792e750ea6126dc095e50d4278d3e42b3cfdc3c8bc693ea14b109f6adfa3a1ed095187fc5501962fbe8f049f867bc' 'SKIP' + 'cc2a66a097b5567e80c59b7d6c492fef5e667fc71a0390908712c69512c4136dbaf3d150b62d04eff960c796f7a94e6d0915d3b92cb336318b49f5f516a3bba6' + 'SKIP' 'f6c00ac2400580dffe3605d2693809396e18185f0c59b21b86f1f22a1f8d6529c51e8cc2474bc40f74a96631f415da51521a8b35d5b096e9b9d164c2755fb091' 'SKIP' '6aa6ea3690f3e4e145818650537cd110d33720d662af0b3660d95e15a3f91e48c993e31117c0a2fde852f55a77a83e3a50a1a95c0df78a33ae75d43d46a9fe15' @@ -333,13 +336,15 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a 'SKIP' 'b69cf36cc5633e507866e67f59557646dda7d6ea436b145f3f3356c4b12e1300c94977a7d1214835f2476c94a30dd672076241b920d96d744fbc199539df506f' 'SKIP') -b2sums_x86_64=('11bfedf70dc9366a42b42573a3677e348fcd7b253ce13118036a75190e6c9372f9549589ff2dbfac5b976fc15d11a1b193baaee2135d331ca90f8a9a9a6e1462') +b2sums_x86_64=('459be66f895e5c75cadc2074965baa6261ba342b175eeb352157972be1940f1c6092001e8c0ab3cfbc92a35ee216ffb486f417b94df1a46ed217144257e3c7f2') # https://www.kernel.org/pub/linux/kernel/v7.x/sha256sums.asc sha256sums=('55ddf0df8325d9dad96fcff7bd93977d22e3f50af06527572af59b77c7632b78' 'SKIP' '95f3e9209629044028373af987dc0e270a5a15acb8c8e49c5f05057220c75fe2' 'SKIP' + '6cf74fc3f28a751354187b6cf610c3e43cf9088b5f730b68dbb575828c3a7478' + 'SKIP' 'a9171e731d08a454a50174889af8936fab962b33c37c67169b0cdf21b0b80821' 'SKIP' '6a27e1b363f1bb133b9905f84b00e4d01885cac84858db46bdbf764849c9984b' diff --git a/pkgbuilds/linux-omarchy/config.x86_64 b/pkgbuilds/linux-omarchy/config.x86_64 index 1a3eb2a..847db90 100644 --- a/pkgbuilds/linux-omarchy/config.x86_64 +++ b/pkgbuilds/linux-omarchy/config.x86_64 @@ -277,8 +277,9 @@ CONFIG_BOOT_CONFIG=y # CONFIG_BOOT_CONFIG_EMBED is not set CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN=1021 CONFIG_INITRAMFS_PRESERVE_MTIME=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y +# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_LD_ORPHAN_WARN=y CONFIG_LD_ORPHAN_WARN_LEVEL="warn" CONFIG_SYSCTL=y