On 25/8/26 04:04, Andrii Nakryiko wrote:
> On Sun, Aug 23, 2026 at 10:02 PM Leon Hwang <[email protected]> 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 via email to