Off-topic: D-Bus in the kernel

Havoc Pennington hp at pobox.com
Fri Sep 17 08:47:28 PDT 2010


Hi,

On Fri, Sep 17, 2010 at 11:37 AM, Alban Crequy
<alban.crequy at collabora.co.uk> wrote:
>
> No. It does the minimum parsing required to route the messages (header
> fields 'sender', 'destination', 'interface', etc.). There is no
> validation, except a few incomplete ones in the headers of the message.
>

OK. You have to set the sender header, for example, to be correct with
daemon semantics. (This is what I mean about the test suite.)

>> How much of the perf gain is due to different
>> behavior/semantics vs. avoiding the context switch and copies?
>
> I don't know, I need to test that. Is there an easy way to disable
> validation in dbus-daemon?

Yeah, there is a pretty easy code hack. in
dbus-message.c:load_message() change the validation mode set at the
top.

This still won't disable header _parsing_ though which is itself a lot
slower than it should be in libdbus. The only performance thing
libdbus really gets right is that it avoids a lot of gratuitous
copying of the message.

Havoc


More information about the dbus mailing list