From owner-freebsd-hackers Thu Nov 20 00:53:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA22072 for hackers-outgoing; Thu, 20 Nov 1997 00:53:09 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA22066 for ; Thu, 20 Nov 1997 00:53:04 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id TAA31061; Thu, 20 Nov 1997 19:46:56 +1100 Date: Thu, 20 Nov 1997 19:46:56 +1100 From: Bruce Evans Message-Id: <199711200846.TAA31061@godzilla.zeta.org.au> To: bde@zeta.org.au, mouth@ibm.net Subject: Re: Status of 650 UART support Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> Each i/o takes about 1 usec on an 8MHz ISA bus (perhaps >>125 nsec more or less) >I tried some timing tests and measured almost 2 usec for one 8MHz ISA >bus I/O on a 486 DX4-100. The difference is partly due to the difference between real/VM86 and protected mode. Here are the best-case cycle times for inb, at least on plain 486's: pm (CPL <= IOPL): 8 real: 14 VM86: 27 pm (CPL > IOPL): 28 27 - 8 only accounts for 0.19 usec per i/o at 100 MHz. >I used the following real-mode Turbo C DOS ISR with a dummy loop to >repeat reading the UART line status register a million times. The I used to use throwaway test programs under DOS to determine i/o timing. Now I use throwaway LKMs under FreeBSD. The easiest method is to take one of the examples in /usr/share/exemples/lkm and put `... microtime(&start); test_code(); microtime(&finish); printf(...);' in the startup code. Then loading the module runs the test. Bruce