From dd5e2a08fbb0ea321885c7e36b3c072bf3d2aef7 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Thu, 19 Apr 2018 16:44:08 +0200 Subject: [PATCH 1/2] zramSwap: default to 1 device One device per cpu is only needed for kernel 3.14 --- nixos/modules/config/zram.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix index ae1b0a6c8e11..b8adb51765f6 100644 --- a/nixos/modules/config/zram.nix +++ b/nixos/modules/config/zram.nix @@ -26,15 +26,16 @@ in description = '' Enable in-memory compressed swap space provided by the zram kernel module. It is recommended to enable only for kernel 3.14 or higher. + See https://www.kernel.org/doc/Documentation/blockdev/zram.txt ''; }; numDevices = mkOption { - default = 4; + default = 1; type = types.int; description = '' Number of zram swap devices to create. It should be equal to the - number of CPU cores your system has. + number of CPU cores your system has for kernel < v3.15. ''; }; From 8e3a14549ffde6b721d77185ae64ddcc4831e490 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Thu, 19 Apr 2018 16:53:40 +0200 Subject: [PATCH 2/2] zramSwap: remove mentions of old kernels --- nixos/modules/config/zram.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix index b8adb51765f6..c1748812821e 100644 --- a/nixos/modules/config/zram.nix +++ b/nixos/modules/config/zram.nix @@ -25,7 +25,7 @@ in type = types.bool; description = '' Enable in-memory compressed swap space provided by the zram kernel - module. It is recommended to enable only for kernel 3.14 or higher. + module. See https://www.kernel.org/doc/Documentation/blockdev/zram.txt ''; }; @@ -34,8 +34,7 @@ in default = 1; type = types.int; description = '' - Number of zram swap devices to create. It should be equal to the - number of CPU cores your system has for kernel < v3.15. + Number of zram swap devices to create. ''; };