[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
While you might not want a real-time FIFO to interfere with IRQ latency,
consider that the RT-kernel has to copy the a large amount of data from your
buffer into its buffer in a way that guarantees the atomicity of the
operation -- most likely , with interrupts disabled. Similarly the
operation of reading it out of the FIFO at the user-task's end requires the
full overhead of a system call and then the copy of an equal amount of data
from the FIFO's internal buffer into the user's buffer, again with some
guarantee of atomicity. While there might be a similar number of copy
operations when your ISR writes it into shared memory and the user reads it
out, the time when the interrupts are disabled can be reduced to the time to
acquire and release some sort of mutex which controls the simulated FIFO in
shared memory; once the pointers are acquired atomically, memory transfer
can proceed as a normal operation -- and it's possible that the user-task
doesn't need to copy the data out of shared memory but can use it in place,
thus saving even more CPU bandwidth
Norm
> -----Original Message-----
> From: Gérard LASSAILLY [SMTP:g.lassailly@wanadoo.fr]
> Sent: Thursday, November 01, 2001 7:49 AM
> To: rtl@fsmlabs.com
> Subject: Re: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
>
> Thanks for your reply.
>
> I also think that using shared memory is THE solution to move large block
> of
> data between user space and RT LINUX.
>
> But, I think that the use of RT Fifo should not affect IRQ latency on a
> Real
> Time OS (a can see on my oscilloscope IRQ latency > 1ms !!! when i'm using
> rtl_put() with 1,5 Mbytes under RTL2.2 / kernel 2.2.14 / Pentium 266 MMX).
>
> Somebody know if change have been made on RT FIFO code ( RTL 2.2 -> RTL
> 3.1)
> to reduce IRQ latency?
>
> Gérard
>
> ----- Original Message -----
> From: "Norm Dresner" <ndrez@att.net>
> To: <rtl@fsmlabs.com>
> Sent: Wednesday, October 31, 2001 2:51 AM
> Subject: Re: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
>
>
> > This doesn't seem like a good design to me. Why can't you
> > write the data to shared memory (very fast) and just send a
> > pointer through the FIFO telling the user-task where it can
> > find the data.
> >
> > Norm
> >
> > ----- Original Message -----
> > From: Gérard LASSAILLY
> > To: rtl@fsmlabs.com
> > Sent: Tuesday, October 30, 2001 4:47 PM
> > Subject: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
> >
> >
> > I'm using 4 RT Fifo under RT Linux 2.2.
> > I write blocs of 1.4 Mbytes in RT FIFO (1.4 Mbytes by
> > rtf_put() ).
> > This write in RT Fifo is repeat 25 times by second.
> >
> > During this, IRQ are lost or delayed.
> >
> > I don't use RT Fifo in ISR but only to communicate between
> > RT task and user task under LINUX.
> >
> > I think that IRQ are masked during rtf_put() during a long
> > time.
> >
> > Some knowledge please ?
> > Do you know if RT Linux 3.0 or 3.1 workaround this
> > probleme?
> >
> > Thanks for your reply.
> >
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> > echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> > --
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/
> >
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/