From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Harvey Chapman <hchapman-linux-kernel@3gfp.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial inter-character timeout usage with async io
Date: Wed, 8 Aug 2007 09:47:48 +0100 [thread overview]
Message-ID: <20070808094748.72c4ff22@the-village.bc.nu> (raw)
In-Reply-To: <46B92869.4000400@3gfp.com>
> 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
prev parent reply other threads:[~2007-08-08 8:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-07 22:53 Harvey Chapman
2007-08-08 1:11 ` Alan Cox
2007-08-08 2:20 ` Harvey Chapman
2007-08-08 2:31 ` Harvey Chapman
2007-08-08 8:47 ` Alan Cox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070808094748.72c4ff22@the-village.bc.nu \
--to=alan@lxorguk.ukuu.org.uk \
--cc=hchapman-linux-kernel@3gfp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®