Apparent console regressions in -current

Ed Schouten ed at 80386.nl
Mon Oct 19 07:18:50 UTC 2009


Hello Doug,

* Doug Barton <dougb at 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!

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20091019/a591a546/attachment.pgp


More information about the freebsd-current mailing list