ftp.nice.ch/pub/next/unix/disk/WrenV_cache.README

This is the README for WrenV_cache.s.tar.gz [Download] [Browse] [Up]

04 feb 90 -- Paul V. O'Neill, Coastal Imaging Lab, Oregon State University
cachecon.c

Cache control for the Wren V 94181-702 scsi disk drive on a NeXT computer.

----------------------------------------------------------------------
READ LOOK-AHEAD/CACHE CONTROL on the Wren V:

Case A - Read command received and first LBA not in cache:
1. Fetch requested data from disk and transfer to host.
2. Fetch remaining logical blocks on current track and save in cache.

Case B - Read command received and first LBA already in cache:
1. Start transfer to host of all logical blocks requested which are
   already in cache.
2. Fetch from disk requested logical blocks which are not already in
   cache and queue for transfer to host.
3. Fetch remaining logical blocks on current track and save in cache.
---------------------------------------------------------------------

Be extremely careful with this program.  Don't change it unless you know
what you're doing.  I highly recommend not running it while booted off
the Wren V.  Boot off the optical and run it from there.

Wren V's are shipped with the Cache Control bit off. That is the default
value.  This is a savable parameter.  cachecon sets the save flag.  When
you use cachecon to turn on caching, caching will be enabled at power-up
from then on.  If you use cachecon to turn off caching, that will become
the power-on default.

cachecon takes 1 argument.  It must be 'c', 's', '0' or '1'.

c	print current cache parameters

s	print saved cache parameters

0	turn OFF caching and make that the saved state

1	turn ON caching and make that the saved state

You must be root to access lun 0.

Only 1-bit of all the cache control parameters is changable.  That's bit
4 of byte 14.  0x11 -> cache enabled.  0x01 -> cache disabled.

RESULTS:

	CACHE OFF:
disk> read
starting block? 0
# sectors per transfer? 16
number of transfers? 100
sector increment? 16
1638400 bytes in 6553 ms = 250137 bytes/s	<<<<<<<<<<
disk> 

	CACHE ON:
disk> read
starting block? 0
# sectors per transfer? 16
number of transfers? 100
sector increment? 16
1638400 bytes in 4698 ms = 349339 bytes/s	<<<<<<<<<<<<
disk> 

The Wren V is now faster than the Maxtor 8760S w/ 1024 Byte sectors.

This program was built upon /NextDeveloper/Examples/SCSI/sg_example.c.
The pretty stuff is from there.  The hacks are mine.  Check it out!

sg_example.c and the PRODUCT SPECIFICATION FOR WREN V SCSI MODEL 94181
(part no. 77765336) would be enough to write a full-fledged formater 
(if you had the time :-)

Oh, yeah:
		cc -o cachecon cachecon.c

Paul O'Neill                 pvo@oce.orst.edu
Coastal Imaging Lab
OSU--Oceanography
Corvallis, OR  97331         503-737-3251

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.