Archlinux Kernel based on different schedulers and some other performance improvements.
Shell archlinuxbaby-schedcachycachy-schedulercachyoscacule-schedkernellinux-kernelperformanceperformance-tuning
readme: Some cleanups (#344)
Vasiliy Stelmachenokbd856fd11a0b
diff --git a/README.md b/README.mdindex d6a9ddfe..458d8457 100755--- a/README.md+++ b/README.md@@ -21,67 +21,79 @@- [Support](#support)# General Information about kernels-The Schedulers listed below are supported+## Scheduler Support-## linux-cachyos-We have provided all these CPU schedulers because each scheduler performs differently depending on usage. We recommend testing each one to determine which best suits your specific requirements.-- **([BORE](https://github.com/firelzrd))** **Burst-Oriented Response Enhancer** Scheduler by [firelzrd](https://github.com/firelzrd/bore-scheduler) `linux-cachyos` / `linux-bore` / `linux-cachyos-bore`-- **([EEVDF](https://lwn.net/Articles/927530/))** **Earliest Eligible Virtual Deadline** - `linux-cachyos-eevdf`-- **([SCHED-EXT](https://lwn.net/Articles/922405/))** **BPF extensible scheduler class** - `linux-cachyos-sched-ext`-- **([BMQ](https://gitlab.com/alfredchen/linux-prjc))** **BitMap queue CPU Scheduler** Scheduler by [Alfred Chen](https://gitlab.com/alfredchen) - `linux-cachyos-bmq`+We have provided all these CPU schedulers because each scheduler performs+differently depending on usage. We recommend testing each one to determine+which best suits your specific requirements.-#### CachyOS default kernel-> - **([SCHED-EXT](https://lwn.net/Articles/922405/))** **BPF extensible scheduler class** + **BORE Scheduler** - `linux-cachyos`+- **([BORE](https://github.com/firelzrd))** **Burst-Oriented Response+Enhancer** Scheduler by [firelzrd](https://github.com/firelzrd/bore-scheduler)+`linux-cachyos` / `linux-cachyos-bore`-> The CachyOS repositories provide prebuilt kernels in three different march versions: `x86-64`, `x86-64-v3`,`x86-64-v4` and `znver4` . In addition, the repositories also offer LTO-enabled kernels.-> The default `linux-cachyos` kernel is compiled with Clang and ThinLTO. For this kernel there is a `linux-cachyos-gcc` variant available.+- **([EEVDF](https://lwn.net/Articles/927530/))** **Earliest Eligible Virtual+Deadline** - `linux-cachyos-eevdf`++- **([BMQ](https://gitlab.com/alfredchen/linux-prjc))** **BitMap queue CPU+Scheduler** Scheduler by [Alfred Chen](https://gitlab.com/alfredchen) -+`linux-cachyos-bmq`+++> [!NOTE] The CachyOS repositories provide prebuilt kernels in three different+> march versions: `x86-64`, `x86-64-v3`,`x86-64-v4` and `znver4`. The default+> `linux-cachyos` kernel is compiled with Clang, Thin LTO and uses our AutoFDO+> profile. For this kernel there is a `linux-cachyos-gcc` variant available.## Features### :hammer_and_wrench: Advanced building & compiling+- Very customizable PKGBUILD with many features and improvements.-- `GCC/CLANG` Optimization with automatically found CPU architecture or also selectable CPU architecture.-- Choose between `LLVM/LTO & Thin-LTO` or `GCC`.+- Auto detection of CPU architecture and setting the appropriate compiler flags.+- Support for building with GCC or Clang.- Choose between 300Hz, 500Hz, 600 Hz ,750Hz and 1000Hz. Defaults to 1000Hz- Kernel Control Flow Integrity (kCFI) selectable when using `LLVM`+- Support for generating and using AutoFDO profiles, which is a PGO-like+optimization. See more: https://cachyos.org/blog/2411-kernel-autofdo/### :abacus: CPU enhancements-- 3 Different scheduler are supported,`SCHED-EXT`,`BORE`,`EEVDF` and `BMQ` scheduler-- AMD P-State Preferred Core / amd-pstate enhancements and fixes from -next.++- 3 different scheduler are supported: `BORE`, `EEVDF` and `BMQ` scheduler+- AMD P-State Preferred Core / amd-pstate enhancements and fixes from `linux-next`.- AMD 3D V-Cache optimizer driver-- AMD Hardware Feedback Interface-- Intel Pstate Hybrid CPU Driver-- SCHED-EXT Schedulers prebuilt in the repository # https://lwn.net/Articles/922405/ - `linux-cachyos` and `linux-cachyos-sched-ext`+- Support for RT kernel builds with BORE- Cachy Sauce `CONFIG_CACHY`, enables various tweaks for the scheduler and other settings-- Scheduler patches from `linux-next` in `linux-cachyos-bore` and `linux-cachyos-eevdf`+- Includes patches to improve performance of CRC32 and AES128 crypto.+### :bookmark_tabs: Filesystem & memory-- ZFS Filesystem support and prebuilt in the repository-- NVIDIA Module support including patches - Build the nvidia module together with the kernel-- Latest & improved ZSTD 1.5.6 patch-set-- UserKSM daemon from pf-- THP Shrinker - reduces memory usage for transparent hugepages-- Memory Management Tweaks (LRU, Compaction, Watermark)-### 🖧 Network-- BBRv3 tcp_congestion_control+- ZFS Filesystem support and pre-built modules for our kernels in the repository+- Support for building NVIDIA modules with some patches. Ready modules for+binary kernel builds can be found in the repository.+- Latest & improved ZSTD 1.5.6 patch-set+- KSM patch for proper working of uksmd daemon from pf+- Memory management tweaks from zen-kernel (MGLRU, Compaction, Watermark)### :arrow_heading_down: Other features-- Cherrypicked ClearLinux patches++- Cherry-picked Clear Linux patches- Back-ported patches from `linux-next`-- Scheduler patches from linux-next/tip-- OpenRGB and ACS Override support-- AMD: Allow override of min_powercap with `amdgpu_ignore_min_pcap`+- ACS Override support+- AMDGPU: Allow override of min_powercap with `amdgpu_ignore_min_pcap`- Steam Deck Patches included - Audio, HW Quirks, HID- Rog Ally patches included- v4l2loopback modules as default included- HDR support enabled- Various GCC Optimization flags applied (`-fivopts -fmodulo-sched`)-- NTSync patched and integrated into the kernel (`NTSYNC=y`)+- NTSync module support (`NTSYNC=m`)- T2 Macbook support as default included### [Explaination of the kernel variants](https://wiki.cachyos.org/features/kernel)# [CachyOS repositories](https://mirror.cachyos.org/)-The repositories contain both Arch Linux and CachyOS packages, which have been re-built with flags optimized for performance, stability, and security.++The repositories contain both Arch Linux and CachyOS packages, which have been+re-built with flags optimized for performance, stability, and security.+- `znver4` - Dedicated Zen4 optimized repository used for Zen 4 and Zen 5 CPUs- `x86-64-v4` - all Arch Linux packages with enhanced compilation flags- `x86-64-v3` - all Arch Linux packages with enhanced compilation flags@@ -89,17 +101,18 @@ The repositories contain both Arch Linux and CachyOS packages, which have been r## How to add CachyOS repositories-### Option 1: Automated Installation of cachyos repositories+### Option 1: Automated Installation of CachyOS repositories-We've made it easy for you! Simply run the following commands to use our helper script that does all the work for you. π+We've made it easy for you! Simply run the following commands to use our helper+script that does all the work for you. πRun the following commands:+1. Get archive with script```-wget https://mirror.cachyos.org/cachyos-repo.tar.xz+curl -O https://mirror.cachyos.org/cachyos-repo.tar.xz```-> If you don't have `wget`, install it with `sudo pacman -S wget`2. Extract and enter into the archive```@@ -112,14 +125,20 @@ sudo ./cachyos-repo.sh```#### Behaviour of script-1. Script will auto-detect CPU architecture, if CPU has `x86-64-v4` or `x86-64-v3` support, script will automatically use the repositories which are optimized with this flag > and some other flags.++1. Script will auto-detect CPU architecture, if CPU has `x86-64-v4` or `x86-64-v3`+support, script will automatically use the repositories, which are optimized+with this flag and some other flags.+2. Script will backup your old `pacman.conf`.-For more information, check out our [GitHub](https://github.com/cachyos) or join our [Discord](https://discord.gg/cachyos-862292009423470592) community.+For more information, check out our [GitHub](https://github.com/cachyos) or+join our [Discord](https://discord.gg/cachyos-862292009423470592) community.### Option 2: Manual Installation-1. Install the cachyos keyring+1. Add CachyOS signing keys+```sudo pacman-key --recv-keys F3B607488DB35A47 --keyserver keyserver.ubuntu.comsudo pacman-key --lsign-key F3B607488DB35A47@@ -127,9 +146,18 @@ sudo pacman-key --lsign-key F3B607488DB35A472. Install required packages-ATTENTION: Installing the CachyOS Pacman, will install a forked pacman with features added from CachyOS, like "INSTALLED_FROM" and an automatic architecture check.-Pacman 6.1 added a feature validation feature, which could lead when using the Arch Linux pacman into warnings. We are working with Arch Linux to provide a proper compatibility again.-If you want to avoid this, don't add the "cachyos" repository, which contains the customized pacman. All other repositories like cachyos-v3, cachyos-v4, cachyos-extra/core-v3/4 are fine to add.+> [!CAUTION]+> Installing the CachyOS Pacman, will install a forked pacman with+> features added from CachyOS, like "INSTALLED_FROM" and an automatic+> architecture check.+>+> Pacman 6.1 added a feature validation feature, which could lead when using the+> Arch Linux pacman into warnings. We are working with Arch Linux to provide a+> proper compatibility again.+>+> If you want to avoid this, don't add the "cachyos" repository, which contains+> the customized pacman. All other repositories like cachyos-v3, cachyos-v4,+> cachyos-extra/core-v3/4 are fine to add.```sudo pacman -U 'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-keyring-20240331-1-any.pkg.tar.zst' \@@ -148,18 +176,29 @@ sudo find /var/lib/pacman/local/ -type f -name "desc" -exec sed -i '/^%INSTALLED```## Check CPU compatibility-If you want to add our repositories manually, you must check the compatibility of the CPU with cachyos repositories.-> If you are using the script above to add cachyos repositories, you can skip the check.++If you want to add our repositories manually, you must check the compatibility+of the CPU with cachyos repositories.++> [!NOTE]+> If you are using the script above to add CachyOS repositories, you can skip+> the check.#### 1. Check support by running the following the command+```/lib/ld-linux-x86-64.so.2 --help | grep supported```#### 2. Understanding of command output+Pay attention to the following text with brackets. **(supported, searched)**-- If you see `x86-64-v4 (supported, searched)`, that means the **CPU is compatible** and can use **x86-64-v4** instruction set.-- If you see `x86-64-v4`, that means the **CPU is incompatible** and can't use **x86-64-v4** instruction set.++- If you see `x86-64-v4 (supported, searched)`, that means the **CPU is+compatible** and can use **x86-64-v4** instruction set.++- If you see `x86-64-v4`, that means the **CPU is incompatible** and can't use+**x86-64-v4** instruction set.#### Example of CPU compatible with x86-64-v4 instruction set```@@ -219,7 +258,9 @@ Enjoy improved system speed with CachyOS packages!## Debug packages-This is handled via debuginfod. Just add following file to `/etc/debuginfod/cachyos.urls`+This is handled via debuginfod. Just add following file to+`/etc/debuginfod/cachyos.urls`+```https://debuginfod.cachyos.org```@@ -232,12 +273,21 @@ See [Uninstalling Cachyos Repositories](https://wiki.cachyos.org/features/optimiSee [sched-ext Tutorial](https://wiki.cachyos.org/configuration/sched-ext/)+> [!WARNING]+> Using sched-ext schedulers is not available when using the+> ``linux-cachyos-bmq`` kernel.+## Other GNU/Linux distributions+- Complete patch for simple patching on the kernel-- It is planned to implement into our kernel builder from cachyos buildsystem, which works also on other distributions.++- It is planned to implement into our kernel builder from cachyos buildsystem,+which works also on other distributions.### Gentoo-Its a community maintained ebuild from a user, which can be used for a dynamic building right [here](https://github.com/Szowisz/CachyOS-kernels)++Its a community maintained ebuild from a user, which can be used for a dynamic+building right [here](https://github.com/Szowisz/CachyOS-kernels)Or simply run:```