----- Original Message -----
From: Der Herr Hofrat <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 4:40 AM
Subject: Re: [rtl] share memory again


> > There's no real processing overhead on shared memory, the data is
just
> > there and any process can access it.  OTOH, using FIFO's makes the
> > data less corruptible by random pointer errors in your code.
> >
> > If speed is your main concern, I'd go with shared memory.
> >
> I don't think there is realy a performance issue with fifo vs.
shared memory
> that is if you take large fifos (1M) and 1M of shared memory and use
it as a pure data transfer mechanism
> then there is littl to no difference (in fact FIFOs will perform
better thatn shared memory)
>
> the real difference I guess is random vs. sequential access and the
behavior if the reading end is too slow.
>

    To transfer data from, say, kernel to user via FIFO requires that
the original data be put into some kernel buffer, say by DMA, then
copying the data to the FIFO's buffer and finally copying the data to
the user's buffer, all assuming that buffers are big enough and the
read request is large enough to move the data in a single block.  If
there data were DMA'd into a shared buffer to start with, then only
one copy is needed to move it, assuming that this is necessary at all
and that the user can't simply use the data in place.  Thus, as I see
it, using FIFO's requires at least one more copy than shared memory
does (not to mention a syscall by the user).  Is this significant in
today's world of 133-400 MHz memory buses and 2 GHz CPU's?  Depends.
For most of us, probably not.  For some applications, it could be
critical.

        Norm


-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to