kernelci / kernelci-core

Core KernelCI tools
https://kernelci.org
GNU Lesser General Public License v2.1
102 stars 97 forks source link

Implement "boot time measurement" test #2503

Open a-wai opened 4 months ago

a-wai commented 4 months ago

Boot time is an important indicator for device performance. We should implement a simple "boot time" test measuring this point.

We should also avoid anything likely to affect performance, such as long logs being printed over the serial console, DHCP negociation and so on. This implies we should likely first run a minimal boot test, then restart it by disabling DHCP and adding the quiet command-line option.

Relevant topic on the LAVA mailing list: https://lists.lavasoftware.org/archives/list/lava-users@lists.lavasoftware.org/thread/AYYRZA6XJUJC33UZKTBGKGFQ3MGGL3UB/?sort=thread

padovan commented 4 months ago

I wonder if kexec is helpful in this scenario. Booting another kernel from your kernel would skip all the LAVA/bootloader trouble. But otoh it could came with some pitfalls I don't know.

a-wai commented 4 months ago

I'm pretty sure it can be useful in some way, but will come with its own limitations (e.g. not resetting the hardware like a "real" reboot would do). Plus, from my experience it can be quite flaky on arm64.

That's still an interesting idea, definitely worth experimenting with, thanks!

a-wai commented 3 months ago

A few notes about my experiments here:

A simple (but working) LAVA template would be the following:

context:
  extra_kernel_args: ip=off loglevel=6

{% set base_template = 'base/' + runtime + '.jinja2' %}
{%- extends base_template %}

As it is extremely similar to the existing baseline template, the latter could probably be re-used. In particular, the extra_kernel_args is LAVA-specific, so we could extend the base lava template to include this when a specific job param is present, but that is left as an exercise for the reader ;)