Bringing D-Bus Into The Linux Kernel

Written by Michael Larabel in Linux Kernel on 16 September 2010 at 05:46 AM EDT. 52 Comments
LINUX KERNEL
Alban Crequy, a Maemo developer, for the past several weeks have been working on bringing D-Bus directly into the Linux kernel. Why? Huge performance improvements.

Alban's kernel D-Bus work is based upon the previous work of Ian Molton did for Collabora with KDbus for prototyping a kernel implementation so that D-Bus cuts down the number of required context switches that are needed compared to running the D-Bus daemon in user-space.

Here is Alban's description on how his implementation of D-Bus for the Linux kernel works:
When an application sends a message on the bus to another application, the message is first sent to dbus-daemon through an Unix socket. The kernel copies the message to the receiving queue of dbus-daemon and dbus-daemon wakes up. Then dbus-daemon adds the sender field in the header of the message, and sends it to the recipients according to the destination field and the match rules (usually one recipient but there could be more for signals or in case of eavesdropping)...So dbus-daemon wakes up on every message, it costs a context switch and a memory copy.

Benchmarks published by Alban with his kdbus work shows this implementation running nearly twice as fast when using KVM on i386 and up to three times faster with ARM on the Nokia N900 hand-held. In other benchmarks the gains were less but still quite significant in terms of performance increases.

The blog post with benchmarks and patches to go against the Linux 2.6.35 kernel and the D-Bus library (libdbus) can be found on this page. At this point the work is still considered a proof-of-concept and not ready for merging into the mainline Linux kernel, but hopefully it's not too far out from being ready.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week