diff options
| author | Hou Tao <[email protected]> | 2025-03-15 15:09:30 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2025-03-15 19:06:50 +0000 |
| commit | bb2243f4328bc2e4aa4d8566a5a0a7f9ce947570 (patch) | |
| tree | 1a136a59609641be3b4cecd2946543532669b13a /tools/lib/bpf/bpf.c | |
| parent | selftests/bpf: Fix sockopt selftest failure on powerpc (diff) | |
| download | kernel-bb2243f4328bc2e4aa4d8566a5a0a7f9ce947570.tar.gz kernel-bb2243f4328bc2e4aa4d8566a5a0a7f9ce947570.zip | |
bpf: Check map->record at the beginning of check_and_free_fields()
When there are no special fields in the map value, there is no need to
invoke bpf_obj_free_fields(). Therefore, checking the validity of
map->record in advance.
After the change, the benchmark result of the per-cpu update case in
map_perf_test increased by 40% under a 16-CPU VM.
Signed-off-by: Hou Tao <[email protected]>
Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/lib/bpf/bpf.c')
0 files changed, 0 insertions, 0 deletions
