Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 1996 14:57:46 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        caussep@sphynx.fdn.fr, hackers@FreeBSD.org
Cc:        delaitt@cpc.wmin.ac.uk, jdp@polstra.com, tb@idefix.fdn.fr
Subject:   Re: Patches from 2.1-RELEASE
Message-ID:  <199602060357.OAA19150@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>1] tape-patch:
>~~~~~~~~~~~~~~
>  Some SCSI-1 tape drives like Archive 2150S, Tandberg-??? _DO_
>implement a mode called QFA (Quick File Access) which allow quick
>positionning on a given block number (counted 1 from the begining of
>tape).  This feature was available when I ran Linux two years ago.  An
>equivalent set of commands also exist on SCSI-2 tape drives but I
>don't have any hardware to test it on.  Before releasing this patch, I
>grabbed the 2.2-current "st.c", so this patch also adds the retension 
>command.

The `tell' command but not the `seek' command worked on my WangDat 3100
SCSI-2 DAT tape under Linux a couple of years ago.

>CAVEATS: I don't know if these commands are specific to the Archive
>Viper-150 (aka 2150S). If so, they should probably go to the rogues
>gallery; anyhow they have a SCSI-2 equivalent (but with different
>encoding).

Where can I find the different encoding?

>2] floppy-patch:
>~~~~~~~~~~~~~~~~
> ...
>2-b) High-speed:
>  The speed increase comes from two changes: the increased number of
>sectors (since the rotational speed is the same) and spiral formatting
>with a cylinder skew of 2 to compensate the head switching time.

I don't like cylinder skew or interleave for floppies.  The driver
should keep track of the next (accessible) sector and schedule i/o's to
access the sectors in the best possible order.  If the skews and
interleaves are nonstandard, then the driver has to do extra work to
detect and adjust for them.

Skew and interleave helps for dumb drivers of course.

>it back!!! (this is used for spiral formatting). The default head
>settle time is "hz/16" which is far too big to get the benefit of
>spiral formatting.  I replaced it with "hz/FDSEEKWAIT". A good value

hz/16 is 6 (giving a timeout of 50+ to 60 msec).  This is much too large.
It was hz/50 in rev.1.1 of fd.c (giving a timeout of (10+ to 20 msec).
This may be too small.  I think the standard is 15 msec.  The kernel
has poor support for timeouts this small.  The timeout has to be 3 ticks
to guarantee that it is > 15 msec.  I made it hz/32 in rev.1.30 to get
this.  Then someone made it hz/16 in rev.1.43 "to avoid annoying messages".

>of FDSEEKWAIT is 64, though it runs okay with 128 but 64 is safer :-)

hz/64 is 1 (0+ to 10 msec timeout) while hz/128 is 0 (also 0+ to 10
msec timeout because timeout() doesn't believe that you want a timeout
of 0 ticks and increases it to 1 tick :-).

I've worked on floppy drivers that didn't worry about head settle.  This
is usually OK on old, slow systems.  It is safer if the driver schedules
i/o.  Then the driver never should never attempt to access a sector too
soon after seeking because the access would usually fail and a whole
disk revolution would be wasted.

>The fdformat program has been changed to do spiral formatting.  It
>accepts two new parameters: track and cylinder skew. Track skew
>(defaults to zero) is almost useless since the head switching time is
>neglectable . Cylinder skew is sensitive: I obtained the best
>performances with a value of 2 (the default) on an unloaded system.

The best skew is probably drive-dependent.  On one of my floppy drives
(a 5.25 inch TEAC (?) drive bought in 1988) with standard 1.2MB
formatting, it is possible to read sector N on one cylinder, then seek
to the next cylinder and read sector N+2, except when N is the last or
the second last sector, it is possible to read the first sector on the
next track!  On all my other PC floppy drives (a couple of 5.25 inch
ones and a couple of 3.5 inch ones), it is only possible to read
sector N+3 or N+4 after seeking.  This is easy to compensate for in
drivers that schedule the i/o, but it costs a sector time or 3 per
revolution, as would uncompensated for cylinder skew.  In dumb drivers
it can waste a lot of time, e.g., under DOG copying a bunch of small
files to an uncached floppy took about a minute with the fast drive
and about 8 minutes with a slow drive.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602060357.OAA19150>