mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bastian Germann <bage@linutronix.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] kbuild: deb-pkg: Allow parallel build
Date: Wed, 15 Mar 2023 16:51:16 +0100	[thread overview]
Message-ID: <31f4e939-39b2-7177-39e5-718518f349f7@linutronix.de> (raw)
In-Reply-To: <CAK7LNAQ_EhN+6PhcStp8xEOuyLT77t4OJ=E33xTvqVZM-7+Z7A@mail.gmail.com>

Am 15.03.23 um 15:18 schrieb Masahiro Yamada:
> "dpkb-buildpackage -j<N>" sets not only DEB_BUILD_OPTIONS
> but also MAKEFLAGS.
> 
> 
> This is clearly explained in "man dpkb-buildpackage".
> 
> 
>   -j, --jobs[=jobs|auto]
>     ...
>    Will add itself to the MAKEFLAGS environment variable, which should
>    cause all subsequent make invocations to inherit the option, thus
>    forcing the parallel setting on the packaging ...

I see. The testing/unstable dpkg-buildpackage version changed the -j behaviour.
-j only sets DEB_BUILD_OPTIONS=parallel= now.

The man page now says:

        --jobs-force[=jobs|auto]
        This option (since dpkg 1.21.10) is equivalent to the --jobs option except that
        it will enable forced parallel mode, by adding the make -j option with the computed
        number of parallel jobs to the MAKEFLAGS environment variable.

> Your statement sounds like
> 
>   'MAKEFLAGS=-j<N> dpkg-buildpackage'
> 
> is the only way to build packages in parallel.

It is in v1.21.10 or later (or using --jobs-force which does the same thing).

> Apparently, dpkg-buildpackage provides a much shorter way
> and invokes internal Make in parallel.
> 
> 
> 
> 
>>
>> So it is not used to run the actual build, just the top level `make -f debian/rules` invocation.
>> You can set --jobs-force=16, which ends up in MAKEFLAGS but the point of the patch is that one can use
>> the usual way of parallelizing.
> 
> 
> What is the "usual" way in this context?

The usual way is dpkg-buildpackage -jN but that does not work with later versions.

> Do you mean
> 'DEB_BUILD_OPTIONS=parallel=16 dpkg-buildpackage -b'
> is the usual way for parallel building?
> 
> If so, I agree. This patch caters to this case.
> 
> 
> But, I think your code should go to debian/rules
> instead of scripts/package/deb-build-option.
> Kbuild's "make clean" works much faster with the parallel option.
> 
> 
> Also, the commit description should explain the
> benefit of this patch.

I will clarify the dpkg-buildpackage behaviour change and will move the stuff to debian/rules
in v2.

  reply	other threads:[~2023-03-15 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 17:10 [PATCH 0/1] " Bastian Germann
2023-03-13 17:10 ` [PATCH 1/1] " Bastian Germann
2023-03-13 17:59   ` Masahiro Yamada
2023-03-13 18:56     ` Bastian Germann
2023-03-15 14:18       ` Masahiro Yamada
2023-03-15 15:51         ` Bastian Germann [this message]
2023-03-15 16:36           ` Masahiro Yamada
2023-03-15 15:56         ` Sedat Dilek
2023-03-15 16:39           ` Masahiro Yamada

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=31f4e939-39b2-7177-39e5-718518f349f7@linutronix.de \
    --to=bage@linutronix.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®