On Wed, Nov 26, 2025 at 6:51 AM Leon Hwang <[email protected]> wrote:
>
> This patch set introduces the BPF_F_CPU and BPF_F_ALL_CPUS flags for
> percpu maps, as the requirement of BPF_F_ALL_CPUS flag for percpu_array
> maps was discussed in the thread of
> "[PATCH bpf-next v3 0/4] bpf: Introduce global percpu data"[1].
>
> The goal of BPF_F_ALL_CPUS flag is to reduce data caching overhead in light
> skeletons by allowing a single value to be reused to update values across all
> CPUs. This avoids the M:N problem where M cached values are used to update a
> map on N CPUs kernel.
>
> The BPF_F_CPU flag is accompanied by *flags*-embedded cpu info, which
> specifies the target CPU for the operation:
>
> * For lookup operations: the flag field alongside cpu info enable querying
>   a value on the specified CPU.
> * For update operations: the flag field alongside cpu info enable
>   updating value for specified CPU.
>
> Links:
> [1] https://lore.kernel.org/bpf/[email protected]/
>
> Changes:
> v11 -> v12:
> * Dropped the v11 changes.
> * Stabilized the lru_percpu_hash map test by keeping an extra spare entry,
>   which can be used temporarily during updates to avoid unintended LRU
>   evictions.

Please rebase and resend.
This set got lost during holidays.

Reply via email to