Bus1: a new Linux interprocess communication proposal
Bus1: a new Linux interprocess communication proposal
Posted Aug 21, 2016 4:08 UTC (Sun) by alison (subscriber, #63752)Parent article: Bus1: a new Linux interprocess communication proposal
Posted Aug 21, 2016 4:22 UTC (Sun)
by heftig (subscriber, #73632)
[Link] (4 responses)
kdbus also had special support for passing sealed memfds. IIRC the problem with that was that you had to munmap a memfd in order to seal it, and munmap was/is slowass.
Posted Aug 21, 2016 10:03 UTC (Sun)
by tomegun (guest, #56697)
[Link]
So for "small" messages they can be sent by copying them precisely once (straight from the sender to the receiver), and for "large" messages one can do zero-copy by sending a sealed memfd (the reason for not always doing zero-copy is that the fixed overhead is pretty high).
Posted Aug 26, 2016 22:21 UTC (Fri)
by imMute (guest, #96323)
[Link] (2 responses)
I was about to post a question asking why the bus1 protocol included the "message pools" when fd passing was already included. Creating a memfd, sealing it, then sending the fd through bus1 seems like it would be more performant because there is no copying of the data once it's put into the memfd buffer.
>kdbus also had special support for passing sealed memfds. IIRC the problem with that was that you had to munmap a memfd in order to seal it, and munmap was/is slowass.
The article on LWN about sealing & memfd_create (https://lwn.net/Articles/591108/) says that the seal is applied with a fcntl() call. Scratch that, another article (https://lwn.net/Articles/593918/) agrees with what you've stated (that munmap() has to be called before applying any seals). Given that seals can only be removed under *exclusive* ownership, it's likely that any IPC mechanism using this wouldn't reuse memfd buffers. That implies that memfd's have to be created, sealed, and destroyed very efficiently for it to have more performance than copying buffers through the kernel.
Posted Aug 28, 2016 23:55 UTC (Sun)
by tomegun (guest, #56697)
[Link] (1 responses)
Posted Sep 5, 2016 14:39 UTC (Mon)
by Shugyousha (subscriber, #93672)
[Link]
Bus1: a new Linux interprocess communication proposal
Bus1: a new Linux interprocess communication proposal
Bus1: a new Linux interprocess communication proposal
Bus1: a new Linux interprocess communication proposal
Bus1: a new Linux interprocess communication proposal