[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070808094748.72c4ff22@the-village.bc.nu>
Date: Wed, 8 Aug 2007 09:47:48 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Harvey Chapman <hchapman-linux-kernel@...p.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial inter-character timeout usage with async io
> 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) followed by 1 final inter-character timeout (when the UART
> FIFO contains the last 6 bytes). The program upon each SIGIO would
> read() 8 bytes and do some parsing of the data buffer and realize that
> the whole sequence had not yet been received. Repeat 17 more times in
> this example.
That seems a particularly odd way to implement block I/O. Just use a
thread for this and the VMIN/VTIME functionality in the n_tty layer -
that is why it is there.
> I agree. However, the inter-character timeout is present (to the best of
> my knowledge and google's) in all serial UARTs from the 16550A onward
> (starting around 1994 and Windows 3.1). Before that, the IIR timeout
Almost all our drivers are not 16550A. A large part of the serial world
is now USB and current PCs (especially laptops) often don't include any
16550A devices at all.
Your changes seem to be - hardware specific, not supportable by many
devices, and designed to improve a particularly crazy way of handling the
I/O in the first place. That doesn't make a good candidate for the
upstream kernel.
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists