home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!jvnc.net!princeton!rutgers!cbmvax!jesup
- From: jesup@cbmvax.commodore.com (Randell Jesup)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: writing odd bytes
- Message-ID: <34921@cbmvax.commodore.com>
- Date: 8 Sep 92 02:34:05 GMT
- References: <1992Sep6.848.16300@dosgate>
- Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
- Distribution: comp
- Organization: Commodore, West Chester, PA
- Lines: 28
-
- "jonathan forbes" <jonathan.forbes@canrem.com> writes:
- >I have run into a very strange problem. In one of my programs, a
- >Write() call will occasionally take *much* longer to execute than it
- >should (when writing to any hard drive). When this happens, it would
- >seem to be a slowdown to about 25% of "normal" speed, and the hard drive
- >activity light is solid.
- >
- >It's almost as if the data was being written a little bit at a time, but
- >I have checked and only large pieces are being written (~= 64k).
- >
- >Now, the strange thing I noticed eventually is that writing an odd
- >number of bytes seems to make it happen; I can write 65534 or 65536
- >bytes, but if I write 65535 bytes, it slows down.
-
- Most DMA HD controllers can only DMA even numbers of bytes, to and
- from even boundaries (current A3000's need longword boundaries). Because
- of this, and the fact that some HD controllers don't handle being passed
- odd boundaries, the FS has a "MASK" value. If your transfer and the mask
- indicate DMA may not be possible, the transfer is done through the filesystem
- buffers, 512 bytes at a time.
-
- --
- "Rev on the redline, you're on your own; seems like a lifetime, but soon it's
- gone..." Foreigner
- -
- Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
- {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup
- Disclaimer: Nothing I say is anything other than my personal opinion.
-