All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Tim Harvey <tharvey@gateworks.com>, Stefan Roese <sr@denx.de>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
	Alper Nebi Yasak <alpernebiyasak@gmail.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Aaron Williams <awilliams@marvell.com>
Subject: Re: [PATCH 12/20] cyclic: Rise default CYCLIC_MAX_CPU_TIME_US to 5000
Date: Wed, 19 Jun 2024 09:20:42 -0600	[thread overview]
Message-ID: <20240619152042.GB68077@bill-the-cat> (raw)
In-Reply-To: <8eed077e-5855-4b32-8198-62b4f13c376a@prevas.dk>

[-- Attachment #1: Type: text/plain, Size: 3069 bytes --]

On Wed, Jun 19, 2024 at 10:21:51AM +0200, Rasmus Villemoes wrote:
> On 18/06/2024 23.03, Tim Harvey wrote:
> > On Tue, Jun 18, 2024 at 7:32 AM Tom Rini <trini@konsulko.com> wrote:
> >>
> 
> > Stefan and Tom,
> > 
> > I'm seeing CI issues here even with 5000us [1]:
> > host bind 0 /tmp/sandbox/persistent-cyclic function wdt-gpio-level
> > took too long: 5368us vs 5000us max
> 
> Yes, 5ms is way too little when you're not the only thing running on the
> cpu, which is why I went with 100ms.
> 
> Random thoughts and questions:
> 
> (1) Do we have any way to programmatically grab all the logs from azure
> CI, so we can get some kind of objective statistics on the number after
> "took too long:". Clicking through the web interface and randomly
> searching is too painful.
>
> It would also be helpful to know what percentage of CI runs have failed
> due to that, versus due to some genuine error.

I don't think we can easily grab logs via API. And at least for
https://dev.azure.com/u-boot/u-boot/_build?definitionId=2&_a=summary a
lot of the failures have rolled off already because we only get so many
logs and I try and mark full release logs as keep forever. But
anecdotally I can say 75%+ of the Azure runs fail at least once due to
this, and most fail enough to fail the pipeline (we get 2 tries per
job).

> (2) I considered a patch that just added a
> 
>   default $something big if SANDBOX
> 
> to config CYCLIC_MAX_CPU_TIME_US, but since the problem also hit qemu, I
> dropped that. But, if my patch is too ugly (and I might tend to think
> that myself...), perhaps at least this would be an added improvement
> over the generic bump to 5000us.

I was fine with your approach really, maybe a bit bigger of a comment
and note under doc/ as well why we do it?

> (3) I also thought that perhaps for sandbox, we should simply measure
> the time using clock_gettime(CLOCK_PROCESS_CPUTIME_ID), instead of
> wallclock time. But it's a little ugly to implement since the "now"
> variable is both used to decide if its time to run the callback, and as
> a starting point for measuring cpu time, and we probably still want the
> "is it time" to be measured on wallclock and not however much cpu-time
> the u-boot process has been given. Or maybe we don't, and
> CLOCK_PROCESS_CPUTIME_ID would simply be a better backend for
> os_get_nsec(). Sure, time in the sandbox would progress slower than on
> the host, but does that actually matter?
> 
> (4) Btw., what kind of clock tick do we even get when run under qemu? I
> don't have much experience with qemu, but from quick googling it seems
> that -icount would be interesting. Also see
> https://github.com/zephyrproject-rtos/zephyr/issues/14173 . From quick
> reading it seems there were some issues back in 2019, but that today it
> mostly works for them, except some SMP issues (that are certainly not
> relevant to U-Boot).

That could be interesting too, yeah. I do worry it might open its own
set of problems to figure out tho.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2024-06-19 15:20 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 21:03 [PATCH 00/20] New CI image and fixes Jiaxun Yang
2024-06-11 21:04 ` [PATCH 01/20] py: Replace deprecated unittest APIs Jiaxun Yang
2024-06-11 21:04 ` [PATCH 02/20] binman: Replace pkg_resources with importlib.resources Jiaxun Yang
2024-06-11 21:04 ` [PATCH 03/20] py: Replace distutils.core with setuptools Jiaxun Yang
2024-06-11 21:04 ` [PATCH 04/20] py: Replace usage of configparser.read_fp Jiaxun Yang
2024-06-11 21:04 ` [PATCH 05/20] doc/sphinx: Remove usage of six Jiaxun Yang
2024-06-11 21:04 ` [PATCH 06/20] py: Remove unused entries in requirements.txt Jiaxun Yang
2024-06-11 21:04 ` [PATCH 07/20] py: Bump requirements versions Jiaxun Yang
2024-06-11 21:04 ` [PATCH 08/20] py: Bump pylint version and clear warnings Jiaxun Yang
2024-06-11 21:04 ` [PATCH 09/20] binman: Workaround lz4 cli padding in test cases Jiaxun Yang
2024-06-11 21:04 ` [PATCH 10/20] tests/test_event_dump: Relax match rule for output Jiaxun Yang
2024-06-11 21:04 ` [PATCH 11/20] lib/charset & efi: Fix possible unaligned accesses Jiaxun Yang
2024-06-11 21:04 ` [PATCH 12/20] cyclic: Rise default CYCLIC_MAX_CPU_TIME_US to 5000 Jiaxun Yang
2024-06-12 16:00   ` Tom Rini
2024-06-12 16:13     ` Jiaxun Yang
2024-06-12 16:50       ` Tom Rini
2024-06-14 14:13         ` Stefan Roese
2024-06-17 23:29           ` Tom Rini
2024-06-18 14:00             ` Jiaxun Yang
2024-06-18 14:24               ` Stefan Roese
2024-06-18 14:31               ` Tom Rini
2024-06-18 21:03                 ` Tim Harvey
2024-06-19  8:21                   ` Rasmus Villemoes
2024-06-19 15:20                     ` Tom Rini [this message]
2024-06-18 14:01             ` Stefan Roese
2024-06-11 21:04 ` [PATCH 13/20] CI: Ensure pip install is always performed in venv Jiaxun Yang
2024-06-12 16:00   ` Tom Rini
2024-06-11 21:04 ` [PATCH 14/20] CI: GitLab: Split build_world tasks Jiaxun Yang
2024-06-12 16:01   ` Tom Rini
2024-06-12 16:14     ` Jiaxun Yang
2024-06-12 17:07       ` Tom Rini
2024-06-12 20:24         ` Simon Glass
2024-06-13 15:32           ` Tom Rini
2024-06-11 21:04 ` [PATCH 15/20] CI: Dockerfile: Set global git name & email config Jiaxun Yang
2024-06-11 21:04 ` [PATCH 16/20] CI: Dockerfile: Bump various software version Jiaxun Yang
2024-06-12 16:02   ` Tom Rini
2024-06-12 16:19     ` Jiaxun Yang
2024-06-11 21:04 ` [PATCH 17/20] CI: Dockerfile: Add LoongArch64 support Jiaxun Yang
2024-06-11 21:04 ` [PATCH 18/20] doc: ci: Document how to run pipeline on gitlab.com Jiaxun Yang
2024-06-11 21:04 ` [PATCH NFC 19/20] Use Jiaxun's CI Image Jiaxun Yang
2024-06-11 21:04 ` [PATCH NFC 20/20] CI: Dockerfile: Replace some URL with mirror sites Jiaxun Yang
2024-06-12 16:00 ` [PATCH 00/20] New CI image and fixes Tom Rini

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=20240619152042.GB68077@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=alpernebiyasak@gmail.com \
    --cc=awilliams@marvell.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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.