From owner-freebsd-current@FreeBSD.ORG Mon Oct 19 07:18:50 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C39FD1065670; Mon, 19 Oct 2009 07:18:50 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 696BB8FC0C; Mon, 19 Oct 2009 07:18:50 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 44AFE1CD1D; Mon, 19 Oct 2009 09:20:53 +0200 (CEST) Date: Mon, 19 Oct 2009 09:20:53 +0200 From: Ed Schouten To: Doug Barton , Pyun YongHyeon Message-ID: <20091019072053.GA1293@hoeg.nl> References: <4ADBF637.8090206@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <4ADBF637.8090206@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-current@freebsd.org Subject: Re: Apparent console regressions in -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 07:18:50 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Doug, * Doug Barton wrote: > I was trying to debug an unrelated problem today and noticed what > appear to be some console regressions. 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 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--