All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Hwang <leon.hwang@linux.dev>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bot+bpf-ci@kernel.org, bpf@vger.kernel.org, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com,
	memxor@gmail.com, martin.lau@linux.dev, song@kernel.org,
	yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com,
	ihor.solodrai@linux.dev, shuah@kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	martin.lau@kernel.org, clm@meta.com
Subject: Re: [PATCH bpf-next v2] selftests/bpf: Avoid flaky resize value test for percpu data
Date: Tue, 25 Aug 2026 13:17:10 +0800	[thread overview]
Message-ID: <b8f1e71d-0fe6-47b5-bf59-0e077e5806ad@linux.dev> (raw)
In-Reply-To: <CAEf4BzZY-C3WtoRkdi+U7XFAMv59JeJ2R0yMi8+FGM4sLTsnQQ@mail.gmail.com>

On 25/8/26 04:04, Andrii Nakryiko wrote:
> On Sun, Aug 23, 2026 at 10:02 PM Leon Hwang <leon.hwang@linux.dev> wrote:
[...]
>>>
>> It is to verify the mmap change in libbpf's bpf_map_mmap_resize() for
>> percpu data map, like those subtests in global_map_resize.c.
>>
> 
> this didn't explain much, but I think what you are trying to say is
> that this won't work for PERCPU arrays with PAGE_SIZE=64KB, because
> PERCPU value is limited to 32KB today, is that right?
> 

Right. Limiting PAGE_SIZE=4KB is to avoid the
test_global_percpu_data__load() failure due to PERCPU value 32KB limit
when PAGE_SIZE is 64KB.

> 
> so maybe actually model that in the test itself, expect -E2BIG if
> PAGE_SIZE > 32KB or something, and otherwise check the resize?
> 
How about skipping test_percpu_data_on_cpus() when
test_global_percpu_data__load() returns -E2BIG? Because
bpf_map__set_value_size() has already been verified before calling
test_global_percpu_data__load(). Afterward, it's unnecessary to check
PAGE_SIZE value.

Thanks,
Leon


  reply	other threads:[~2026-08-25  5:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 15:32 [PATCH bpf-next v2] selftests/bpf: Avoid flaky resize value test for percpu data Leon Hwang
2026-08-18 16:15 ` bot+bpf-ci
2026-08-19  1:44   ` Leon Hwang
2026-08-21 17:58     ` Andrii Nakryiko
2026-08-24  5:02       ` Leon Hwang
2026-08-24 20:04         ` Andrii Nakryiko
2026-08-25  5:17           ` Leon Hwang [this message]
2026-08-25 18:29             ` Andrii Nakryiko

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=b8f1e71d-0fe6-47b5-bf59-0e077e5806ad@linux.dev \
    --to=leon.hwang@linux.dev \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=shuah@kernel.org \
    --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 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.