initoverlayfs
initoverlayfs copied to clipboard
Switch to pivot_root
@eric-ch created an even smaller init system that is available here:
https://gitlab.com/echanude/bareinit
like bareinit, the mini-init system here uses switch root. But most modern switch roots actually use the pivot_root syscall, systemd is an example:
https://github.com/systemd/systemd/blob/db319cb4606ca0abb9176c9208e8093ab88c15af/src/shared/switch-root.c#L29
systemd tries to pivot_root and if it fails fallsback to switchroot.
We are noticing switchroot taking around 100ms
We suspect pivot root is faster as it's what most modern implementations use. bareinit has been used to measure such things in CentOS Automotive SIG.