summaryrefslogtreecommitdiff
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorPuranjay Mohan <puranjay@kernel.org>2026-09-22 13:00:52 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-09-22 23:44:24 +0000
commitdb1b20ed6b093d98bfc3fb7ced2dce971d4e81ce (patch)
tree3c201dae36876f2058b6f805363abf3286a99779 /tools/testing/selftests
parent908a60853b8dfe3bc9ad33598330bdcd03489b7c (diff)
downloadlinux-next-db1b20ed6b093d98bfc3fb7ced2dce971d4e81ce.tar.gz
linux-next-db1b20ed6b093d98bfc3fb7ced2dce971d4e81ce.zip
bpf: Add bpf_call_rcu_tasks_trace() kfunc
Sleepable BPF programs hold rcu_read_lock_trace(), not rcu_read_lock(), so a plain RCU grace period does not wait for them. A program whose readers are sleepable needs this flavour to defer reclaim safely. call_rcu_tasks_trace() is call_srcu() on rcu_tasks_trace_srcu_struct and SRCU invokes callbacks with BH disabled, so the callback is still not sleepable. It does run from a kworker rather than softirq or the rcuc/rcuo kthread, so a callback must not assume anything about current. Only the queueing call differs, so the two share struct bpf_rcu_head and all of the verifier plumbing. Signed-off-by: Puranjay Mohan <puranjay@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260922200208.3203834-4-puranjay@kernel.org
Diffstat (limited to 'tools/testing/selftests')
0 files changed, 0 insertions, 0 deletions