From: Stephan Mueller <smueller@chronox.de>
To: Francesco Valla <francesco@valla.it>,
Linux Embedded <linux-embedded@vger.kernel.org>,
"Bird, Tim" <Tim.Bird@sony.com>
Subject: Re: [boot-time] jent_mod_init on beagleplay (was RE: [boot-time] [RFC] analyze-initcall-debug.py - a tool to analyze the initcall debug output
Date: Thu, 05 Dec 2024 08:02:23 +0100 [thread overview]
Message-ID: <4095066.UUX0tPYDPe@tauon.atsec.com> (raw)
In-Reply-To: <MW5PR13MB5632D5A1AE2D16F53FA2391FFD362@MW5PR13MB5632.namprd13.prod.outlook.com>
Am Dienstag, 3. Dezember 2024, 22:24:28 Mitteleuropäische Normalzeit schrieb
Bird, Tim:
Hi Tim,
> > -----Original Message-----
> > From: Francesco Valla <francesco@valla.it>
> > Dear fellow boot time optimizers,
> >
> > following the first boot time SIG meeting, which I lurked with much
> > pleasure
(but didn't participate to, as I was a bit in awe among such
> > authorities), I'd like to introduce myself with code rather than a
> > presentation or resume.
> > Here is a python script which can analyze a dmesg output with
> > initcall_debug
option enabled and extract some useful information. It
> > can for example be used to analyze the output of the grab-boot-data.sh
> > tool that Tim presented on this list [1] just a few days ago.
> >
> > Usage is very simple, as the output of dmesg can be piped directly to it:
> >
> >
> > dmesg | analyze-initcall-debug.py
> >
> >
> > If no option is specified, it outputs a brief summary, like the following
> > one
(obtained on my Beagleplay):
> >
> > 1758 drivers has been initialized, of which 1758 before userspace
> > 119 probes happened outside of the init of their driver
> > 0 deferred probes pending
> > ---
> > Top 10 init/probes durations:
> >
> > * 30200000.dss -> 523002us
> > * deferred_probe_initcall -> 487483us
> > * fd00000.gpu -> 162859us
> > * 8000f00.mdio -> 142521us
> > * 44043000.system-controller -> 71390us
> > * 2-004c -> 71178us
> > * 40900000.crypto -> 59350us
> > * 8000000.ethernet -> 58419us
> > * 44043000.system-controller:clock-controller -> 56599us
> > * jent_mod_init -> 52140us
>
>
> This is odd. On my beagleplay board, jent_mod_init only took 32326us.
> (see
> https://birdcloud.org/boot-time-files/boot-data-timslab-bp1-241203-134136.t
> xt)
> I'm assuming that we have similar hardware, but possibly different configs,
> kernel cmdlines or kernel versions. I'll take a look at this and see if I
> can figure out what the difference is between our systems, that causes the
> difference in the duration for this function.
>
> This initcall (jent_mod_init) is on my list of initcalls to research to see
> if they
can be improved or deferred. I haven't seen any degradation in
> system behavior by deferring this initcall on my system, but that could be
> from lack of my system doing some related operation that needs the RNG
> data, or my own ignorance of the effects of this call.
>
> Can someone comment on what items or operations might depend on
> jent_mod_init
in early boot? In particular, would we expect any
> cryptographic problems if the initcall was deferred to a few seconds after
> booting?
>
> It can be configured as a module, which makes me think that maybe loading
> it sometime in very late boot (or even later) is OK.
>
> jent_mod_init is defined in crypto/jitterentropy-kcapi.c, and controlled by
>
CONFIG_CRYPTO_JITTERENTROPY (See crypto/Kconfig)
>
> It appears to do some random number generator seeding by measuring
> the jitter of a compressiong operation in the kernel. I assume some of the
> cryptography
configs affect the duration of the operations. The initcall
> duration results on my beagleplay seem to be relatively consistent (in the
> 32ms range consistently), and from bobs_lab, on machine sam1, the duration
> range is also consistent (at between 4800 and 5200 usecs).
>
> I'd be interested to see if the range is consistent between runs on other
> machines
> Francesco - Can you submit another boot-data file (or 2 or 3) for
> francsecoslab-beagleplay, to
provide some data on this?
>
> Also, can anyone else who sees this initcall in their boot sequence run
> grab-boot-data.sh
(from https://birdcloud.org/boot-time/Boot-time_Tools)
> and submit the data for one or more of their machines?
>
> Stephan Mueller - what are you seeing for the cost of this operation on your
> machines?
I have never done the measurements on my system, but with patch
95a798d20060d2b648dd604321e347c85edfd783 the so-called oversampling rate was
changed which reduced the performance of the Jitter RNG (read: it takes a bit
more to gather all data).
> This is one of the first initcalls I'm going to dive into to see if it can
> be improved or deferred.
Maybe some of the RNG seeding can be held over
> from a previous boot, in order to eliminate the overhead on the early
> portion of a current boot. Any feedback on that idea?
>
> Thanks.
> -- Tim
>
Ciao
Stephan
next prev parent reply other threads:[~2024-12-05 7:08 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 23:35 [boot-time] [RFC] analyze-initcall-debug.py - a tool to analyze the initcall debug output Francesco Valla
2024-12-03 20:33 ` Bird, Tim
2024-12-05 12:57 ` Francesco Valla
2024-12-05 14:58 ` Geert Uytterhoeven
2024-12-05 21:36 ` Francesco Valla
2024-12-09 3:10 ` [RFC PATCH] boot-time: instrument probes more Bird, Tim
2024-12-21 14:47 ` Francesco Valla
2024-12-29 17:45 ` Francesco Valla
2024-12-03 21:24 ` [boot-time] jent_mod_init on beagleplay (was RE: [boot-time] [RFC] analyze-initcall-debug.py - a tool to analyze the initcall debug output Bird, Tim
2024-12-05 7:02 ` Stephan Mueller [this message]
[not found] ` <CAORPcfUfgNnQb6m0baW9qEGnrGYsnbpvwUUmF5Y9Byh9_iMAZw@mail.gmail.com>
2024-12-30 22:35 ` Francesco Valla
2024-12-31 9:55 ` Stephan Müller
2024-12-31 14:42 ` Francesco Valla
2025-01-02 9:06 ` Stephan Mueller
2025-01-02 10:33 ` Francesco Valla
2025-01-02 12:56 ` Stephan Mueller
2025-01-03 17:23 ` Francesco Valla
2025-01-04 15:45 ` Stephan Müller
2025-01-07 22:40 ` Bird, Tim
2025-01-07 21:42 ` boot markers ideas (was RE: [boot-time] jent_mod_init on beagleplay) Bird, Tim
2025-01-07 23:40 ` Rob Landley
2025-01-09 16:23 ` Francesco Valla
2024-12-30 22:22 ` [boot-time] jent_mod_init on beagleplay (was RE: [boot-time] [RFC] analyze-initcall-debug.py - a tool to analyze the initcall debug output Francesco Valla
2025-01-07 21:27 ` Bird, Tim
2024-12-04 0:29 ` Bird, Tim
2024-12-05 13:05 ` Francesco Valla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4095066.UUX0tPYDPe@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=Tim.Bird@sony.com \
--cc=francesco@valla.it \
--cc=linux-embedded@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.