From d6e14f85003533e5bc7f402c14176617f7b4d4d5 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Fri, 18 Oct 2024 19:10:33 +0200 Subject: [PATCH] nixos/kernel: Enable transparent hugepages for tmpfs --- nixos/module/kernel.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/module/kernel.nix b/nixos/module/kernel.nix index 29eeaad..58cecaa 100644 --- a/nixos/module/kernel.nix +++ b/nixos/module/kernel.nix @@ -139,7 +139,8 @@ environment.etc."modprobe.d/nixos.conf".text = ""; systemd.tmpfiles.rules = [ - "w- /sys/kernel/mm/transparent_hugepage/enabled - - - - always" - "w- /sys/kernel/mm/transparent_hugepage/defrag - - - - defer" + "w- /sys/kernel/mm/transparent_hugepage/enabled - - - - always" + "w- /sys/kernel/mm/transparent_hugepage/defrag - - - - defer" + "w- /sys/kernel/mm/transparent_hugepage/shmem_enabled - - - - within_size" ]; }