From owner-cvs-sys Sat Apr 15 14:05:01 1995 Return-Path: cvs-sys-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA01011 for cvs-sys-outgoing; Sat, 15 Apr 1995 14:05:01 -0700 Received: (from bde@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA00998 ; Sat, 15 Apr 1995 14:04:59 -0700 Date: Sat, 15 Apr 1995 14:04:59 -0700 From: Bruce Evans Message-Id: <199504152104.OAA00998@freefall.cdrom.com> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/kern tty.c Sender: cvs-sys-owner@freebsd.org Precedence: bulk bde 95/04/15 14:04:59 Modified: sys/kern tty.c Log: Speed up ttnread() in the !(ICANON | ISIG) case by copying to user space through a temporary buffer instead of one character at a time. The old method takes about 6 usec/char on a 486DX2/66. This is larger than than the combined interrupt and PIO overhead for a 16550! This change was first implemented in 1.1.5. It was rewritten for 2.1. The clist access functions allow a simpler implementation at some cost in correctness and speed. There needs to be an ungetc() function to recover from EFAULT, and it wastes time to copy through a temporary buffer. Don't snoop on single characters that weren't read due to EFAULT. Rewrite a snoop comment in my approximation to English. Undo bogus exportation of ttnread().