Thread (83 messages) 83 messages, 14 authors, 2015-02-08

Re: [PATCH 01/13] kdbus: add documentation

flat view

From: Austin S Hemmelgarn <hidden>
Date: 2015-01-22 14:49:18
Also in: lkml

On 2015-01-22 08:46, David Herrmann wrote:
Hi Michael

On Thu, Jan 22, 2015 at 11:18 AM, Michael Kerrisk (man-pages)
[off-list ref] wrote:
quoted
* 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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help