mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/ksm: remove udev-settle dependency
The sysfs file /sys/kernel/mm/ksm/run seems to be available as soon as the kernel has started, so no point in waiting for udev to "settle". If for some reason it doesn't, we let the unit fail explicitly.
This commit is contained in:
parent
ed0a29c88d
commit
48052ca0dd
@ -26,13 +26,13 @@ in {
|
||||
systemd.services.enable-ksm = {
|
||||
description = "Enable Kernel Same-Page Merging";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "systemd-udev-settle.service" ];
|
||||
script = ''
|
||||
if [ -e /sys/kernel/mm/ksm ]; then
|
||||
script =
|
||||
''
|
||||
echo 1 > /sys/kernel/mm/ksm/run
|
||||
${optionalString (cfg.sleep != null) ''echo ${toString cfg.sleep} > /sys/kernel/mm/ksm/sleep_millisecs''}
|
||||
fi
|
||||
'';
|
||||
'' + optionalString (cfg.sleep != null)
|
||||
''
|
||||
echo ${toString cfg.sleep} > /sys/kernel/mm/ksm/sleep_millisecs
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import ./make-test-python.nix ({ pkgs, ...} :
|
||||
import ./make-test-python.nix ({ lib, ...} :
|
||||
|
||||
{
|
||||
name = "ksm";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ rnhmjoj ];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user