ueventd: allow the ueventd main loop to run in parallel
The coldboot is currently running in multiple subprocesses in parallel for faster boot time, while the main loop that polls further uevents runs in a single process and is not parallelized. However, the main loop also can be the bottleneck of boot, since services such as vold waits for ueventd to set up device paths and kernel modules. In addition, initializing kernel modules that take long (e.g. order of 100ms-) in serial takes perceptible time in total. This change gives ueventd the ability to run the main loop in multiple threads as well as the cold boot. This feature is configurable by a new `parallel_ueventd_main_loop` in ueventd.rc. This is a similar syntax to `parallel_restorecon`, and disabled by default. The number of worker threads is also configurable by `parallel_ueventd_main_loop_max_workers`. Bug: 400592897 Test: DUT boots with and without `parallel_ueventd_main_loop enabled` Test: Tested `parallel_ueventd_main_loop_max_workers` works Test: DUT has same SELinux labels for sysfs Change-Id: I22edd5b84fa502c2a020e4d125af6d95312559c4
Loading
Please register or sign in to comment