From owner-freebsd-bugs Sun Dec 8 22:22:08 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id WAA07613 for bugs-outgoing; Sun, 8 Dec 1996 22:22:08 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id WAA07598 for ; Sun, 8 Dec 1996 22:22:01 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id RAA18562 for bugs@freebsd.org; Mon, 9 Dec 1996 17:19:01 +1100 Date: Mon, 9 Dec 1996 17:19:01 +1100 From: Bruce Evans Message-Id: <199612090619.RAA18562@godzilla.zeta.org.au> To: bugs@freebsd.org Subject: bogus st_blksize for devices Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk st_blksize is now 64K for ttys. It has been MAXBSIZE for all cdevs and BLKDEV_IOSIZE for most bdevs for a long time. This is sort of backwards - MAXBSIZE has to do with buffers but is only used for unbuffered devices. MAXBSIZE is now 64K, which is far too large for ttys. It was previously 16K, which is only 2-8 times too large (the tty output buffer size of 2K would be OK, and there is no reason to use a larger buffer than the default for file systems). BLKDEV_IOSIZE has been 2048 for a long time. It has been too small for 10-20 years, but is rarely used. Writing blocks of size 64K to a syscons console starves other processes. This is actually a bug in syscons. `dd if=/dev/zero bs=64k' has the same problem. dd with even larger block sizes takes minutes to complete. Fix for syscons: sleep in the output routine for block sizes much larger than one screen. Bruce