public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: n_tty.c driver patch (semantic and performance correction) (a ll recent versions)
@ 2002-06-17 17:27 Ed Vance
  2002-06-18  2:00 ` Robert White
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Vance @ 2002-06-17 17:27 UTC (permalink / raw)
  To: 'rwhite@pobox.com'
  Cc: linux-kernel, linux-serial, 'Russell King',
	'Theodore Tso'

On Sat, June 15, 2002 at 9:01 PM, Robert White wrote:
> Kernel Versions: 2.2, 2.4, 2.5 (all of them since 1996 really 8-)
> 
> The n_tty line discipline module contains a "semantic error" that 
> limits its speed and usefulness in many uses.  The attached patch 
> directly addresses serial performance in a completely backwards-
> compatible way.
> 
> In particular, the current handling of VMIN hugely limits, 
> complicates, and/or slows down optimal serial use.  The most 
> obvious 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.

Hi,

IIRC, the way VMIN>0,VTIME=0 is supposed to work is to make characters 
available to the top level queue to be read when the low level input 
queue contains VMIN or more characters. Until that moment, there are 
no characters available to a read of any buffer size regardless of how 
many characters have been received at the low level. This is why a 
single character read blocks when at least one character has been 
received but not yet VMIN characters. Only data in the top level queue 
can be read. If the line discipline has not yet released data to the 
top level queue because of VMIN, then no data can be read, but this is 
not an error. 

Many have been tempted to change the behavior of this part of the 
system. IMHO, it is not worth tossing away application portability. 

Standards compliance can feel a bit like vertigo while instrument 
flying. Sometimes one has to just stare at the artificial horizon and 
say "I believe it" to one's self until the gut is convinced. 

Best regards,
Ed

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-06-19 23:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-17 17:27 n_tty.c driver patch (semantic and performance correction) (a ll recent versions) Ed Vance
2002-06-18  2:00 ` Robert White
2002-06-18 13:05   ` Stuart MacDonald
2002-06-19  4:59     ` Anyone using NFSv4? Dax Kelson
2002-06-19 23:48       ` David Ford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox