From: "Emil Tsalapatis" <emil@etsalapatis.com>
To: "Jiayuan Chen" <jiayuan.chen@linux.dev>, <bpf@vger.kernel.org>
Cc: "Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Eduard Zingerman" <eddyz87@gmail.com>,
"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Song Liu" <song@kernel.org>,
"Yonghong Song" <yonghong.song@linux.dev>,
"Jiri Olsa" <jolsa@kernel.org>,
"Emil Tsalapatis" <emil@etsalapatis.com>,
"Shuah Khan" <shuah@kernel.org>,
"Woojin Ji" <random6.xyz@gmail.com>,
"Puranjay Mohan" <puranjay@kernel.org>,
"Saket Kumar Bhaskar" <skb99@linux.ibm.com>,
"Ihor Solodrai" <ihor.solodrai@linux.dev>,
<linux-kernel@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 3/4] selftests/bpf: Run arena tests serially
Date: Fri, 17 Jul 2026 19:34:26 -0400 [thread overview]
Message-ID: <DK18N7NTNCP8.1J65M00LCPNM9@etsalapatis.com> (raw)
In-Reply-To: <20260717114117.350851-4-jiayuan.chen@linux.dev>
On Fri Jul 17, 2026 at 7:37 AM EDT, Jiayuan Chen wrote:
> Every arena reserves a 4GB kernel vmalloc region at creation, and on a
> KASAN build that eagerly populates ~512MB of shadow memory per arena. When
> several arena tests run in parallel their shadow adds up, exhausts the
> memory of a small CI VM and trips the OOM killer during map creation.
>
> Make the dedicated arena tests (arena_* and libarena*) serial so they no
> longer pile up in the parallel phase. That alone brings the peak number of
> live arenas back within the CI memory budget.
>
> A few other tests such as verifier_arena*, stream and compute_live_registers
> create an arena too, but they run inside shared RUN_TESTS()/RUN() suites, so
> turning them serial would drag many unrelated subtests along with them.
> Leave those as-is.
>
> Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
> ---
> tools/testing/selftests/bpf/prog_tests/arena_atomics.c | 2 +-
> tools/testing/selftests/bpf/prog_tests/arena_direct_value.c | 2 +-
> tools/testing/selftests/bpf/prog_tests/arena_htab.c | 2 +-
> tools/testing/selftests/bpf/prog_tests/arena_list.c | 2 +-
> tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c | 2 +-
> tools/testing/selftests/bpf/prog_tests/arena_strsearch.c | 2 +-
> tools/testing/selftests/bpf/prog_tests/libarena.c | 2 +-
> tools/testing/selftests/bpf/prog_tests/libarena_asan.c | 2 +-
> 8 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_atomics.c b/tools/testing/selftests/bpf/prog_tests/arena_atomics.c
> index d98577a6babc..1ad5d03d07ad 100644
> --- a/tools/testing/selftests/bpf/prog_tests/arena_atomics.c
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_atomics.c
> @@ -222,7 +222,7 @@ static void test_store_release(struct arena_atomics *skel)
> "store_release64_result");
> }
>
> -void test_arena_atomics(void)
> +void serial_test_arena_atomics(void)
> {
> struct arena_atomics *skel;
> int err;
> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_direct_value.c b/tools/testing/selftests/bpf/prog_tests/arena_direct_value.c
> index 4b4adb3f4b71..01fcf4965ea4 100644
> --- a/tools/testing/selftests/bpf/prog_tests/arena_direct_value.c
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_direct_value.c
> @@ -66,7 +66,7 @@ static void test_arena_direct_value_one_past_end(void)
> close(map_fd);
> }
>
> -void test_arena_direct_value(void)
> +void serial_test_arena_direct_value(void)
> {
> if (test__start_subtest("one_past_end"))
> test_arena_direct_value_one_past_end();
> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_htab.c b/tools/testing/selftests/bpf/prog_tests/arena_htab.c
> index d69fd2465f53..91ccf0402980 100644
> --- a/tools/testing/selftests/bpf/prog_tests/arena_htab.c
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_htab.c
> @@ -81,7 +81,7 @@ static void test_arena_htab_asm(void)
> arena_htab_asm__destroy(skel);
> }
>
> -void test_arena_htab(void)
> +void serial_test_arena_htab(void)
> {
> if (test__start_subtest("arena_htab_llvm"))
> test_arena_htab_llvm();
> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_list.c b/tools/testing/selftests/bpf/prog_tests/arena_list.c
> index 4f2866a615ce..2648e06f53d0 100644
> --- a/tools/testing/selftests/bpf/prog_tests/arena_list.c
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_list.c
> @@ -68,7 +68,7 @@ static void test_arena_list_add_del(int cnt, bool nonsleepable)
> arena_list__destroy(skel);
> }
>
> -void test_arena_list(void)
> +void serial_test_arena_list(void)
> {
> if (test__start_subtest("arena_list_1"))
> test_arena_list_add_del(1, false);
> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c b/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c
> index acb9d53b5973..545b05d7a0aa 100644
> --- a/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c
> @@ -101,7 +101,7 @@ static void test_arena_spin_lock_size(int size)
> return;
> }
>
> -void test_arena_spin_lock(void)
> +void serial_test_arena_spin_lock(void)
> {
> repeat = 1000;
> if (test__start_subtest("arena_spin_lock_1"))
> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_strsearch.c b/tools/testing/selftests/bpf/prog_tests/arena_strsearch.c
> index f81a0c066505..0c1c6cbfa0f1 100644
> --- a/tools/testing/selftests/bpf/prog_tests/arena_strsearch.c
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_strsearch.c
> @@ -23,7 +23,7 @@ static void test_arena_str(void)
> arena_strsearch__destroy(skel);
> }
>
> -void test_arena_strsearch(void)
> +void serial_test_arena_strsearch(void)
> {
> if (test__start_subtest("arena_strsearch"))
> test_arena_str();
> diff --git a/tools/testing/selftests/bpf/prog_tests/libarena.c b/tools/testing/selftests/bpf/prog_tests/libarena.c
> index ba5a5a50f7c0..df7e4b8dc394 100644
> --- a/tools/testing/selftests/bpf/prog_tests/libarena.c
> +++ b/tools/testing/selftests/bpf/prog_tests/libarena.c
> @@ -202,7 +202,7 @@ static void run_libarena_parallel_test(struct libarena *skel, struct bpf_program
> run_libarena_parallel_fini(skel, name, prefixlen);
> }
>
> -void test_libarena(void)
> +void serial_test_libarena(void)
> {
> struct arena_alloc_reserve_args args;
> struct libarena *skel;
> diff --git a/tools/testing/selftests/bpf/prog_tests/libarena_asan.c b/tools/testing/selftests/bpf/prog_tests/libarena_asan.c
> index f897405f701d..9c31b17dbf39 100644
> --- a/tools/testing/selftests/bpf/prog_tests/libarena_asan.c
> +++ b/tools/testing/selftests/bpf/prog_tests/libarena_asan.c
> @@ -85,7 +85,7 @@ static void run_test(void)
> * Run the test depending on whether LLVM can compile arena ASAN
> * programs.
> */
> -void test_libarena_asan(void)
> +void serial_test_libarena_asan(void)
> {
> #ifdef HAS_BPF_ARENA_ASAN
> run_test();
next prev parent reply other threads:[~2026-07-17 23:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 11:37 [PATCH bpf-next v2 0/4] bpf: Add memory usage for arena and selftest Jiayuan Chen
2026-07-17 11:37 ` [PATCH bpf-next v2 1/4] bpf: Pass arena instead of scratch_page to the pte callbacks Jiayuan Chen
2026-07-17 23:32 ` Emil Tsalapatis
2026-07-17 11:37 ` [PATCH bpf-next v2 2/4] bpf: Add memory usage for arena Jiayuan Chen
2026-07-17 23:33 ` Emil Tsalapatis
2026-07-17 11:37 ` [PATCH bpf-next v2 3/4] selftests/bpf: Run arena tests serially Jiayuan Chen
2026-07-17 23:34 ` Emil Tsalapatis [this message]
2026-07-17 11:37 ` [PATCH bpf-next v2 4/4] selftests/bpf: Add tests for memory usage for arena Jiayuan Chen
2026-07-17 23:36 ` Emil Tsalapatis
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=DK18N7NTNCP8.1J65M00LCPNM9@etsalapatis.com \
--to=emil@etsalapatis.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=jiayuan.chen@linux.dev \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=puranjay@kernel.org \
--cc=random6.xyz@gmail.com \
--cc=shuah@kernel.org \
--cc=skb99@linux.ibm.com \
--cc=song@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox