Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linuxKernel.kernels.linux_zen: sync config with upstream #326216

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions pkgs/os-specific/linux/kernel/zen-kernels.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let

# This is based on the following sources:
# - zen: https://gitlab.archlinux.org/archlinux/packaging/packages/linux-zen/-/blob/main/config
# - lqx: https://github.com/damentz/liquorix-package/blob/6.4/master/linux-liquorix/debian/config/kernelarch-x86/config-arch-64
# - lqx: https://github.com/damentz/liquorix-package/blob/6.8/master/linux-liquorix/debian/config/kernelarch-x86/config-arch-64
# - Liquorix features: https://liquorix.net/
# The list below is not exhaustive, so the kernels probably doesn't match
# the upstream, but should bring most of the improvements that will be
Expand All @@ -43,7 +43,6 @@ let
# FQ-Codel Packet Scheduling
NET_SCH_DEFAULT = yes;
DEFAULT_FQ_CODEL = yes;
DEFAULT_NET_SCH = freeform "fq_codel";

# Preempt (low-latency)
PREEMPT = lib.mkOverride 60 yes;
Expand All @@ -66,27 +65,41 @@ let
RCU_BOOST_DELAY = freeform "500";
RCU_NOCB_CPU = yes;
RCU_LAZY = yes;
RCU_DOUBLE_CHECK_CB_TIME = yes;

# BFQ I/O scheduler
IOSCHED_BFQ = lib.mkOverride 60 yes;

# Futex WAIT_MULTIPLE implementation for Wine / Proton Fsync.
FUTEX = yes;
FUTEX_PI = yes;

# NT synchronization primitive emulation
NTSYNC = yes;

# Preemptive Full Tickless Kernel at 1000Hz
HZ = freeform "1000";
HZ_1000 = yes;

# Alternative zpool for zswap
Z3FOLD = yes;
} // lib.optionalAttrs (isLqx) {
# Google's BBRv3 TCP congestion Control
TCP_CONG_BBR = yes;
DEFAULT_BBR = yes;
DEFAULT_TCP_CONG = freeform "bbr";

# PDS Process Scheduler
SCHED_ALT = yes;
SCHED_PDS = yes;

# https://github.com/damentz/liquorix-package/commit/a7055b936c0f4edb8f6afd5263fe1d2f8a5cd877
RCU_BOOST = no;
RCU_LAZY = no;

# Swap storage is compressed with LZ4 using zswap
ZSWAP_COMPRESSOR_DEFAULT_LZ4 = lib.mkOptionDefault yes;
ZSWAP_COMPRESSOR_DEFAULT_ZSTD = lib.mkDefault no;
ZSWAP_ZPOOL_DEFAULT_Z3FOLD = yes;

# Fix error: unused option: XXX.
CFS_BANDWIDTH = lib.mkForce (option no);
Expand All @@ -96,9 +109,6 @@ let
SCHED_CORE = lib.mkForce (option no);
UCLAMP_TASK = lib.mkForce (option no);
UCLAMP_TASK_GROUP = lib.mkForce (option no);

# ERROR: modpost: "sched_numa_hop_mask" [drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] undefined!
MLX5_CORE = no;
};

passthru.updateScript = [ ./update-zen.py (if isLqx then "lqx" else "zen") ];
Expand Down