-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
Upstream branch: 075001c |
Upstream branch: 075001c |
c478b0a
to
001ad1c
Compare
389af80
to
a94356e
Compare
Upstream branch: 075001c |
001ad1c
to
bbd0305
Compare
Upstream branch: 075001c |
bbd0305
to
50f4377
Compare
a94356e
to
ece7f43
Compare
Upstream branch: 075001c |
50f4377
to
e9bd466
Compare
ece7f43
to
6816013
Compare
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]>
Upstream branch: 075001c |
e9bd466
to
1a3a194
Compare
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