Skip to content

Commit

Permalink
Merge pull request #326216 from thiagokokada/linux-zen-sync-config
Browse files Browse the repository at this point in the history
linuxKernel.kernels.linux_zen: sync config with upstream
  • Loading branch information
thiagokokada authored Jul 11, 2024
2 parents 3f35c2c + 0f8c498 commit 25227b0
Showing 1 changed file with 16 additions and 6 deletions.
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

0 comments on commit 25227b0

Please sign in to comment.