linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Herrmann <dh.herrmann@gmail.com>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	Tom Gundersen <teg@jklm.no>, Jiri Kosina <jkosina@suse.cz>,
	Andy Lutomirski <luto@amacapital.net>,
	Linux API <linux-api@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Daniel Mack <daniel@zonque.or>,
	Djalal Harouni <tixxdz@opendz.org>,
	Daniel Mack <daniel@zonque.org>,
	Johannes Stezenbach <js@sig21.net>
Subject: Re: [PATCH 01/13] kdbus: add documentation
Date: Tue, 20 Jan 2015 15:31:52 +0100	[thread overview]
Message-ID: <CANq1E4SjfZOKqTsdkt519vKc1Poeah5McVJBb_spdHjbKv4=7g@mail.gmail.com> (raw)
In-Reply-To: <54BE5DC8.70706@gmail.com>

Hi Michael

On Tue, Jan 20, 2015 at 2:53 PM, Michael Kerrisk (man-pages)
<mtk.manpages@gmail.com> wrote:
> On 01/16/2015 08:16 PM, Greg Kroah-Hartman wrote:
>> From: Daniel Mack <daniel@zonque.org>
>>
>> kdbus is a system for low-latency, low-overhead, easy to use
>> interprocess communication (IPC).
>>
>> The interface to all functions in this driver is implemented via ioctls
>> on files exposed through a filesystem called 'kdbusfs'. The default
>> mount point of kdbusfs is /sys/fs/kdbus. This patch adds detailed
>> documentation about the kernel level API design.
>
> I have some details feedback on the contents of this file, and some
> bigger questions. I'll split them out into separate mails.
>
> So here, the bigger, general questions to start with. I've arrived late
> to this, so sorry if they've already been discussed, but the answers to
> some of the questions should actually be in this file, I would have
> expected.
>
> This is an enormous and complex API. Why is the API ioctl() based,
> rather than system-call-based? Have we learned nothing from the hydra
> that the futex() multiplexing syscall became? (And kdbus is an order
> of magnitude more complex, by the look of things.) At the very least,
> a *good* justification of why the API is ioctl()-based should be part
> of this documentation file.
>
> An observation: The documentation below is substantial, but this API is
> enormous, so the documentation still feels rather thin. What would
> really help would be some example code in the doc.
>
> And on the subject of code examples... Are there any (prototype)
> working user-space applications that exercise the current kdbus
> implementation? That is, can I install these kdbus patches, and
> then find a simple example application somewhere that does
> something to exercise kdbus?

If you run a 3.18 kernel, you can install kdbus.ko from our repository
and boot a full Fedora system running Gnome3 with kdbus, given that
you compiled systemd with --enable-kdbus (which is still
experimental). No legacy dbus1 daemon is running. Instead, we have a
bus-proxy that converts classic dbus1 to kdbus, so all
bus-communication runs on kdbus.

> And then: is there any substantial real-world application (e.g., a
> full D-Bus port) that is being developed in tandem with this kernel
> side patch? (I don't mean a user-space library; I mean a seriously
> large application.) This is an incredibly complex API whose
> failings are only going to become evident through real-world use.
> Solidifying an API in the kernel and then discovering the API
> problems later when writing real-world applications would make for
> a sad story. A story something like that of inotify, an API which
> is an order of magnitude less complex than kdbus. (I can't help but
> feel that many of inotify problems that I discuss at
> https://lwn.net/Articles/605128/ might have been fixed or mitigated
> if a few real-world applications had been implemented before the
> API  was set in stone.)

I think running a whole Gnome3 stack counts as "substantial real-world
application", right? Sure, it's a dbus1-to-kdbus layer, but all the
systemd tools use kdbus natively and it works just fine. In fact, we
all run kdbus on our main-systems every day.

We've spent over a year fixing races and API misdesigns, we've talked
to other toolkit developers (glib, qt, ..) and made sure we're
backwards compatible to dbus1. I don't think the API is perfect,
everyone makes mistakes. But with bus-proxy and systemd we have two
huge users of kdbus that put a lot of pressure on API design.

>> +For a kdbus specific userspace library implementation please refer to:
>> +  http://cgit.freedesktop.org/systemd/systemd/tree/src/systemd/sd-bus.h
>
> Is this library intended just for systemd? More generally, is there an
> intention to provide a general purpose library API for kdbus? Or is the
> intention that each application will roll a library suitable to its
> needs? I think an answer to that question would be useful in this
> Documentation file.

kdbus is in no way bound to systemd. There are ongoing efforts to port
glib and qt to kdbus natively. The API is pretty simple and I don't
see how a libkdbus would simplify things. In fact, even our tests only
have slim wrappers around the ioctls to simplify error-handling in
test-scenarios.

Note that most of the toolkit work is on the marshaling level, which
is independent of kdbus. kdbus just provides the transport level. DBus
is just one, yet significant, application-layer on top of kdbus. Our
test-cases use kdbus exclusively to transport raw byte streams.

Thanks
David

  reply	other threads:[~2015-01-20 14:31 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 19:16 [PATCH v3 00/13] Add kdbus implementation Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 01/13] kdbus: add documentation Greg Kroah-Hartman
2015-01-20 13:53   ` Michael Kerrisk (man-pages)
2015-01-20 14:31     ` David Herrmann [this message]
2015-01-20 14:42       ` Josh Boyer
2015-01-20 14:53         ` Djalal Harouni
2015-01-20 16:08           ` Johannes Stezenbach
2015-01-20 17:00             ` David Herrmann
2015-01-20 22:00               ` Johannes Stezenbach
2015-01-21 10:28       ` Michael Kerrisk (man-pages)
2015-01-20 18:23     ` Daniel Mack
2015-01-21 10:32       ` Michael Kerrisk (man-pages)
2015-01-21 15:19         ` Theodore Ts'o
2015-01-21 16:58         ` Daniel Mack
2015-01-22 10:18           ` Michael Kerrisk (man-pages)
2015-01-22 13:46             ` David Herrmann
2015-01-22 14:49               ` Austin S Hemmelgarn
2015-01-23 16:08                 ` Greg Kroah-Hartman
2015-01-26 14:46                   ` Michael Kerrisk (man-pages)
2015-01-27 15:05                     ` David Herrmann
2015-01-27 16:03                       ` Andy Lutomirski
2015-01-29  8:53                         ` Daniel Mack
2015-01-29 11:25                           ` Andy Lutomirski
2015-01-29 11:42                             ` Daniel Mack
2015-01-29 12:09                               ` Andy Lutomirski
2015-02-02  9:34                                 ` Daniel Mack
2015-02-02 20:12                                   ` Andy Lutomirski
2015-02-03 10:09                                     ` Daniel Mack
2015-02-04  0:41                                       ` Andy Lutomirski
2015-02-04  2:47                                         ` Eric W. Biederman
2015-02-04  3:14                                           ` Greg Kroah-Hartman
2015-02-04  6:30                                             ` Eric W. Biederman
2015-02-04 23:03                                       ` Andy Lutomirski
2015-02-05  0:16                                         ` David Herrmann
2015-02-08 16:54                                           ` Andy Lutomirski
2015-01-27 18:03                       ` Michael Kerrisk (man-pages)
2015-01-23 11:47               ` Michael Kerrisk (man-pages)
2015-01-23 15:54             ` Greg Kroah-Hartman
2015-01-26 14:42               ` Michael Kerrisk (man-pages)
2015-01-26 15:26                 ` Tom Gundersen
2015-01-26 16:44                   ` christoph Hellwig
2015-01-26 16:45                   ` Michael Kerrisk (man-pages)
2015-01-27 15:23                     ` David Herrmann
2015-01-27 17:53                       ` Michael Kerrisk (man-pages)
2015-01-27 18:14                         ` Daniel Mack
2015-01-28 10:46                           ` Michael Kerrisk (man-pages)
2015-01-20 13:58   ` Michael Kerrisk (man-pages)
2015-01-20 17:50     ` Daniel Mack
2015-01-21  8:57       ` Michael Kerrisk (man-pages)
2015-01-21  9:07         ` Daniel Mack
2015-01-21  9:07     ` Michael Kerrisk (man-pages)
2015-01-21  9:12       ` Daniel Mack
2015-01-23  6:28   ` Ahmed S. Darwish
2015-01-23 13:19     ` Greg Kroah-Hartman
2015-01-23 13:29       ` Greg Kroah-Hartman
2015-01-25  3:30       ` Ahmed S. Darwish
2015-01-16 19:16 ` [PATCH 02/13] kdbus: add header file Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 03/13] kdbus: add driver skeleton, ioctl entry points and utility functions Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 04/13] kdbus: add connection pool implementation Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 05/13] kdbus: add connection, queue handling and message validation code Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 06/13] kdbus: add node and filesystem implementation Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 07/13] kdbus: add code to gather metadata Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 08/13] kdbus: add code for notifications and matches Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 09/13] kdbus: add code for buses, domains and endpoints Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 10/13] kdbus: add name registry implementation Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 11/13] kdbus: add policy database implementation Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 12/13] kdbus: add Makefile, Kconfig and MAINTAINERS entry Greg Kroah-Hartman
2015-01-16 19:16 ` [PATCH 13/13] kdbus: add selftests Greg Kroah-Hartman
2015-01-16 22:07 ` [PATCH v3 00/13] Add kdbus implementation Josh Boyer
2015-01-16 22:18   ` Greg Kroah-Hartman
2015-01-17  0:26     ` Daniel Mack
2015-01-17  0:41       ` Josh Boyer
2015-01-19 18:06 ` Johannes Stezenbach
2015-01-19 18:38   ` Greg Kroah-Hartman
2015-01-19 20:19     ` Johannes Stezenbach
2015-01-19 20:31       ` Greg Kroah-Hartman
2015-01-19 23:38         ` Johannes Stezenbach
2015-01-20  1:13           ` Greg Kroah-Hartman
2015-01-20 10:57             ` Johannes Stezenbach
2015-01-20 11:26               ` Greg Kroah-Hartman
2015-01-20 13:24                 ` Johannes Stezenbach
2015-01-20 14:12                   ` Michael Kerrisk (man-pages)
2015-01-26 21:32             ` One Thousand Gnomes
2015-01-19 18:33 ` Johannes Stezenbach
2015-01-20 14:05 ` Michael Kerrisk (man-pages)
2015-01-20 14:15 ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANq1E4SjfZOKqTsdkt519vKc1Poeah5McVJBb_spdHjbKv4=7g@mail.gmail.com' \
    --to=dh.herrmann@gmail.com \
    --cc=arnd@arndb.de \
    --cc=daniel@zonque.or \
    --cc=daniel@zonque.org \
    --cc=ebiederm@xmission.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkosina@suse.cz \
    --cc=js@sig21.net \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mtk.manpages@gmail.com \
    --cc=teg@jklm.no \
    --cc=tixxdz@opendz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).