Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: Pass external callchain entry to get_perf_callchain
version: 6
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 026bcf9
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 3249e8a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: f1d8c65
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 93ce3be
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 93ce3be
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: c1da3df
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: fea3f5e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 63066b7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: c133390
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: ef2c0b2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: c427320
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: fad8040
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: acf8726
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 4617b30
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 590699d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: f2cb066
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 8c868a3
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 8f6ddc0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 5262cb2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1022592
version: 6

Tao Chen added 2 commits November 25, 2025 15:38
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 <[email protected]>
Signed-off-by: Tao Chen <[email protected]>
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.

Signed-off-by: Tao Chen <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant