-
Notifications
You must be signed in to change notification settings - Fork 5
Pass external callchain entry to get_perf_callchain #6515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
Pass external callchain entry to get_perf_callchain #6515
Conversation
|
Upstream branch: ec439c3 |
855781f to
2b47d31
Compare
|
Upstream branch: ec439c3 |
8c70ecc to
9fa98b5
Compare
2b47d31 to
abf45ae
Compare
|
Upstream branch: 3d60306 |
9fa98b5 to
1f21fb3
Compare
abf45ae to
74af854
Compare
|
Upstream branch: d2749ae |
1f21fb3 to
206639e
Compare
74af854 to
5cc3146
Compare
|
Upstream branch: f785a31 |
206639e to
e2ddf0b
Compare
5cc3146 to
1d08ab8
Compare
|
Upstream branch: 042d4c0 |
e2ddf0b to
983188f
Compare
1d08ab8 to
c428576
Compare
|
Upstream branch: ac1c5bc |
From BPF stack map, we want to ensure that the callchain buffer will not be overwritten by other preemptive tasks. Peter suggested provide more flexible stack-sampling APIs, which can be used in BPF, and we can still use the perf callchain entry with the help of these APIs. The next patch will modify the BPF part. In the future, these APIs will also make it convenient for us to add stack-sampling kfuncs in the eBPF subsystem, just as Andrii and Alexei discussed earlier. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Tao Chen <chen.dylane@linux.dev>
As Alexei noted, get_perf_callchain() return values may be reused if a task is preempted after the BPF program enters migrate disable mode. The perf_callchain_entres has a small stack of entries, and we can reuse it as follows: 1. get the perf callchain entry 2. BPF use... 3. put the perf callchain entry And Peter suggested that get_recursion_context used with preemption disabled, so we should disable preemption at BPF side. Acked-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Tao Chen <chen.dylane@linux.dev>
983188f to
71b789d
Compare
Pull request for series with
subject: Pass external callchain entry to get_perf_callchain
version: 7
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1034091