commit 8a3d3ca5e43fe12413ee4f303c3fec0d15ac185e Author: Alexandre Frade Date: Tue Apr 14 00:42:48 2026 +0000 Linux 7.0.0-xanmod1 Signed-off-by: Alexandre Frade commit c9f15578c127a2b51014f9c2fdd8f41194eafee5 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 fc4a6354d6a4817ed313095b579cf753fc7ab85a 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 f1c01d3ae48be68eed402a62f0800142d70449bf 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 62aa6267e770f305f944889c833787d9ac7ec46a 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 f3e8b82bf76042622e0ddc5d55616e7d89847aa9 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 df50a5ce1c072dc5f2d7e68bbca60af1d9314963 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 cad3c9ebd4c36ebcf1a9bf5aa0db735fac3d3eb8 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 8f4026589db1d5a7bf1d3011a45c315991c9eed1 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 164c05decef0d9c142391e0dc1c357f108b2e16f 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 151f19cf02afb26cce7d78486adade4962853a5f 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 d5ae05003c74b46342729bdb287e287694a900f5 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 86529cc2c71752f7772073b2d681c2fe44f11e65 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 ad5f9c2a4d8e7b302a9d56feb106770fe472c597 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 785075f5a8ae8e67c89d82d8e81c5307e77473db 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 25c95f057e09618ee5c8bbd14447e1d8b8f28287 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 abd67fd397f8583e9140843817b2b6d498386124 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 d83a544c4f01786ff82532a65b164c0db0433bd0 Author: Oleksandr Natalenko Date: Sun Feb 22 23:45:32 2026 +0100 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 c782b4ba919631c56e3b4b2369005ee7606e8dd1 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 12f2c05b7caf70e48e790f5985590cf9ee005c90 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 d50cfd6a54e9e338bf5b91fc3f0c040a09a94fc0 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 6e449a8e9c2ac523e09a638ebb21e8f6e7576d10 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 5b9f912e9bbc9f445df6a2a22fa2f07935e0c637 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 50f83482c971955d8c325af442aabbff39d50c50 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 cbcd71f70ea1f93d985ede8b1efab89de5003476 Author: Masahito S Date: Mon Mar 23 02:11:53 2026 +0900 mm: Add working set protection for anon and clean file pages sysctl vm.workingset_protection=1 by default. Signed-off-by: Alexandre Frade commit b5e3822c3f219b9da9fdf62685994404976cb1d6 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 17c88c7ac669add08770fb43395e5918f486f07b 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 f4e7ff65b36a03c22c7ca09b6dd6540df146f0d5 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 3ae5491b5b7ed59102ede504b9b44a8529983067 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 49b7279b62d201b133a4d5f6ecc42af2bdd993ad 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 e6f763ccc076da455cdf91a3b3fb8cd537f7e845 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 7d73cda0eddd512b61c00baa529d661c21901e90 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 2f061659261b290e6da552c60bb98871a13a620e 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 50199b89d92ec2e177dc738bf153c0a40acc7c92 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 1cf73d1c7cafff5e387bcfd718b52d3b593379fc 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 8c8dcd0f92a779efc0004911384e1946606b8030 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 9dc44341ce901b5f1fdbcd00d1e9777d6a2ee80d 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 30db2fc23e6c648992e14ded5866319149341136 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 4ada45465ab348aef2243f1dff1e8269a9ada58c 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 9864e47792e533c4d554e1186f6c26d2ff45c571 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 cdcc212d20288e20cee9fdfcddc01f7dd2bbc4df 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 2873cc8d62d0b85ccc24e092be585f82bfd6a510 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 da6b2b23888c966ee14e6066f3aaa42df5efa6ea 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 f349e3a6ab0481afc825cbe45cd980e906ec9065 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 8d8fdf8c383bc27cb4e239ae34a77077097eadad 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 7c6f92a73e6d7fa9ab649ad21483dd42e34bde2d 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 028ef9c96e96197026887c0f092424679298aae8 Author: Linus Torvalds Date: Sun Apr 12 13:48:06 2026 -0700 Linux 7.0