All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>, Viktor Malik <vmalik@redhat.com>,
	bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v4] selftests/bpf: Consolidate kernel modules into common directory
Date: Mon, 18 Nov 2024 13:28:15 +0100	[thread overview]
Message-ID: <87h684rajk.fsf@toke.dk> (raw)
In-Reply-To: <CAEf4Bzb7KXhZW06vB=01O3SstQo8zNYfooyMNSx=6O0VXH__Bw@mail.gmail.com>

Andrii Nakryiko <andrii.nakryiko@gmail.com> writes:

> On Wed, Nov 13, 2024 at 3:25 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>>
>> The selftests build four kernel modules which use copy-pasted Makefile
>> targets. This is a bit messy, and doesn't scale so well when we add more
>> modules, so let's consolidate these rules into a single rule generated
>> for each module name, and move the module sources into a single
>> directory.
>>
>> To avoid parallel builds of the different modules stepping on each
>> other's toes during the 'modpost' phase of the Kbuild 'make modules', we
>> annotate the module copy target as .NOTPARALLEL, which makes all
>> its *dependencies* execute sequentially regardless of whether make is
>> doing parallel builds or not. This means the recursive make calls into
>> the test_kmods directory will be serialised, and when the first one
>> actually builds all four modules in the subdirectory, make will
>> correctly skip the three other calls, so we end up with just one build
>> of the subdir modules.
>>
>> Acked-by: Viktor Malik <vmalik@redhat.com>
>> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
>> ---
>> Changes in v4:
>> - Rebase on bpf-next
>> - Link to v3: https://lore.kernel.org/r/20241111-bpf-selftests-mod-compile-v3-1-e2e6369ed670@redhat.com
>>
>> Changes in v3:
>> - Use .NOTPARALLEL annotation instead of creating a modules.built file
>
> Is it just me, or did this make everything non-parallel? When I
> applied this locally, even .bpf.c compilation and skeleton generation
> was sequential despite `make -j$(nproc)`.
>
> We can't do that, it's too much of a regression.

Huh, no, that was certainly not the intention! Will take another look...

-Toke


      reply	other threads:[~2024-11-18 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 11:24 [PATCH bpf-next v4] selftests/bpf: Consolidate kernel modules into common directory Toke Høiland-Jørgensen
2024-11-15 21:02 ` Andrii Nakryiko
2024-11-18 12:28   ` Toke Høiland-Jørgensen [this message]

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=87h684rajk.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=vmalik@redhat.com \
    --cc=yonghong.song@linux.dev \
    /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.