eBPF and in-kernel audio DSP?

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

User avatar
milk
Established Member
Posts: 145
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Contact:

eBPF and in-kernel audio DSP?

Postby milk » Sun Apr 21, 2019 9:14 am

https://en.wikipedia.org/wiki/Berkeley_Packet_Filter - with information on the basics of eBPF

"In his linux.conf.au 2017 talk on the eBPF in-kernel virtual machine, Brendan Gregg proclaimed that "super powers have finally come to Linux". Getting eBPF to that point has been a long road of evolution and design. While eBPF was originally used for network packet filtering, it turns out that running user-space code inside a sanity-checking virtual machine is a powerful tool for kernel developers and production engineers.
-- LWN.net: A thorough introduction to eBPF

The big performance advantage is that context switches are reduced.

More recently, the use of eBPF has been expanded. A couple of insightful videos;

How to Make Linux Microservice-Aware with Cilium and eBPF - first half is a good eBPF overview, the second half relates to security, specifically in-kernel application level firewall rules.

LPC2018 - When eBPF meets FUSE: Improving Performance of User File Systems - user space filesystems in the kernel

So my wonder is this; could eBPF be used for in-kernel audio DSP?

See also https://github.com/iovisor/bcc and https://github.com/zoidbergwill/awesome-ebpf
they/them (nb/gq/tg, ta)
wiki.thingsandstuff.org/Audio and related pages - a collection of mostly Linux and free links (OpenID auth for anti-spam, try DW)
Linux Digital Audio and Music Workstation Comparison Matrix - collaborative Google Sheet

Drumfix
Established Member
Posts: 231
Joined: Mon Jan 26, 2009 5:15 pm

Re: eBPF and in-kernel audio DSP?

Postby Drumfix » Sun Apr 21, 2019 4:57 pm

I think you can use kernel_fpu_begin/kernel_fpu_end around dsp code in a kernel thread since at least kernel 2.6, even directly in the interrupt thread of your sound device.


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 2 guests