From owner-freebsd-hackers  Tue Oct 24 12:53:19 1995
Return-Path: owner-hackers
Received: (from root@localhost)
          by freefall.freebsd.org (8.6.12/8.6.6) id MAA28787
          for hackers-outgoing; Tue, 24 Oct 1995 12:53:19 -0700
Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19])
          by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA28777
          for <hackers@freebsd.org>; Tue, 24 Oct 1995 12:53:13 -0700
Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id FAA30444; Wed, 25 Oct 1995 05:51:42 +1000
Date: Wed, 25 Oct 1995 05:51:42 +1000
From: Bruce Evans <bde@zeta.org.au>
Message-Id: <199510241951.FAA30444@godzilla.zeta.org.au>
To: bde@zeta.org.au, dennis@etinc.com
Subject: Re: Async utilization.....
Cc: hackers@freebsd.org
Sender: owner-hackers@freebsd.org
Precedence: bulk

> Its not a real measurement, so you can't use it. Period.

It is a real measurement.

>Figure out the processing requirement for handling one average frame size of 
> bytes with a 16450 with 8-bit I/O cycles and loads of interrupts, add 20%
>and compare 

I do that routinely, but it's not as accurate as an actual measurement.
E.g., typical 16550 input on a 486DX2/66 8MHz ISA bus (non-multiport case),
for a typical receiver interrupt:

	interrupt overhead					5-10 us
	i/o's for line status	14
	i/o's for data		14
	i/o's for modem status	 1
	i/o's for interrupt id	 1
	total i/o's		30 @ 1.25 us each		37.5 us
								-------
	h/w dominated i/o overhead				3-3.5 us/byte
								-----------
	measured total overhead					6.3 us/byte

For a typical 16550 transmitter interrupt:
	interrupt overhead					5-10 us
	i/o's for line status	1
	i/o's for data		16
	i/o's for modem status	1
	i/o's for interrupt id	1
	total i/o's		19 @ 1.25 us each		24 us
								-------
	h/w dominated i/o overhead				1.8-2.1 us/byte
								-----------
	measured total overhead					2.9 us/byte

For typical 16450 input:

	interrupt overhead					5-10 us
	i/o's for line status	 1
	i/o's for data		 1
	i/o's for modem status	 1
	i/o's for interrupt id	 1
	total i/o's		 4 @ 1.25 us each		 5 us
								-------
	h/w dominated i/o overhead				10-15 us/byte
								-----------
	measured total overhead					16 us/byte

For WB8013EBT input, per 1500 byte packet:

	interrupt overhead					low
	i/o's for interrupt	3				low
	memory mapped i/o's for data	750 @ 0.625 us each
	other things I forgot					low?
								-------------
								more than
	h/w dominated i/o overhead				0.3125 us/byte
								-------------
	measured total overhead					0.7 us/byte

>it  to a single interrupt and one 16-bit bus transfer per frame. It doesn't
>take a rocket scientist 
>to know there's a signficant difference in processing requirements.

The factor tends to get reduced a lot by non-data i/o's and protocol
protocol processing.

Bruce