Re: [PATCH bpf-next v4] selftests/bpf: Consolidate kernel modules into common directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> writes:

> On Wed, Nov 13, 2024 at 3:25 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> 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@xxxxxxxxxx>
>> Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
>> ---
>> Changes in v4:
>> - Rebase on bpf-next
>> - Link to v3: https://lore.kernel.org/r/20241111-bpf-selftests-mod-compile-v3-1-e2e6369ed670@xxxxxxxxxx
>>
>> 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






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux