Skip to content

Replace CONFIG_DMABUF_SYSFS_STATS with BPF #5333

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

Closed

Conversation

kernel-patches-daemon-bpf-rc[bot]
Copy link

Pull request for series with
subject: Replace CONFIG_DMABUF_SYSFS_STATS with BPF
version: 5
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=962140

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

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=962140
version: 5

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

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=962498
version: 6

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

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=962498
version: 6

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

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=962498
version: 6

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

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=962498
version: 6

T.J. Mercier added 5 commits May 20, 2025 14:59
Rename the debugfs list and mutex so it's clear they are now usable
without the need for CONFIG_DEBUG_FS. The list will always be populated
to support the creation of a BPF iterator for dmabufs.

Signed-off-by: T.J. Mercier <[email protected]>
Reviewed-by: Christian König <[email protected]>
Acked-by: Song Liu <[email protected]>
The dmabuf iterator traverses the list of all DMA buffers.

DMA buffers are refcounted through their associated struct file. A
reference is taken on each buffer as the list is iterated to ensure each
buffer persists for the duration of the bpf program execution without
holding the list mutex.

Signed-off-by: T.J. Mercier <[email protected]>
Reviewed-by: Christian König <[email protected]>
Acked-by: Song Liu <[email protected]>
This open coded iterator allows for more flexibility when creating BPF
programs. It can support output in formats other than text. With an open
coded iterator, a single BPF program can traverse multiple kernel data
structures (now including dmabufs), allowing for more efficient analysis
of kernel data compared to multiple reads from procfs, sysfs, or
multiple traditional BPF iterator invocations.

Signed-off-by: T.J. Mercier <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Song Liu <[email protected]>
This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
and uses a BPF program that prints dmabuf metadata with the new
dmabuf_iter to verify they can be found.

Signed-off-by: T.J. Mercier <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Song Liu <[email protected]>
Use the same test buffers as the traditional iterator and a new BPF map
to verify the test buffers can be found with the open coded dmabuf
iterator.

Signed-off-by: T.J. Mercier <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Song Liu <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 075001c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=962498
version: 6

@kernel-patches-daemon-bpf-rc kernel-patches-daemon-bpf-rc bot deleted the series/953289=>bpf-net branch May 25, 2025 06:14
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.

0 participants