From owner-freebsd-current Wed Jun 4 09:45:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA09521 for current-outgoing; Wed, 4 Jun 1997 09:45:31 -0700 (PDT) Received: from Sisyphos.MI.Uni-Koeln.DE (Sisyphos.MI.Uni-Koeln.DE [134.95.212.10]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id JAA09511 for ; Wed, 4 Jun 1997 09:45:29 -0700 (PDT) Received: from x14.mi.uni-koeln.de (annexr3-10.slip.Uni-Koeln.DE) by Sisyphos.MI.Uni-Koeln.DE with SMTP id AA24713 (5.67b/IDA-1.5 for ); Wed, 4 Jun 1997 18:45:12 +0200 Received: (from se@localhost) by x14.mi.uni-koeln.de (8.8.5/8.6.9) id SAA13588; Wed, 4 Jun 1997 18:45:10 +0200 (CEST) X-Face: " Date: Wed, 4 Jun 1997 18:45:09 +0200 From: Stefan Esser To: John-Mark Gurney Cc: Richard Straka , current@FreeBSD.ORG Subject: Re: sio driver performance References: <19970604014135.27671@hydrogen.nike.efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.74 In-Reply-To: <19970604014135.27671@hydrogen.nike.efn.org>; from John-Mark Gurney on Wed, Jun 04, 1997 at 01:41:35AM -0700 Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Jun 4, John-Mark Gurney wrote: > Richard Straka scribbled this message on Jun 4: > > I have 2 16550A UARTS in a 486DX-33. During probing, the sio > > driver properly identifies both ports as 16550A's. > > > > When sending sustained 115200 baud data from this machine, systat > > (with vmstat option) indicates an interrupt rate of about 720/sec > > with about 2% of the processor servicing interrupts. > > > > When receiving sustained 115200 baud data, an interrupt rate of > > over 26,000/sec is indicated with about 15% of the processor going > > to service interrupts. > > > > It appears as though the fifo is not working for the receive. In an > > attempt to exhonerate the hardware, I swapped in another 16550 card > > I had laying around and got the similar results. > > it actually is working quite nicely... if it wasn't you would see > 115,200 * 2 interrupts/sec if the fifo isn't working... but what One interrupt per **bit** received ??? Well, I thought the UART did provide you with bytes :) > you are probably seeing is that the recieve fifo is set to 8bytes > instead of 14bytes (115200*2/26000 ~= 8.8615...)... (11520/10)/14 ~= 825 int/s per port (using a FIFO depth of 14, which allows for 170us max. interrupt latency) (11520/10)/8 ~= 1440 int/s per port (using a FIFO depth of 8, => 700us) > also, it's a know fact that the 16550's are kinda heavy on overhead > (not as bad as a parallel port though)... if you want to do many > ports at full speed you really should invest in a smarter card, > like a Digiboard/Cyclom/Riscom/Stallion smart board that has larger > buffers and usually supports mapped memory access... Well, the 16550's FIFO will be read a byte a time, and that means you will be limited to a few MB/s (Bruce Evans did some testing of ISA port latencies, recently, and posted his results). This makes some 10 microseconds per 14 bytes (if the receive FIFO was set to 14 bytes, that is). A FIFO depth of 8 will reduce the time to read out those 8 bytes to some 5 microseconds. This amounts to 7 milli- seconds per second (or just below 1%) per port, not taking the interrupt handler overhead into account ... Regards, STefan