diff options
| author | Hou Tao <[email protected]> | 2023-12-14 12:30:09 +0800 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2023-12-13 20:49:11 -0800 |
| commit | 8f82583f9527b3be9d70d9a5d1f33435e29d0480 (patch) | |
| tree | f295c8b23b7beead0a0bb9a2e880b7356299769d /tools/perf/scripts/python | |
| parent | 2a0c6b41eec90c2a138ea8b574836744783c67ff (diff) | |
bpf: Reduce the scope of rcu_read_lock when updating fd map
There is no rcu-read-lock requirement for ops->map_fd_get_ptr() or
ops->map_fd_put_ptr(), so doesn't use rcu-read-lock for these two
callbacks.
For bpf_fd_array_map_update_elem(), accessing array->ptrs doesn't need
rcu-read-lock because array->ptrs must still be allocated. For
bpf_fd_htab_map_update_elem(), htab_map_update_elem() only requires
rcu-read-lock to be held to avoid the WARN_ON_ONCE(), so only use
rcu_read_lock() during the invocation of htab_map_update_elem().
Acked-by: Yonghong Song <[email protected]>
Signed-off-by: Hou Tao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions