LWN.net Logo

Missing the AF_BUS

Missing the AF_BUS

Posted Jul 5, 2012 10:33 UTC (Thu) by smcv (subscriber, #53363)
In reply to: Missing the AF_BUS by hp
Parent article: Missing the AF_BUS

> poorly coded applications aren't ruled out

On the system bus, which is a trust boundary, poorly- or even maliciously-coded applications can never be ruled out, unfortunately.

> in those cases dbus was pretty clearly a poor choice of hammer for the nail at hand

People consider D-Bus to be a suitable transport for all sorts of things, desktop or not. The first sentence of the specification describes it as "a system for low-latency, low-overhead, easy to use interprocess communication", which probably contributes to the view that it's the right hammer for every nail - in practice, its current design tradeoffs tend to prioritize "easy to use" over low-latency.

Improving its latency, and avoiding priority inversion between the dbus-daemon and its clients, certainly increases the number of situations where D-Bus can be used. They might not be necessary for "the desktop bus", but that's by no means the only thing people use D-Bus for.

Improving the kernel-level transport is orthogonal to improving the user-space part (of which message (de)serialization is indeed likely to be the lowest-hanging fruit), and there's no reason they can't both happen.

> the dbus semantics and guarantees that make it slow are also what make it convenient

I absolutely agree that the convenient semantics - multicast signals, total ordering, conventions for lifecycle tracking and so on - are what make D-Bus valuable, and if you're willing to sacrifice those convenient semantics for performance, that's a sign that D-Bus is not right for you. Having said that, given the constraints of those semantics, the more efficient the better, and AF_BUS proves that there is room for improvement.


(Log in to post comments)

Missing the AF_BUS

Posted Jul 5, 2012 13:01 UTC (Thu) by hp (subscriber, #5220) [Link]

> poorly- or even maliciously-coded applications can never be ruled out,
> unfortunately

What I meant here was, an app with lots of round trips in its protocol design or that shovels loads of data over the bus is going to be a perf problem. As a practical matter if you have user-visible situation xyz that appears slow, fixing dorky app behavior can be the fastest way to fix xyz.

> there's no reason they can't both happen

That's why I keep lobbying for the userspace changes to happen - a couple of them looked like they'd only take a few days of work. Hey, for all I know, someone did them already over the last few months. Anyway it's just bugging me (as you've no doubt gathered) that the kernel stuff is a kind of multi-year undertaking due to the difficult political issues, while the performance could be greatly improved without blocking on kernel devs...

So I'm just trying to give the potential userspace tasks some PR. Maybe someone reading these comments will want to work on them, we can dream...

(I know I'm telling those close to dbus things they already know. But it may not be apparent to those who aren't close to it that there's stuff they could do today.)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds