boot markers ideas (was RE: [boot-time] jent_mod_init on beagleplay)

"Bird, Tim" <[email protected]> Tue, 7 Jan 2025 21:42:21 +0000
Newsgroups org.kernel.vger.linux-embedded
Message-ID <MW5PR13MB5632780514DC36D18EE9AC33FD112@MW5PR13MB5632.namprd13.prod.outlook.com>

> -----Original Message-----
> From: Francesco Valla <[email protected]>
...
> > I wanted to provide an update on my recent contributions to the BeaglePlay
> > project. I have recently started contributing and have been analyzing the
> > boot time of the init process. Below is the output from the system log:
> >
> > debian@BeaglePlay:~$ dmesg | grep "init process"
> > [    1.480490] Run /init as init process
> >
...

> 
> I started the same journey around a week ago, and it's proving a valuable
> experience.
> 
> After some trimming, I reached a (reported) init startup time of around 0.6s:
> 
> root@beagleplay-ti:~# dmesg|grep /sbin
> [    0.630046] Run /sbin/init as init process


I'm starting to think that we should be using this particular kernel message
as a consistent "boot marker" for kernel startup time.  It's certainly not the
end of when the kernel is doing stuff on startup, but I do believe it marks
one of the important transition points (start of user space activity), and
it seems to be ubiquitously reported.

At Plumbers, I had proposed to introduce a set of specific instrumentation
points in the kernel and use those as key checkpoints.  But IMHO it's good
to use existing printk messages where possible, since they're already present - no
additional instrumentation needed.

I'm going to do some additional research on how consistently other printk strings
show up in dmesg boot reports, to see if there are some other strings
that can be used a boot markers, or if it would still make sense to introduce some.
I think a boot marker for the start of each initcall phase is probably useful.

Thanks for these reports of the timestamps for the "init process" strings.
 -- Tim