From owner-svn-src-head@FreeBSD.ORG Sat Nov 8 20:40:40 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 923BD106567A; Sat, 8 Nov 2008 20:40:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E91B8FC0A; Sat, 8 Nov 2008 20:40:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA8KeeJ9021791; Sat, 8 Nov 2008 20:40:40 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA8KeewQ021788; Sat, 8 Nov 2008 20:40:40 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811082040.mA8KeewQ021788@svn.freebsd.org> From: Ed Schouten Date: Sat, 8 Nov 2008 20:40:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184771 - in head/sys: dev/syscons kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2008 20:40:40 -0000 Author: ed Date: Sat Nov 8 20:40:39 2008 New Revision: 184771 URL: http://svn.freebsd.org/changeset/base/184771 Log: Reduce the default baud rate of PTY's to 9600. On RELENG_6 (and probably RELENG_7) we see our syscons windows and pseudo-terminals have the following buffer sizes: | LINE RAW CAN OUT IHIWT ILOWT OHWT LWT COL STATE SESS PGID DISC | ttyv0 0 0 0 7680 6720 2052 256 7 OCcl 1146 1146 term | ttyp0 0 0 0 7680 6720 1296 256 0 OCc 82033 82033 term These buffer sizes make no sense, because we often have much more output than input, but I guess having higher input buffer sizes improves guarantees of the system. On MPSAFE TTY I just sent both the input and output buffer sizes to 7 KB, which is pretty big on a standard FreeBSD install with 8 syscons windows and some PTY's. Reduce the baud rate to 9600 baud, which means we now have the following buffer sizes: | LINE INQ CAN LIN LOW OUTQ USE LOW COL SESS PGID STATE | ttyv0 1920 0 0 192 1984 0 199 7 2401 2401 Oil | pts/0 1920 0 0 192 1984 0 199 5631 1305 2526 Oi This is a lot smaller, but for pseudo-devices this should be good enough. You need to do a lot of punching to fill up a 7.5 KB input buffer. If it turns out things don't work out this way, we'll just switch to 19200 baud. Modified: head/sys/dev/syscons/sysmouse.c head/sys/kern/tty.c head/sys/sys/ttydefaults.h Modified: head/sys/dev/syscons/sysmouse.c ============================================================================== --- head/sys/dev/syscons/sysmouse.c Sat Nov 8 19:56:32 2008 (r184770) +++ head/sys/dev/syscons/sysmouse.c Sat Nov 8 20:40:39 2008 (r184771) @@ -148,7 +148,7 @@ smdev_param(struct tty *tp, struct termi * Set the output baud rate to zero. The mouse device supports * no output, so we don't want to waste buffers. */ - t->c_ispeed = TTYDEF_SPEED_PSEUDO; + t->c_ispeed = TTYDEF_SPEED; t->c_ospeed = B0; return (0); Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Sat Nov 8 19:56:32 2008 (r184770) +++ head/sys/kern/tty.c Sat Nov 8 20:40:39 2008 (r184771) @@ -802,7 +802,7 @@ ttydevsw_defparam(struct tty *tp, struct { /* Use a fake baud rate, we're not a real device. */ - t->c_ispeed = t->c_ospeed = TTYDEF_SPEED_PSEUDO; + t->c_ispeed = t->c_ospeed = TTYDEF_SPEED; return (0); } Modified: head/sys/sys/ttydefaults.h ============================================================================== --- head/sys/sys/ttydefaults.h Sat Nov 8 19:56:32 2008 (r184770) +++ head/sys/sys/ttydefaults.h Sat Nov 8 20:40:39 2008 (r184771) @@ -52,7 +52,6 @@ #define TTYDEF_LFLAG TTYDEF_LFLAG_ECHO #define TTYDEF_CFLAG (CREAD | CS8 | HUPCL) #define TTYDEF_SPEED (B9600) -#define TTYDEF_SPEED_PSEUDO (B38400) /* * Control Character Defaults