commit e9b99b14be4202fde17a126be29454032a70ca66 Author: Alexandre Frade Date: Fri Dec 5 03:16:21 2025 +0000 Linux 6.18.0-xanmod1 Signed-off-by: Alexandre Frade commit 8b39c1793ed9bcd2a43e5e8cdf225572813e1c73 Author: Alexandre Frade Date: Tue Jul 29 01:01:08 2025 +0000 XANMOD: .gitlab-ci: Add gitlab-ci.yml file Signed-off-by: Alexandre Frade commit 66e03397e648d8acdd960d3bb67cc40a46a30b95 Author: Serge Hallyn Date: Fri May 31 19:12:12 2013 +0100 sysctl: add sysctl to disallow unprivileged CLONE_NEWUSER by default add sysctl to disallow unprivileged CLONE_NEWUSER by default This is a short-term patch. Unprivileged use of CLONE_NEWUSER is certainly an intended feature of user namespaces. However for at least saucy we want to make sure that, if any security issues are found, we have a fail-safe. Signed-off-by: Serge Hallyn [bwh: Remove unneeded binary sysctl bits] [bwh: Keep this sysctl, but change the default to enabled] Signed-off-by: Alexandre Frade commit 6d969c8c6a6fc9e4fcb5ffc7bee9a0751958b2b1 Author: Mark Weiman Date: Sun Aug 12 11:36:21 2018 -0400 PCI: Enable overrides for missing ACS capabilities This an updated version of Alex Williamson's patch from: https://lkml.org/lkml/2013/5/30/513 Original commit message follows: PCIe ACS (Access Control Services) is the PCIe 2.0+ feature that allows us to control whether transactions are allowed to be redirected in various subnodes of a PCIe topology. For instance, if two endpoints are below a root port or downsteam switch port, the downstream port may optionally redirect transactions between the devices, bypassing upstream devices. The same can happen internally on multifunction devices. The transaction may never be visible to the upstream devices. One upstream device that we particularly care about is the IOMMU. If a redirection occurs in the topology below the IOMMU, then the IOMMU cannot provide isolation between devices. This is why the PCIe spec encourages topologies to include ACS support. Without it, we have to assume peer-to-peer DMA within a hierarchy can bypass IOMMU isolation. Unfortunately, far too many topologies do not support ACS to make this a steadfast requirement. Even the latest chipsets from Intel are only sporadically supporting ACS. We have trouble getting interconnect vendors to include the PCIe spec required PCIe capability, let alone suggested features. Therefore, we need to add some flexibility. The pcie_acs_override= boot option lets users opt-in specific devices or sets of devices to assume ACS support. The "downstream" option assumes full ACS support on root ports and downstream switch ports. The "multifunction" option assumes the subset of ACS features available on multifunction endpoints and upstream switch ports are supported. The "id:nnnn:nnnn" option enables ACS support on devices matching the provided vendor and device IDs, allowing more strategic ACS overrides. These options may be combined in any order. A maximum of 16 id specific overrides are available. It's suggested to use the most limited set of options necessary to avoid completely disabling ACS across the topology. Note to hardware vendors, we have facilities to permanently quirk specific devices which enforce isolation but not provide an ACS capability. Please contact me to have your devices added and save your customers the hassle of this boot option. Rebased-by: Alexandre Frade Signed-off-by: Mark Weiman Signed-off-by: Alexandre Frade commit da91458b77d71c0baf1d5227ced303abeb90e188 Author: Paolo Pisati Date: Tue Jan 23 16:33:16 2024 +0100 file: export file_close_fd() instead of close_fd_get_file() Following the refactor done in: commit a88c955fcfb49727d0ed86b47410f6555a8e69e4 Author: Christian Brauner Date: Thu Nov 30 13:49:07 2023 +0100 file: s/close_fd_get_file()/file_close_fd()/g update the export directive we added in: commit 17f7fa4baad268cc4a93205747222be931699788 Author: Christian Brauner Date: Wed Jan 16 23:13:25 2019 +0100 UBUNTU: SAUCE: binder: turn into module Anbox probably needs a review too. Signed-off-by: Paolo Pisati Signed-off-by: Alexandre Frade commit 41f32f7fbccde4d88df0afbfbcb53d6a8131d6b0 Author: Andrea Righi Date: Fri Dec 17 11:14:24 2021 +0100 wait: allow to use __wake_up_pollfree() from GPL modules commit ebafbcf7f32d ("UBUNTU: SAUCE: binder: turn into module") is changing binder to be a module, but __wake_up_pollfree() can only be used internally by the kernel. Make __wake_up_pollfree an EXPORT_SYMBOL_GPL so that it can be used by the binder module. Signed-off-by: Andrea Righi Signed-off-by: Alexandre Frade commit dd1d6b11caefecebdf4fbc2a56a8a46e768a77d7 Author: Christian Brauner Date: Wed Jan 23 21:54:23 2019 +0100 binder: give binder_alloc its own debug mask file Currently both binder.c and binder_alloc.c both register the /sys/module/binder_linux/paramters/debug_mask file which leads to conflicts in sysfs. This commit gives binder_alloc.c its own /sys/module/binder_linux/paramters/alloc_debug_mask file. Signed-off-by: Christian Brauner Signed-off-by: Seth Forshee Signed-off-by: Alexandre Frade commit 01af30f7d8aa146271dbef7dddda2b0549627f23 Author: Christian Brauner Date: Wed Jan 16 23:13:25 2019 +0100 binder: turn into module The Android binder driver needs to become a module for the sake of shipping Anbox. To do this we need to export the following functions since binder is currently still using them: - security_binder_set_context_mgr() - security_binder_transaction() - security_binder_transfer_binder() - security_binder_transfer_file() - can_nice() - __close_fd_get_file() - mmput_async() - task_work_add() - map_kernel_range_noflush() - get_vm_area() - zap_page_range_single() - put_ipc_ns() - get_ipc_ns_exported() - show_init_ipc_ns() Signed-off-by: Christian Brauner [ saf: fix additional reference to init_ipc_ns from 5.0-rc6 ] Signed-off-by: Seth Forshee [ arighi: fix EXPORT_SYMBOL vs EXPORT_SYMBOL_GPL change from 6.0-rc5 ] [ arighi: zap_page_range() has been dropped, export zap_page_range_single() in 6.3 ] Signed-off-by: Andrea Righi [ ppisati: export list_lru_add, list_lru_del, lock_vma_under_rcu] Signed-off-by: Paolo Pisati [ tjaalton: selftests got converted to KUnit ] Signed-off-by: Timo Aaltonen Signed-off-by: Alexandre Frade commit 714f3bcb7092184dea4cf9b8c526281b4914314f Author: Andrey Smirnov Date: Sun Sep 24 15:02:33 2023 -0700 mfd: steamdeck: Expose controller board power in sysfs As of version 118 Deck's BIOS implements "SCBP" method that allows gating power of the controller board (VBUS). Add a basic WO method to our root MFD device to allow toggling that. Signed-off-by: Andrey Smirnov (cherry picked from commit f97f32718acc10cbb51fef925842392e80904d74) Signed-off-by: Cristian Ciocaltea Signed-off-by: Alexandre Frade commit b78af1924dfcf0376b6cc4ba31ae7d93bacc09f0 Author: Andrey Smirnov Date: Sat Feb 19 16:08:36 2022 -0800 mfd: Add MFD core driver for Steam Deck Add MFD core driver for Steam Deck. Doesn't really do much so far besides instantiating a number of MFD cells that implement all the interesting functionality. (cherry picked from commit 5f534c2d6ebdefccb9c024eb0f013bc1c0c622d9) Signed-off-by: Cristian Ciocaltea Signed-off-by: Alexandre Frade commit 61fec13b0e8d4fae7d16f4aed775ec253045b0c4 Author: Andrey Smirnov Date: Sun Feb 27 12:58:05 2022 -0800 leds: steamdeck: Add support for Steam Deck LED (cherry picked from commit 85a86d19aa7022ff0555023d53aef78323a42d0c) Signed-off-by: Cristian Ciocaltea Signed-off-by: Alexandre Frade commit 30c9f916a4d4bb5fb9215375e22775479f8726bd Author: Andrey Smirnov Date: Sat Jul 15 12:58:54 2023 -0700 hwmon: steamdeck-hwmon: Add support for max battery level/rate Add support for max battery level/charge rate attributes. Signed-off-by: Andrey Smirnov (cherry picked from commit 50af83e8fd75dc52221edd3fb6fd7a7f70c4d8a4) Signed-off-by: Cristian Ciocaltea Signed-off-by: Alexandre Frade commit 9a4aebc01dd612c24ad003ea6c2e75ada11733dc Author: Andrey Smirnov Date: Sat Feb 19 16:09:45 2022 -0800 hwmon: Add driver for Steam Deck's EC sensors Add driver for sensors exposed by EC firmware on Steam Deck hardware. (cherry picked from commit 6917aac77bee6185ae3920b936cdbe7876118c0b) Signed-off-by: Cristian Ciocaltea Signed-off-by: Alexandre Frade commit 0691d6f38a0f848a6820d94670c801f4e6ea1ca5 Author: Andrey Smirnov Date: Sun Feb 27 14:46:08 2022 -0800 extcon: Add driver for Steam Deck (cherry picked from commit f9f2eddae582ae39d5f89c1218448fc259b90aa8) Signed-off-by: Cristian Ciocaltea Signed-off-by: Alexandre Frade commit 43184408eeba7ca800311e6a815acdd4b8c80d05 Author: Felix Fietkau Date: Tue Feb 20 15:56:02 2018 +0100 netfilter: add xt_FLOWOFFLOAD target Signed-off-by: Felix Fietkau Signed-off-by: Alexandre Frade commit 23d29cf9d38c85b635cc3097f09eb8e2272b6aae Author: Alexandre Frade Date: Mon Feb 27 01:38:18 2023 +0000 netfilter: Add netfilter nf_tables fullcone support Signed-off-by: Syrone Wong Signed-off-by: Alexandre Frade commit 2fa1527cf92ee7342ae4906fd953670225f3161b Author: mfreemon@cloudflare.com Date: Tue Mar 1 17:06:02 2022 -0600 tcp: Add a sysctl to skip tcp collapse processing when the receive buffer is full For context and additional information about this patch, see the blog post at https://blog.cloudflare.com/optimizing-tcp-for-high-throughput-and-low-latency/ sysctl: net.ipv4.tcp_collapse_max_bytes If tcp_collapse_max_bytes is non-zero, attempt to collapse the queue to free up memory if the current amount of memory allocated is less than tcp_collapse_max_bytes. Otherwise, the packet is dropped without attempting to collapse the queue. If tcp_collapse_max_bytes is zero, this feature is disabled and the default Linux behavior is used. The default Linux behavior is to always perform the attempt to collapse the queue to free up memory. When the receive queue is small, we want to collapse the queue. There are two reasons for this: (a) the latency of performing the collapse will be small on a small queue, and (b) we want to avoid sending a congestion signal (via a packet drop) to the sender when the receive queue is small. The result is that we avoid latency spikes caused by the time it takes to perform the collapse logic when the receive queue is large and full, while preserving existing behavior and performance for all other cases. Signed-off-by: Alexandre Frade commit eb57a72edc8f2b2a40d81d7b0f63eeef8ecdccc3 Author: Oleksandr Natalenko Date: Mon Oct 13 08:33:45 2025 +0200 tcp_bbr: v3: update TCP 'bbr' congestion control module to BBRv3 Original patchset Link: https://github.com/google/bbr/tree/v3 Signed-off-by: Oleksandr Natalenko Signed-off-by: Alexandre Frade commit a361e6d3e2d44098cfa7130ca319810d6c2c6bb5 Author: Steven Barrett Date: Sat May 21 15:15:09 2022 -0500 ZEN: dm-crypt: Disable workqueues for crypto ops Queueing in dm-crypt for crypto operations reduces performance on modern systems. As discussed in an article from Cloudflare, they discovered that queuing was introduced because the crypto subsystem used to be synchronous. Since it's now asynchronous, we get double queueing when using the subsystem through dm-crypt. This is obviously undesirable and reduces throughput and increases latency. Fixes: https://github.com/zen-kernel/zen-kernel/issues/282 Signed-off-by: Alexandre Frade commit 20bd13de36f726ef8f1319a07412b3c8ccf589cb Author: Kenny Levinsen Date: Sun Dec 27 14:43:13 2020 +0000 ZEN: input/evdev: Use call_rcu when detaching client Significant time was spent on synchronize_rcu in evdev_detach_client when applications closed evdev devices. Switching VT away from a graphical environment commonly leads to mass input device closures, which could lead to noticable delays on systems with many input devices. Replace synchronize_rcu with call_rcu, deferring reclaim of the evdev client struct till after the RCU grace period instead of blocking the calling application. While this does not solve all slow evdev fd closures, it takes care of a good portion of them, including this simple test: #include #include int main(int argc, char *argv[]) { int idx, fd; const char *path = "/dev/input/event0"; for (idx = 0; idx < 1000; idx++) { if ((fd = open(path, O_RDWR)) == -1) { return -1; } close(fd); } return 0; } Time to completion of above test when run locally: Before: 0m27.111s After: 0m0.018s Signed-off-by: Kenny Levinsen Signed-off-by: Alexandre Frade commit 0c6a68f4e340c2769dbd4a96d9aef70a205ad6cb Author: Arjan van de Ven Date: Thu Jun 2 23:36:32 2016 -0500 drivers: initialize ata before graphics ATA init is the long pole in the boot process, and its asynchronous. move the graphics init after it so that ata and graphics initialize in parallel Signed-off-by: Alexandre Frade commit 0404c989ab073009c3c6db7d98483be8e343119f Author: Arjan van de Ven Date: Sun Feb 18 23:35:41 2018 +0000 locking: rwsem: spin faster tweak rwsem owner spinning a bit Signed-off-by: Alexandre Frade commit 19ad99afcf89555012b5b78b880c76d2810199c5 Author: William Douglas Date: Wed Jun 20 17:23:21 2018 +0000 firmware: Enable stateless firmware loading Prefer the order of specific version before generic and /etc before /lib to enable the user to give specific overrides for generic firmware and distribution firmware. Signed-off-by: Alexandre Frade commit 396ca4f568dda9fc49763dc7347fb21d173e2747 Author: Arjan van de Ven Date: Thu Dec 13 01:00:49 2018 +0000 sched/wait: Do accept() in LIFO order for cache efficiency Signed-off-by: Alexandre Frade commit 05c570e03891e861394a4b914483a9e21718a192 Author: Alexandre Frade Date: Mon Jul 28 20:00:15 2025 +0000 XANMOD: Makefile: Move x86 instruction set selection to kernel-wide build Signed-off-by: Alexandre Frade commit 3a775accf7cb72c69131ac114c765f29948e44b1 Author: graysky Date: Mon Jul 28 18:42:09 2025 +0000 x86/kconfig: more x86-64 ISA levels and uarches FEATURES This patch adds additional tunings via new x86-64 ISA levels and more micro-architecture options to the Linux kernel in three classes. 1. New generic x86-64 ISA levels These are selectable under: Processor type and features ---> x86-64 compiler ISA level • x86-64 A value of (1) is the default • x86-64-v2 A value of (2) brings support for vector instructions up to Streaming SIMD Extensions 4.2 (SSE4.2) and Supplemental Streaming SIMD Extensions 3 (SSSE3), the POPCNT instruction, and CMPXCHG16B. • x86-64-v3 A value of (3) adds vector instructions up to AVX2, MOVBE, and additional bit-manipulation instructions. There is also x86-64-v4 but including this makes little sense as the kernel does not use any of the AVX512 instructions anyway. Users of glibc 2.33 and above can see which level is supported by running: /lib/ld-linux-x86-64.so.2 --help | grep supported Or /lib64/ld-linux-x86-64.so.2 --help | grep supported 2. New micro-architectures These are selectable under: Processor type and features ---> Processor family • AMD Improved K8-family • AMD K10-family • AMD Family 10h (Barcelona) • AMD Family 14h (Bobcat) • AMD Family 16h (Jaguar) • AMD Family 15h (Bulldozer) • AMD Family 15h (Piledriver) • AMD Family 15h (Steamroller) • AMD Family 15h (Excavator) • AMD Family 17h (Zen) • AMD Family 17h (Zen 2) • AMD Family 19h (Zen 3)** • AMD Family 19h (Zen 4)‡ • AMD Family 1Ah (Zen 5)§ • Intel Silvermont low-power processors • Intel Goldmont low-power processors (Apollo Lake and Denverton) • Intel Goldmont Plus low-power processors (Gemini Lake) • Intel 1st Gen Core i3/i5/i7 (Nehalem) • Intel 1.5 Gen Core i3/i5/i7 (Westmere) • Intel 2nd Gen Core i3/i5/i7 (Sandybridge) • Intel 3rd Gen Core i3/i5/i7 (Ivybridge) • Intel 4th Gen Core i3/i5/i7 (Haswell) • Intel 5th Gen Core i3/i5/i7 (Broadwell) • Intel 6th Gen Core i3/i5/i7 (Skylake) • Intel 6th Gen Core i7/i9 (Skylake X) • Intel 8th Gen Core i3/i5/i7 (Cannon Lake) • Intel 10th Gen Core i7/i9 (Ice Lake) • Intel Xeon (Cascade Lake) • Intel Xeon (Cooper Lake)* • Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake)* • Intel 4th Gen 10nm++ Xeon (Sapphire Rapids)† • Intel 11th Gen i3/i5/i7/i9-family (Rocket Lake)† • Intel 12th Gen i3/i5/i7/i9-family (Alder Lake)† • Intel 13th Gen i3/i5/i7/i9-family (Raptor Lake)‡ • Intel 14th Gen i3/i5/i7/i9-family (Meteor Lake)‡ • Intel 5th Gen 10nm++ Xeon (Emerald Rapids)‡ Notes: If not otherwise noted, gcc >=9.1 is required for support. *Requires gcc >=10.1 or clang >=10.0 **Required gcc >=10.3 or clang >=12.0 †Required gcc >=11.1 or clang >=12.0 ‡Required gcc >=13.0 or clang >=15.0.5 §Required gcc >14.0 or clang >=19.0? 3. Auto-detected micro-architecture levels Compile by passing the '-march=native' option which, "selects the CPU to generate code for at compilation time by determining the processor type of the compiling machine. Using -march=native enables all instruction subsets supported by the local machine and will produce code optimized for the local machine under the constraints of the selected instruction set."[1] MINOR NOTES RELATING TO INTEL ATOM PROCESSORS This patch also changes -march=atom to -march=bonnell in accordance with the gcc v4.9 changes. Upstream is using the deprecated -match=atom flags when I believe it should use the newer -march=bonnell flag for atom processors.[2] It is not recommended to compile on Atom-CPUs with the 'native' option.[3] The recommendation is to use the 'atom' option instead. BENEFITS Small but real speed increases are measurable using a make endpoint comparing a generic kernel to one built with one of the respective microarchs. See the following experimental evidence supporting this statement: https://github.com/graysky2/kernel_compiler_patch?tab=readme-ov-file#benchmarks REQUIREMENTS linux version 6.1.79+ gcc version >=9.0 or clang version >=9.0 ACKNOWLEDGMENTS This patch builds on the seminal work by Jeroen.[4] REFERENCES 1. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-x86-Options 2. https://bugzilla.kernel.org/show_bug.cgi?id=77461 3. https://github.com/graysky2/kernel_gcc_patch/issues/15 4. http://www.linuxforge.net/docs/linux/linux-gcc.php Signed-off-by: Alexandre Frade commit d59273bf1dd5493c2d0beca1bcc264a89396cd3b Author: Alexandre Frade Date: Thu Nov 13 22:38:14 2025 +0000 XANMOD: x86/build: Prevent generating avx2 floating-point code Signed-off-by: Alexandre Frade commit 102ec4610d9732cabd0e673d8f2b32f19db42026 Author: Alexandre Frade Date: Mon Apr 24 04:50:34 2023 +0000 XANMOD: scripts/setlocalversion: Move localversion* files to the end Signed-off-by: Alexandre Frade commit cd758cdf2f1383687b471abdefcc2ac1089ea682 Author: Alexandre Frade Date: Sun May 29 00:57:40 2022 +0000 XANMOD: scripts/setlocalversion: remove '+' tag for git repo short version Signed-off-by: Alexandre Frade commit 8b3f5d95715a5b20418d2056f1adb76bd82194c3 Author: Alexandre Frade Date: Mon Sep 16 08:09:56 2024 +0000 XANMOD: lib/kconfig.debug: disable default SYMBOLIC_ERRNAME and DEBUG_BUGVERBOSE Signed-off-by: Alexandre Frade commit 82d5699c87da51fb9a2802df31750d8a107aeaf1 Author: Alexandre Frade Date: Tue Mar 31 13:32:08 2020 -0300 XANMOD: cpufreq: tunes ondemand and conservative governor for performance Signed-off-by: Alexandre Frade commit b506acd55273cda67e08889e77cee6818694650b Author: Alexandre Frade Date: Wed Jun 15 17:07:29 2022 +0000 XANMOD: sched/autogroup: Add kernel parameter and config option to enable/disable autogroup feature by default Signed-off-by: Alexandre Frade commit 9bab52797b73edefa6d5d7c7a4f4fd6114898e05 Author: Alexandre Frade Date: Fri May 30 19:58:58 2025 +0000 XANMOD: mm/vmscan: Reduce amount of swapping Signed-off-by: Alexandre Frade commit 76e85b0e219098ce087c6ac0d5855d8348907e8e Author: Alexandre Frade Date: Sun Apr 28 09:06:54 2024 +0000 XANMOD: mm: Raise max_map_count default value Signed-off-by: Alexandre Frade commit d907fac77175845d69c24da158abc6ad052f79bf Author: Alexandre Frade Date: Mon Jul 28 17:20:16 2025 +0000 XANMOD: vfs: Decrease rate at which vfs caches are reclaimed Signed-off-by: Alexandre Frade commit 29a885ea7580e257625ee0052c447c2ee4ebdc4d Author: Alexandre Frade Date: Mon Jan 29 17:26:15 2018 +0000 XANMOD: kconfig: add 500Hz timer interrupt kernel config option Signed-off-by: Alexandre Frade commit 8d52301091fdc986c66c4947ad4c7d1a0bf5ddca Author: Alexandre Frade Date: Mon Jul 15 04:50:34 2024 +0000 XANMOD: blk-wbt: Set wbt_default_latency_nsec() to 2msec Signed-off-by: Alexandre Frade commit dbf9c9dc489b039cb0c783d38ff1c207ca3720c1 Author: Alexandre Frade Date: Mon Sep 16 15:36:01 2024 +0000 XANMOD: block: Set rq_affinity to force complete I/O requests on same CPU Signed-off-by: Alexandre Frade commit a2b2eb3528173b64469bc0dd162b71527b41067c Author: Alexandre Frade Date: Thu Jan 6 16:59:01 2022 +0000 XANMOD: block/mq-deadline: Disable front_merges by default Signed-off-by: Alexandre Frade commit 77b7484d83361462e5a6733cc9baa4d37b09c324 Author: Alexandre Frade Date: Wed May 11 18:56:51 2022 +0000 XANMOD: block/mq-deadline: Increase write priority to improve responsiveness Signed-off-by: Alexandre Frade commit 40fc4fc51b847d47e11a53baa8844f69f01b3d86 Author: Alexandre Frade Date: Sun Sep 15 23:03:38 2024 +0000 XANMOD: sched: Add yield_type sysctl to reduce or disable sched_yield Signed-off-by: Alexandre Frade commit f0581a892e1624aaa2c967e90382a3c85ad193fd Author: Alexandre Frade Date: Thu May 11 19:41:41 2023 +0000 XANMOD: fair: Set scheduler tunable latencies to unscaled Signed-off-by: Alexandre Frade commit 760b069333f2c74f03b2f5ad1f8d9ffa5f13b96e Author: Alexandre Frade Date: Thu Nov 28 22:55:27 2024 +0000 kbuild: Re-add .config file required to sign external modules Signed-off-by: Alexandre Frade commit 96848c71a8fce2783c777417a4e320d995e283bf Author: Alexandre Frade Date: Sun Jul 6 15:56:57 2025 +0000 XANMOD: kbuild: deb-pkg: Create -dbg when make DEB_DEBUG_PKG=1 Signed-off-by: Alexandre Frade commit 1db7b848c2e87e473a05b6dbb3ee5e5f44ef876e Author: Alexandre Frade Date: Fri Jun 20 01:14:28 2025 +0000 XANMOD: kbuild: Add SMS-based software pipelining flags Add support for Swing Modulo Scheduling (SMS) when default optimization level is enabled. This optimization performs software pipelining on innermost loops, overlapping iterations to improve instruction-level parallelism. Signed-off-by: Alexandre Frade commit c23babc1eb8171040d22648097d67015eb4b2a3b Author: Alexandre Frade Date: Sat Jul 19 02:28:57 2025 +0000 XANMOD: x86/build: Add LLVM polyhedral loop optimizer flags LLVM's Polly is able to optimize various loops throughout the kernel for cache locality. A mathematical representation of the program, based on polyhedra, is analysed to find opportunistic optimisations in memory access patterns which then leads to loop transformations. Polly is not built with LLVM by default, and requires LLVM to be compiled with the Polly "project". This can be done by adding Polly to -DLLVM_ENABLE_PROJECTS, for example: -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;polly" Preliminary benchmarking seems to show an improvement of around two percent across perf benchmarks: Benchmark | Control | Polly -------------------------------------------------------- bonnie++ -x 2 -s 4096 -r 0 | 12.610s | 12.547s perf bench futex requeue | 33.553s | 33.094s perf bench futex wake | 1.032s | 1.021s perf bench futex wake-parallel | 1.049s | 1.025s perf bench futex requeue | 1.037s | 1.020s Furthermore, Polly does not produce a much larger image size netting it to be a "free" optimisation. A comparison of a bzImage for a kernel with and without Polly is shown below: bzImage | stat --printf="%s\n" ------------------------------------- Control | 9333728 Polly | 9345792 Compile times were one percent different at best, which is well within the range of noise. Therefore, I can say with certainty that Polly has a minimal effect on compile times, if none. Link: https://github.com/CachyOS/kernel-patches/blob/master/6.15/misc/0001-clang-polly.patch Signed-off-by: Peter Jung Signed-off-by: Alexandre Frade commit 32c8f484a330b1a2a727942aa8370ded435b85ff Author: Alexandre Frade Date: Mon Aug 28 05:00:29 2023 +0000 XANMOD: x86/build: Add more CFLAGS optimizations Signed-off-by: Alexandre Frade commit 7d0a66e4bb9081d75c82ec4957c50034cb0ea449 Author: Linus Torvalds Date: Sun Nov 30 14:42:10 2025 -0800 Linux 6.18