init: Shutdown services and umount partitions
This would gracefully terminate the services which are preventing partition unmount.
All the pending services which weren't terminated will receive SIGTERM.
With this patch:
1: Unmount partitions cleanly and not fallback to killing all processes
because of timeout.
2: During user requested device poweroff, fsck would be run as partitions are successfully unmounted.
3: The shutdown / reboot cycle cuts down to ~4 seconds compared to 6 seconds improving the end-to-end reboot.
Bug: 398083419
Test: adb reboot / power-off cycles on Pixel
Average shutdown time after 15 reboot cycles:
With this patch: 4.169 seconds
Without this patch: 6.3 seconds
Change-Id: Idf22145cbc86d090e4982f3e22ef76f92ddd92e5
Signed-off-by: Akilesh Kailash <akailash@google.com>
1 file changed