home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / amiga / programm / 13171 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.8 KB

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