Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Nov 1997 21:36:30 -0800 (PST)
From:      "Jamil J. Weatherbee" <jamil@trojanhorse.ml.org>
To:        Mike Smith <mike@smith.net.au>
Cc:        hackers@freebsd.org, dufault@hda.com
Subject:   Re: Strategy Routines 
Message-ID:  <Pine.BSF.3.96.971101212300.671C-100000@trojanhorse.ml.org>
In-Reply-To: <199711020252.NAA00521@word.smith.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help

Ok, so say I am doing outb(), one bang after the other. Since timo can
sleep up to 1/100 of a second. What would be a good "packet size" (i.e.
number of outb() to limit myself to in a loop. My initial estimates would
indicate that I could break up the buffer in something like:
  (this is just for example I know the modulus is pretty damn
innefficient)

for (i=0; i<len; buf++)
 {
    outb (port, *buf)
    
    if (!(++i % 2048)) tsleep (myself, PPAUSE, "iosink", 1); 
 }




> This is a fault in the driver design.  Drivers should not hog the 
> cpu, obviously.  Try calling tsleep() out of the driver with a very 
> short timeout.
> 
> mike
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971101212300.671C-100000>