summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2026-06-06 15:39:29 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-06-07 20:03:00 +0300
commite6abd4cd157bf63cd89c74f8f10abae76e7b0359 (patch)
tree713a31474337249d88b1cb4b86d11598ecc77613 /include/uapi
parent2cd298c106e00ba1d8799b022594f131703f32fa (diff)
downloadlinux-e6abd4cd157bf63cd89c74f8f10abae76e7b0359.tar.xz
bpf: Use mutex lock pool for bpf trampolines
Adding mutex lock pool that replaces bpf trampolines mutex. For tracing_multi link coming in following changes we need to lock all the involved trampolines during the attachment. This could mean thousands of mutex locks, which is not convenient. As suggested by Andrii we can replace bpf trampolines mutex with mutex pool, where each trampoline is hash-ed to one of the locks from the pool. It's better to lock all the pool mutexes (32 at the moment) than thousands of them. There is 48 (MAX_LOCK_DEPTH) lock limit allowed to be simultaneously held by task, so we need to keep 32 mutexes (5 bits) in the pool, so when we lock them all in following changes the lockdep won't scream. Removing the mutex_is_locked in bpf_trampoline_put, because we removed the mutex from bpf_trampoline. Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20260606123955.345967-5-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions