[lug] 16550 Serial port buffering?

Alan Robertson alanr at unix.sh
Fri May 25 11:27:28 MDT 2001


"D. Stimits" wrote:
> 
> "Scott A. Herod" wrote:
> >
> > After 3 days of trying to get it to work....
> >
> >   "man setserial"  search for low_latency.
> 
> Makes me wonder if this could have a beneficial effect on the serial
> port of a 56k modem while working with games that require low latency.
> When I get around to it, I think I'll give it a try (not exactly serious
> work, but hey, someone needs to be less serious).
> 
> D. Stimits, stimits at idcomm.com
> 
> >
> > Apparently it was the serial port driver, not context switching
> > in the kernel.
> >
> > Scott
> >
> > "Scott A. Herod" wrote:
> > >
> > > Hello,
> > >
> > >   We're having a hard time getting rapid response from a clock attached
> > > to the 16550 serial port on my machine.  This is RH 7.1 with the
> > > 2.4.2 kernal.  We believe that we're seeing a big delay ( on the order
> > > of 10 msecs ) between the time the clock sends a byte and the
> > > time that select in a user-land process returns with that byte.
> > >
> > >   A couple of questions:
> > >
> > >   Is this an indication of context switching and if so is it possible
> > > to speed it up?
> > >
> > >   Is there a way to trigger another line on the serial port when the
> > > read occurs so that I can watch a scope to verify that I am getting
> > > this delay?
> > >
> > >   Any other thoughts would be greatly appreciated.


The Linux kernel has latency problems.  There is a series of patches called
"low latency" patches for the kernel which are supposed to address that.

They aren't in any distribution yet.  Andi Kleen says this about them:
 
> The problem with the low latency stuff is that it slows things down (noticeable
> in benchmarks and under heavy loads because of more context switches) and 
> tends to trigger new bugs.  This means users must be warned at least,
> otherwise there will be e.g. benchmark tests run on it.


You might look here for a set of such patches...

http://people.redhat.com/mingo/lowlatency-patches/

	-- Alan Robertson
	   alanr at unix.sh




More information about the LUG mailing list