-
Notifications
You must be signed in to change notification settings - Fork 152
Pass external callchain entry to get_perf_callchain #10493
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?
Conversation
|
Upstream branch: ec439c3 |
7f3448b to
0de3956
Compare
|
Upstream branch: ec439c3 |
21a1545 to
f20836a
Compare
0de3956 to
2d78e4d
Compare
|
Upstream branch: 3d60306 |
f20836a to
9f87e04
Compare
2d78e4d to
5007636
Compare
|
Upstream branch: d2749ae |
9f87e04 to
ed2f7a9
Compare
5007636 to
0ac68c9
Compare
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>
|
Upstream branch: f785a31 |
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>
ed2f7a9 to
5dcba88
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