From: Harald Hoyer <har...@redhat.com> The time for systemd initialization and selinux policy loading is accounted to the initrd or the kernel, which is wrong.
Instead of: Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) + 975ms (initrd) + 1.410s (userspace) = 8.647s the more correct output is: Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) + 475ms (initrd) + 1.910s (userspace) = 8.647s --- src/core/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index ab2ac00..0b65841 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1236,6 +1236,7 @@ int main(int argc, char *argv[]) { bool reexecute = false; const char *shutdown_verb = NULL; dual_timestamp initrd_timestamp = { 0ULL, 0ULL }; + dual_timestamp userspace_timestamp = { 0ULL, 0ULL }; static char systemd[] = "systemd"; bool skip_setup = false; int j; @@ -1281,6 +1282,7 @@ int main(int argc, char *argv[]) { log_show_color(isatty(STDERR_FILENO) > 0); if (getpid() == 1 && detect_container(NULL) <= 0) { + dual_timestamp_get(&userspace_timestamp); /* Running outside of a container as PID 1 */ arg_running_as = SYSTEMD_SYSTEM; @@ -1610,6 +1612,9 @@ int main(int argc, char *argv[]) { manager_set_default_rlimits(m, arg_default_rlimit); + if (dual_timestamp_is_set(&userspace_timestamp)) + m->userspace_timestamp = userspace_timestamp; + if (dual_timestamp_is_set(&initrd_timestamp)) m->initrd_timestamp = initrd_timestamp; -- 1.8.2.1 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel