-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/ksm: rewrite using systemd-tmpfiles #114464
Conversation
How would moving this to Nothing guarantees systemd-tmpfiles runs "late enough" for this to has happened. Can this be some udev rule instead? |
RedHat seems to have some daemon here, provided by qemu: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_tuning_and_optimization_guide/chap-ksm |
It changes nothing in this regard, but I don't think there is a problem to begin with, at least not anymore. I don't see why Try building a system with:
this runs in stage 1, before udev is even started and succeeds. Btw, I stole the tmpfiles rule from https://wiki.archlinux.org/index.php/QEMU#Enabling_KSM. |
In that case, I'd prefer if this could stay a shell script, and we just drop the dependency. If we do that, worst case the script will fail (and people will realize). If this is switched to a tmpfiles rule, it might do the right thing every second time, and every other time it'll try to create the underlying file structure by itself ;-) |
According to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't usepkgs.lib
, but lib
directly
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.
Motivation for this change
This is to get rid of the ugly systemd-udev-settle dependency.
See #73095 for more information.
Things done