diff options
author | Aditi Ghag <[email protected]> | 2023-05-19 22:51:53 +0000 |
---|---|---|
committer | Martin KaFai Lau <[email protected]> | 2023-05-19 17:45:47 -0700 |
commit | c96dac8d369ffd713a45f4e5c30f23c47a1671f0 (patch) | |
tree | a99014cf54b2996a83335271d7ba4fb1190537f2 /tools/perf/scripts/python/libxed.py | |
parent | e4fe1bf13e09019578b9b93b942fff3d76ed5793 (diff) |
bpf: udp: Implement batching for sockets iterator
Batch UDP sockets from BPF iterator that allows for overlapping locking
semantics in BPF/kernel helpers executed in BPF programs. This facilitates
BPF socket destroy kfunc (introduced by follow-up patches) to execute from
BPF iterator programs.
Previously, BPF iterators acquired the sock lock and sockets hash table
bucket lock while executing BPF programs. This prevented BPF helpers that
again acquire these locks to be executed from BPF iterators. With the
batching approach, we acquire a bucket lock, batch all the bucket sockets,
and then release the bucket lock. This enables BPF or kernel helpers to
skip sock locking when invoked in the supported BPF contexts.
The batching logic is similar to the logic implemented in TCP iterator:
https://lore.kernel.org/bpf/[email protected]/.
Suggested-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Aditi Ghag <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions