From f0e3775f2e93dee4a3fa455631ea78acf6fd884f Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 24 Apr 2014 14:03:18 +0200 Subject: [PATCH] linux: Add support for zram --- pkgs/os-specific/linux/kernel/common-config.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index db654fc0505c..02e361fde129 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -317,6 +317,12 @@ with stdenv.lib; TRANSPARENT_HUGEPAGE_ALWAYS? n TRANSPARENT_HUGEPAGE_MADVISE? y + # zram support (e.g for in-memory compressed swap) + ${optionalString (versionAtLeast version "3.4") '' + ZSMALLOC y + ''} + ZRAM m + ${kernelPlatform.kernelExtraConfig or ""} ${extraConfig} ''