Re: [PATCH] serial inter-character timeout usage with async io

2007-08-08 Thread Alan Cox
> A Linux program is connected via serial port to some other serial device > using asynchronous I/O and the other serial device sends a 150 byte > sequence to the Linux program. The Linux program will receive 18 > intermediate SIGIOs (one for each 8-byte threshold interrupt generated > by the UART)

Re: [PATCH] serial inter-character timeout usage with async io

2007-08-07 Thread Harvey Chapman
Harvey Chapman wrote: > just don't identify it specifically. In the ISRs, they simply check to > see if any of bits 1, 2, or 3 are set. In the example above, on the last Well, not entirely true, it actually checks bit 0 which indicates that there was an interrupt, period. Bits 1, 2, and 3 indicate

Re: [PATCH] serial inter-character timeout usage with async io

2007-08-07 Thread Harvey Chapman
Alan Cox wrote: > What are you actually trying to achieve ? I'm trying to reduce the load on embedded systems running Linux and using serial ports. I'm trying to alleviate the following typical software scenario: A Linux program is connected via serial port to some other serial device using asyn

Re: [PATCH] serial inter-character timeout usage with async io

2007-08-07 Thread Alan Cox
> Currently, I only have this code enabled for i386 and arm, and only for > the 8250 and pxa serial drivers. If no one thinks this is a terrible > idea, I'll modify all of the other ioctl.h files and resubmit the patch. What are you actually trying to achieve ? Firstly we don't want stuff with de

[PATCH] serial inter-character timeout usage with async io

2007-08-07 Thread Harvey Chapman
I'm looking for comments, thanks. This patch adds a timeout mode to n_tty that will only send SIGIO signals (for input) when the UART's IIR indicates that a character timeout has occurred. This reduces overhead by reducing the number of SIGIO signals sent and consequently the unnecessary wake-ups