diff options
| author | Leon Hwang <leon.hwang@linux.dev> | 2026-08-13 23:23:18 +0800 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2026-08-13 10:27:40 -0700 |
| commit | f4e64cb65f5adfc88f2155bfb3cc82b7d20a1d8f (patch) | |
| tree | 791eeb1d53e20ab36c60f16084249f84cf4ba416 /tools/perf/scripts | |
| parent | 3634e4f2dc59559c4225ffdf2b2348a7d21f19a1 (diff) | |
libbpf: Add support for global percpu data
Add support for global percpu data in libbpf by adding a new ".percpu"
section, similar to ".data". It enables efficient handling of percpu
global variables in bpf programs.
When generating loader for lightweight skeleton, update the percpu_array
map used for global percpu data using BPF_F_ALL_CPUS, in order to update
values across all CPUs using one value slot.
Unlike global data, the mmaped data for global percpu data will be marked
as read-only after populating the percpu_array map. Thereafter, users can
read those initialized percpu data after loading prog. If they want to
update the percpu data after loading prog, they have to update the
percpu_array map using key=0 instead.
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260813152324.97937-6-leon.hwang@linux.dev
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions
