[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54C10DDC.9000503@gmail.com>
Date: Thu, 22 Jan 2015 09:49:00 -0500
From: Austin S Hemmelgarn <ahferroin7@...il.com>
To: David Herrmann <dh.herrmann@...il.com>,
"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
CC: Daniel Mack <daniel@...que.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
Tom Gundersen <teg@...m.no>, Jiri Kosina <jkosina@...e.cz>,
Andy Lutomirski <luto@...capital.net>,
Linux API <linux-api@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Djalal Harouni <tixxdz@...ndz.org>,
Johannes Stezenbach <js@...21.net>,
Theodore T'so <tytso@....edu>
Subject: Re: [PATCH 01/13] kdbus: add documentation
On 2015-01-22 08:46, David Herrmann wrote:
> Hi Michael
>
> On Thu, Jan 22, 2015 at 11:18 AM, Michael Kerrisk (man-pages)
> <mtk.manpages@...il.com> wrote:
>> * API oddities such as the 'kernel_flags' fields. Why do I need to
>> be told what flags the kernel supports on *every* operation?
>
> If we only returned EINVAL on invalid arguments, user-space had to
> probe for each flag to see whether it's supported. By returning the
> set of supported flags, user-space can cache those and _reliably_ know
> which flags are supported.
> We decided the overhead of a single u64 copy on each ioctl is
> preferred over a separate syscall/ioctl to query kernel flags. If you
> disagree, please elaborate (preferably with a suggestion how to do it
> better).
>
While I agree that there should be a way for userspace to get the list
of supported operations, userspace apps will only actually care about
that once, when they begin talking to kdbus, because (ignoring the live
kernel patching that people have been working on recently) the list of
supported operations isn't going to change while the system is running.
While a u64 copy has relatively low overhead, it does have overhead,
and that is very significant when you consider part of the reason some
people want kdbus is for the performance gain. Especially for those
automotive applications that have been mentioned which fire off
thousands of messages during start-up, every little bit of performance
is significant.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (2455 bytes)
Powered by blists - more mailing lists