All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/3] support/tests: allow top-level parallel builds
Date: Tue, 27 Dec 2022 21:55:26 +0100	[thread overview]
Message-ID: <20221227205526.GB2498764@scaer> (raw)
In-Reply-To: <20221227205330.GA2498764@scaer>

Thomas, All,

On 2022-12-27 21:53 +0100, Yann E. MORIN spake thusly:
> On 2022-12-27 21:45 +0100, Thomas Petazzoni via buildroot spake thusly:
> > On Sat, 24 Dec 2022 10:18:12 +0100
> > "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > > Running tests with top-level parallel builds can speed up running some
> > > tests, expecially those that have a lot of packages like the systemd
> > > init tests.
> > > 
> > > Trigger TLPB when the configuration enables per-package directories.
> > > 
> > > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > 
> > I certainly support the idea of running some tests with TLPB. However,
> > this implementation makes a confusion between two different settings:
> > 
> > - The existing BRConfigTest.jlevel, which is set by run-tests -j, and
> >   used to define BR2_JLEVEL in the Buildroot configuration of each test
> >   case. This determines the number of parallel jobs used to build each
> >   independent package.
> > 
> > - Your new work, which uses "make -j" to do TLPB... but relies on the
> >   same above value, even though it's a completely different setting.
> > 
> > Is this expected?
> 
> Yes, this is the intended behaviour, which I was explicitly seeking.
> 
> So, if one runs with PPD and TLPB (outside the run-time infra), one
> would do something like:
> 
>     $ make -jN
> 
> This spawns a top-level make process that is parallel. In turn, in
> rules, when we call $(MAKE), this is the magic that tells make that
> it is recursive, but that it should use the jobserver from the calling
> process.
> 
> So, in this case, the BR2_JLEVEL is unused by whatever uses the make
> jobserver; only the number of jobs in the top-level jobserver is
> meaningful, i.e. whatever we pass as -jN.

Slight correction: BR2_JLEVEL does have an actual effect, but only if its
value is lower than the one we pass as -jN.

So, in practice, we want to have BR2_JLEVEL equal to the top-level -jN.

Regards,
Yann E. MORIN.

> The exception, of course, is whatever uses BR2_JLEVEL but does not talk
> to the jobserver, but this is mostly a few packages (scons, waf et al.).
> Even ninja packages do talk to the top-level jobserver, now that we use
> the ninja fork that knows to talk to it.
> 
> So, yes, using top-level -jN with the same value as BR2_JLEVEL is
> exactly what I intended to do.
> 
> Unless I totally missed something...
> 
> Regards,
> Yann E. MORIN.
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-12-27 20:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24  9:18 [Buildroot] [PATCH 0/3] support/testing: misc improvements (branch yem/runtime-test-ppd) Yann E. MORIN
2022-12-24  9:18 ` [Buildroot] [PATCH 1/3] support/tests: print failed command and output on assertRunOK error Yann E. MORIN
2022-12-27 20:42   ` Thomas Petazzoni via buildroot
2022-12-24  9:18 ` [Buildroot] [PATCH 2/3] support/tests: allow top-level parallel builds Yann E. MORIN
2022-12-27 20:45   ` Thomas Petazzoni via buildroot
2022-12-27 20:53     ` Yann E. MORIN
2022-12-27 20:55       ` Yann E. MORIN [this message]
2023-02-07  8:39   ` Thomas Petazzoni via buildroot
2022-12-24  9:18 ` [Buildroot] [PATCH 3/3] support/tests: enable PPD, and thus TLPB, for systemd tests Yann E. MORIN
2023-02-07  8:39   ` Thomas Petazzoni via buildroot

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=20221227205526.GB2498764@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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.