Date: Tue, 9 Oct 2001 14:33:39 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Terry Lambert <tlambert2@mindspring.com> Cc: Dmitry Karasik <dmitry@karasik.eu.org>, <freebsd-current@FreeBSD.ORG> Subject: Re: /dev/cuaa broken ? Message-ID: <20011009140811.M22446-100000@delplex.bde.org> In-Reply-To: <3BC1E8C0.2C409E3C@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Oct 2001, Terry Lambert wrote: > Bruce Evans wrote: > > I haven't found the bug yet. It was first fixed relatively recently > > in rev.1.152 (1996/11/30) of sio.c. Until then, you had to have waits > > in your program or dtrwait large enough to avoid loss of data on close. > > But dtrwait didn't help for the ioctls that need to wait for output to > > drain. > > Shouldn't he just disable the FIFO for this usage? Disabling the input fifo might have help a bit, but not completely because there is still a "FIFO" of length 1 for the last byte, not to mention the 10 msec deep pseudo-DMA input fifo and the much larger tty input queues. With the default quantum of 100 msec, a single cpu hpg process could easily delay reading of the data for 100 / 0.96 = 104 character times at 9600 bps, so 104 characters could easily be flushed from the input queues alone when carrier loss is detected by the receiver. Flushing input on carrier loss is clearly wrong, but BSD has done it since at least Net/2. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011009140811.M22446-100000>