mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ed Vance <EdV@macrolink.com>
To: "'rwhite@pobox.com'" <rwhite@pobox.com>,
	"'Theodore Tso'" <tytso@mit.edu>,
	"'Russell King'" <rmk@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: RE: n_tty.c driver patch (semantic and performance correction) (a ll recent versions)
Date: Wed, 26 Jun 2002 10:48:30 -0700	[thread overview]
Message-ID: <11E89240C407D311958800A0C9ACF7D13A789A@EXCHANGE> (raw)

Hi Robert,

On Sat, June 15, 2002, Robert White wrote:
> 
> The n_tty line discipline module contains a "semantic error" 
> that limits its speed and usefullness in many uses.  The 
> attached patch directly addresses serial performance in a 
> completely backwards-compatable way.
> 
> In particular, the current handling of VMIN hugely limits, 
> complicates, and/or slows down optimal serial use.  The most 
> obvius example is that if you call read(2) with a buffer size 
> less than the current value of VMIN, the line discipline will 
> insist that the read call wait for characters that can not be 
> returned to that call.  The POSIX standard is silent on the 
> subject of whether this is right or wrong.  Common sense says 
> it is wrong.
> 

Ten years ago, I would have agreed with you. I suggested a very 
similar change for VTIME=0;VMIN>0 behavior back then, while we 
were porting SVR4 to proprietary hardware. This was for 
compatibility with the way reads were handled on a previous 
non-un*x product. It was deemed a spec violation, so we added an 
ioctl to implement the compatible behavior. 

Does the spec say that VMIN behavior depends on the size of a 
blocking read? No, it says that the read completes when VMIN or 
more characters have been received. If VMIN is three and two 
characters have been received, completing a blocking read of any 
size is a violation. Should we also add a "read buffer size" 
parameter to select and poll, etc. so they can report that read 
data is available before satisfying VMIN, too? 

Ted, Russell, please weigh in on this. 

Best regards,
Ed

---------------------------------------------------------------- 
Ed Vance              edv@macrolink.com
Macrolink, Inc.       1500 N. Kellogg Dr  Anaheim, CA  92807
----------------------------------------------------------------

             reply	other threads:[~2002-06-26 17:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-26 17:48 Ed Vance [this message]
2002-06-26 20:42 ` Russell King
2002-06-27 16:37 ` Robert White
2002-07-26 14:17 ` Russell King
2002-07-27 22:07   ` Robert White
2002-07-27 23:11     ` Russell King
2002-07-27 23:21     ` Andries Brouwer
2002-07-28  2:34       ` Robert White
2002-07-28  3:01         ` Stevie O
2002-07-28 13:34         ` Andries Brouwer
2002-07-28 20:04         ` Alan Cox
2002-07-30  7:41           ` Robert White
2002-07-28  2:36       ` Robert White
  -- strict thread matches above, loose matches on Subject: below --
2002-07-31 16:58 Ed Vance
2002-07-30 17:07 Ed Vance
2002-07-29 21:46 Ed Vance
2002-07-30  7:50 ` Robert White
2002-06-28 18:12 Ed Vance
2002-06-17 17:27 Ed Vance
2002-06-18  2:00 ` Robert White
2002-06-18 13:05   ` Stuart MacDonald

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=11E89240C407D311958800A0C9ACF7D13A789A@EXCHANGE \
    --to=edv@macrolink.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=rwhite@pobox.com \
    --cc=tytso@mit.edu \
    /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®