Re: [PATCH v3 00/13] Add kdbus implementation
From: Johannes Stezenbach
Date: Tue Jan 20 2015 - 08:25:14 EST
On Tue, Jan 20, 2015 at 07:26:09PM +0800, Greg Kroah-Hartman wrote:
> On Tue, Jan 20, 2015 at 11:57:12AM +0100, Johannes Stezenbach wrote:
> >
> > So I did some googling and found in QNX servers create a channel
> > to receive messages, and clients connect to this channel.
> > Multiple clients can connect to the channel.
>
> Hence, a bus :)
>
> > But it is not a bus -- no multicast/broadcast, and no name
> > service or policy rules like D-Bus has. To me it looks
> > to be similar in functionality to UNIX domain sockets.
>
> It's not as complex as D-Bus, but it's still subscribing to things and
> getting messages.
Apparently you don't read what I write, probably you're not interested
in this discussion anymore...
QNX uses the term "channel" but it does not refer to a bus
or subscription facility, it is more like a socket in listening state.
> > My guess is that the people porting from QNX were just confused
> > and their use of D-Bus was in error. Maybe they should've used
> > plain sockets, capnproto, ZeroMQ or whatever.
>
> I tend to trust that they knew what they were doing, they wouldn't have
> picked D-Bus for no good reason.
The automotive developers I had the pleasure to work with would
use anything which is available via a mouse click in the
commercial Embedded Linux SDK IDE of their choice :)
Let's face it: QNX has a single IPC solution while Linux has
a confusing multitude of possibilities.
> > Well, IMHO you got it backwards. Before adding a complex new IPC
> > API to the kernel you should do the homework and gather some
> > evidence that there will be enough users to justify the addition.
>
> systemd wants this today for early boot. It will remove lots of code
> and enable a lot of good things to happen. The first email in this
> thread describes this quite well, is that not sufficient?
The first mail in this thread doesn't even mention systemd,
instead it has a lot of "marketing" buzzwords.
Of course it is no secret that systemd is the driving force
behind kdbus, but no public record exists to explain why
kdbus was chosen and designed the way it is, what alternatives
were considered and rejected etc. (or if there is, please send a link)
> > FWIW, my gut feeling was that the earlier attempts to add a new
> > IPC primitve like multicast UNIX domain sockets
> > http://thread.gmane.org/gmane.linux.kernel/1255575/focus=1257999
> > were a much saner approach. But now I think the comments
> > from this old thread have not been addressed, instead the
> > new approach just made the thing more complex and
> > put in ipc/ instead of net/ to bypass the guards.
>
> Not at all, the networking maintainers said that that proposal was not
> acceptable to them at all and it should not be done in the networking
> stack at all. So this was solution was created instead, which provides
> a lot more things than the old networking patches did, which shows that
> the networking developers were right to reject it.
Please read the gmane thread to the end. It seems there were
several indications that D-Bus can be improved in userspace
using existing kernel facilities. Havoc Pennington's mail
I quoted in my first response also contains some hints
about it. I have no idea if any of this has ever been
pursued. While adding complexity to critical net/ code paths
is probematic and a good reason to reject it, this was not
the only reason, the major one being "not neccessary".
Thanks,
Johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/