Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2009 09:20:53 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Doug Barton <dougb@FreeBSD.org>, Pyun YongHyeon <pyunyh@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Apparent console regressions in -current
Message-ID:  <20091019072053.GA1293@hoeg.nl>
In-Reply-To: <4ADBF637.8090206@FreeBSD.org>
References:  <4ADBF637.8090206@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--wRRV7LY7NUeQGEoC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello Doug,

* Doug Barton <dougb@FreeBSD.org> wrote:
> I was trying to debug an unrelated problem today and noticed what
> appear to be some console regressions. <snip>

Got it. It turns out the bug is as follows:

When changing the baud rate, it has to grow or shrink the TTY buffers.
When it has to shrink the buffer, it doesn't actually free memory
directly, but uses a lazy approach to deallocate buffers as data flows
through the TTY.

It also calculates a water mark, to determine when to unblock input/
output on a TTY after it had to block processes. This level is
calculated by obtaining the TTY buffer sizes and using 10%.

Because it uses the lazy approach, it uses the wrong buffer size to
calculate the watermark, which means the watermark could be placed
outside the TTY buffer size, causing processes to be never waked up.
This could easily be demonstrated by running `pstat -t'.

It should be fixed as of revision 198223. Thanks for reporting!

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--wRRV7LY7NUeQGEoC
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkrcE1UACgkQ52SDGA2eCwXbfQCeONLSfIcZOk5gmW+Gxyurp0EY
DDYAnj0C41DfsC9fKMOMtlr5sSG5M4Zh
=Hwna
-----END PGP SIGNATURE-----

--wRRV7LY7NUeQGEoC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091019072053.GA1293>