Thread (19 messages) 19 messages, 8 authors, 2011-02-16

Re: [RFC] Inter-processor Mailboxes Drivers

flat view

From: Blanchard, Hollis <hidden>
Date: 2011-02-14 23:05:00
Also in: linux-arm-kernel

On 02/13/2011 01:24 PM, Linus Walleij wrote:
quoted
quoted
     3. Userspace interfaces for accessing the mailboxes.  A
        '/dev/mailbox1', '/dev/mailbox2', etc... mapping, for =
example.
What kind of business does userspace have with directly using
mailboxes? Enlighten me so I get it... in our system these are
used by protocols, such as net/caif/* thru drivers/net/caif/*, and
we have similar kernelspace functionality for Phonet.

CAIF and Phonet on the other hand, have custom openings
down to the thing that exists on the other end of the mailbox.
Most of these systems tend to talk some funny protocol that
is often better handled by the kernel than by any userspace.

So is this for the situation when you have no intermediate
protocol between your userpace and the other CPU's
subsystem? Or are you thinking about handling that
protocol in userspace? That is generally not such a good idea
for efficiency reasons.
OpenMCAPI (http://openmcapi.org) implements the MCAPI specification,=20
which is a simple application-level communication API that uses shared=20
memory. The API could be layered over any protocol, but was more or less =

designed for simple shared-memory systems, e.g. fixed topology, no=20
retransmission, etc.

Currently, we implement almost all of this as a shared library, plus a=20
very small kernel driver. The only requirements on the kernel are to=20
allow userspace to map the shared memory area, and provide an IPI=20
mechanism (and allow the process to sleep while waiting). Applications=20
sync with each other using normal atomic memory operations.

We're now trying to optimize the transfer of scalars on platforms that=20
provide mailboxes (beyond simple IPIs), which is why we're looking at=20
defining a user-facing API to such hardware.

I'll add that we haven't done serious optimization yet, but the numbers=20
we do have seem reasonable. What are the "efficiency" issues you're=20
worried about?

Hollis Blanchard
Mentor Graphics, Embedded Systems Division
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help