SIMPL is an userspace implementation which may not be as efficient as the original QNX's implementation
SIMPL is an userspace implementation which may not be as efficient as the original QNX's implementation
Posted Mar 3, 2015 15:25 UTC (Tue) by dirco (guest, #92179)Parent article: ALS: Linux interprocess communication and kdbus
> used QNX, which has a nice message-passing model.
> You can send a message and pass control to another
> process, which is good for realtime and single
> processor systems, Kroah-Hartman said. Large
> automotive companies have built huge systems on
> top of QNX messages, creating large libraries used by
> their applications. They would like to be able to use
> those libraries on Linux, but often don't know that there
> is a way to get the QNX message API for Linux. It is
> called SIMPL and it works well.
QNX message passing needs kernel support, as we can see in Wikipedia
QNX article:
https://en.wikipedia.org/w/index.php?title=QNX&oldid=...
"QNX interprocess communication consists of sending a message from one
process to another and waiting for a reply. This is a single
operation, called MsgSend. The message is copied, by the kernel, from
the address space of the sending process to that of the receiving
process.
If the receiving process is waiting for the message, control of the
CPU is transferred at the same time, without a pass through the CPU
scheduler. Thus, sending a message to another process and waiting for
a reply does not result in "losing one's turn" for the CPU.
This tight integration between message passing and CPU scheduling is
one of the key mechanisms that makes QNX message passing broadly
usable. Most Unix and Linux interprocess communication mechanisms lack
this tight integration ... Mishandling of this subtle issue is a
primary reason for the disappointing performance of some other
microkernel systems such as early versions of Mach."
It points out transferring CPU control directly from the sender process
to the receiving process is the key step improving QNX IPC performance,
which is in general not possible be implemented by merely userspace
program on Linux.
According to mails to SIMPL's group, I have confirmed that SIMPL is
just an userspace implementation:
"The main SIMPL source tree is all in user space. For most
SIMPL users the performance is adequate and the codebase is much more portable
and easy to maintain.
There are kernel implementations of SRR that are compatible with SIMPL but
none of those are recent.
There is is also a SIPC variation. I know the developer who wrote this one.
If you are interested I could connect you two and see if he has more recent
stuff."
so what we need would be a kernel implementation (like aforementioned SRR
or SIPC) which integrates the special scheduling into the kernel if we want to
have comparable performance with the original implementation.