dbus moving into kernel?

Joshua Judson Rosen rozzin at geekspace.com
Sat Sep 25 18:30:54 CEST 2010

Marco Trevisan "(Treviño)" <mail at 3v1n0.net> writes:
> Il giorno gio, 16/09/2010 alle 17.23 +0100, Al Johnson ha scritto:
> > kdbus is proof-of-concept at the moment, the idea being to reduce the number 
> > of context switches needed for each dbus message. One synthetic benchmark 
> > shows a 3x speed increase on the n900 but speedup in real world applications 
> > seems much more modest.
> > 
> > http://alban.apinc.org/blog/2010/09/15/d-bus-in-the-kernel-faster/
> Some days ago I've tried to port this patch to the Openmoko kernel,
> after applying it to the SHR 2.6.32 kernel (patches at [1]), I got
> these results (in average):
> dbus-ping-pong test:
> Ping		dbus-daemon (s)		kdbus (s)	speedup
> 500 ping	3.33			2.13		36.2%
> 5000 ping	32.59			26.09		19.9%
> 50000 ping	313.56			176.35		43.8%
> Adrien Bustany’s ipc-performances tool with 60000 random 10 char
> strings:
> dbus-daemon query (s)	kdbus query (s)		speedup
> 102.75			74.71			27.29%
> So, the results are quite good, but the code is actually buggy...
> I guess that this system could give us a nice speedup when with many
> core applications with very few sources changes.
> Comments?

Looking at your numbers, we're talking about shaving `up to 43.8%' off
of something that's already down in the singe-digit milliseconds range
to start with: in the best case above, it goes from 6.3 ms per query
to 3.5 ms per query; in the worse cases, it goes from 6.5 ms down to
5.2 ms. In your last test with Adrien's tool, the 27.29% improvement
is from 1.7 ms to 1.2 ms.

Is D-Bus actually enough of a bottleneck in, say, the FSO or SHR designs
that we should expect to accumulate enough of these ~2-ms reductions
quickly enough for them to actually become noticeable? An improvement of
`2 ms per' can be worthwhile if it adds up quickly enough--but does it?
How long does it take, under normal operating conditions, before even
50 D-Bus calls are made (a total of 0.1 seconds of accumulated savings)?

I don't know the answers to these questions, so they're not rhetorical :)

"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."

More information about the community mailing list