home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sgi / 16561 < prev    next >
Encoding:
Text File  |  1992-11-17  |  8.0 KB  |  174 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sgigate!sgi!fido!zola!zuni!anchor!olson
  3. From: olson@anchor.esd.sgi.com (Dave Olson)
  4. Subject: Re: more MTIO questions???
  5. Message-ID: <sg62qhg@zuni.esd.sgi.com>
  6. Sender: news@zuni.esd.sgi.com (Net News)
  7. Organization:  Silicon Graphics, Inc.  Mountain View, CA
  8. References: <fish.721950630@news2.gsfc.nasa.gov>
  9. Date: Tue, 17 Nov 92 21:55:00 GMT
  10. Lines: 162
  11.  
  12. In <fish.721950630@news2.gsfc.nasa.gov> fish@daacdev1.stx.com writes:
  13. | on a 440S irix 4.0.1 i have the following questions:
  14. | 1) using the 4mm max block size (Maximum block size: 16777215 bytes
  15. |    from mt status) dd returns ENOMEM - Not enough space
  16. |    (the tps man page sez this may be that the kernel mem allocator
  17. |    couldn't allocate it [the jagtape man page doesnt' have this caveat,
  18. |    the ENOSPC comments are quite different too, should they be?] )
  19.  
  20. 16 MB is what the drive supports.  The default maximum DMA size in our
  21. kernel is 4 MB (see /usr/sysgen/master.d/kernel: MAXDMASZ).  Since the
  22. memory has to be locked down during DMA, you don't want to set this too
  23. close to  your physical memory size.
  24.  
  25. | 2) 4mm when already at EOD 
  26. |     a) from my code using regular old read(1) first attempt returns
  27. |        a 0, second read causes "Trace/BPT trap (coredump)"
  28.  
  29. I've never seen this.  Certainly the tape driver doesn't do it.
  30. Are you *sure* this is happening on the read, and not on something
  31. you are doing right afterwards?
  32.  
  33. |     b) mt fsr returns ENOSPC (No space left on device)
  34. |     c) dd just sez 0+0 records in out w/ no other diagnostics
  35. |    why isn't ENOSPC returned from my read? how should i code the check?
  36.  
  37. It should be, and is in every case I have ever looked at.
  38.  
  39. | 3) when reading 4mm from beginning of tape to EOD when last EOF is
  40. |    reached EOF is returned (ok)
  41. |    
  42. |    When read after this is issued EOF is returned again
  43. |    (ok, but... it seems to be trying to simulate
  44. |    that it reached a double EOF (logical EOT from 9-track world at
  45. |    least) when it really isn't - i think i like this but i think that
  46. |    8mm tapes on vme/scsi (jag) don't do this (the read after the last
  47. |    EOF returns ENOSPC)
  48.  
  49. by 'EOF is returned again', do you mean -1, or are you doing an MTIOCGET,
  50. and seeing the FM status bit set?  If the latter, it is a bug.  What should
  51. happen is your read should return -1, with errno set to ENOSPC.
  52.  
  53. | 4a) is there any speed (or other) advantage to using the fixed block
  54. |    device file over the variable?
  55.  
  56. Not really for this device.  For some other devices, perhaps.  The
  57. main advantage of using the fixed block device is for devices like 8mm
  58. or 9 track, that have a fairly small max block size with variable block
  59. mode (and therefore limited i/o sizes per request), since in fixed mode,
  60. you can do much larger i/o requests on these drives.
  61.  
  62. |    i almost always need variable but sometimes if i know its going to
  63. |    be 100% fixed size would i see any increase in throughput
  64.  
  65. I'd recommend sticking with variable block size on DAT, for portability,
  66. since that seems to be the more common usage (and definitely is on
  67. SGI systems).
  68.  
  69. |    from the manpages/.h files the only advantage i can find of fixed over
  70. |    variable is that the record size is limited only to physical memory
  71.  
  72. Well, not quite.  There is still an upper limit (typically 64K or 16M blocks).
  73. That isn't always a memory limitation these days.
  74.  
  75. | 4b) when in fixed block mode say its set to 1024 like on 8mm and you
  76. |     write 1024*n bytes will the driver lay down IRG's at the 1024 for
  77. |     you?  (i know this works ok for read but never tried for write)
  78.  
  79. There are no interrrecord gaps for either DAT or 8mm.  They always write
  80. in frames.  8mm has significant capacity lossage for i/o's not a multiple
  81. of 1K (better yet 8K, the track size), but DAT does not.
  82.  
  83. | 5) is there any more info available on the recommended block size field?
  84. |    the most i can find is in mtio.h where is sez: '"recommended" block size
  85. |    for i/o. Mostly based on compatibility with earlier releases and/or
  86. |    other vendors'
  87.  
  88. Nope, that's about all there is.  tar uses that size if the 'b' option
  89. isn't given, when writing.
  90.  
  91. | 6) i'm glad i followed that Usenet thread last month that warned that the 
  92. |    jagtape man page TAPE MOVEMENT CRITERIA is incorrect on item #4 where
  93. |    it states that the EOFs will be written only if the last write was not
  94. |    a WEOF (my code showed the same result and i thought i was going crazy)
  95. |    anyway, why is it that 8/4mm don't use the double EOF as logical EOT
  96. |    like the 9 tracks?  is it because EOD is so different in helical-scan
  97. |    world? could i get a mini-lecture on it.
  98.  
  99. Because they have a real EOD marker, 9 track does not.  Therefore 2 FM's
  100. is completely redundant (and on 8mm, although not DAT) wastes a lot of tape
  101. (particularly on the 8200).  The whole reason 9 track drives used 2 FM's
  102. to mark EOD (LEOT is another term for it) was to be able to tell where
  103. the logical end of tape was.  Some 9 track drives also support 'search
  104. for N sequential FM's (N==2 most common), so this LEOT can easily be
  105. found.  All other tape drives I've worked with have an EOD marker
  106. that is enforced by the drive firmware (and is usually searchable
  107. by a special command, except for 8mm).
  108.  
  109. |    related: what is the action on 9 track, 4/8mm w.r.t. MTEOM and
  110. |    MTAFILE mtop operations?
  111.  
  112. 9 track searches for 2 sequential FM's.  QIC and DAT use 'space to EOD'
  113. commands. 8mm uses a hideous hack of 'space fwd blk; if(!EOD) space wfd FM'
  114. in a loop.  MTAFILE can only be supported on DAT and 9 track, because the
  115. other drives don't allow overwrite.
  116.  
  117. | 7) i see mtget.mt_fileno and mt_blkno seem to be implemented under tpsc
  118. |    for 4mm - the mtio.h still states that they are not fully implemented
  119. |    i see they are not for kennedy 9-track and jagtape 8mm (are they for
  120. |    tpsc 8mm?)  i hope irix 5.0 has this fully supported, does it?
  121.  
  122. mt_fileno is not implemented in any SGI tape driver.  It is basicly
  123. impossible, except for a few special cases.  mt_blkno is supported on
  124. drives that return the current blk #.  DAT does support that.  You
  125. can see this with the output from 'mt stat'.  It uses the mt_blkno
  126. field.
  127.  
  128. | 8) ...and if you haven't totally fallen asleep or hit the delete key yet...
  129. |    when including mtio.h or jagtape.h i have to include types.h first
  130. |    since they use ulong, u_char etc
  131. |    is it against ANSI C policy for an include file to include another? (i
  132. |    recall something like this)
  133.  
  134. Nope.  It is prohibited for files listed in the standard, but for
  135. non-standard files it isn't.  Still, many of us don't like nested
  136. include files.
  137.  
  138. | 9) is the only way to use mtget and old_mtget (for librmt, /etc/rmt use)
  139. |    to use the rmtops isrmt() function and then pass the correct structure
  140. |    to the ioctl()? (the comments in mtio.h are great!)
  141.  
  142. You can always pass the mtget struct.  The ioctl code in our rmt library
  143. copies the fields as appropriate if the other side returns the older
  144. structure (as most non-SGI, and old (pre 3.3 IRIX) SGI systems do).
  145.  
  146. | 10) mt man page references mtio.h, it'ld be nice if the FILES section of the
  147. |    man page referred to it also (ioctl too), but this is icing on the cake
  148.  
  149. FILES sections very rarely mention include files, as that wasn't the
  150. original intended purpose.  The purpose of the FILES section is to
  151. mention 'files' used at runtime.
  152.  
  153. |         thanx,   (to dave hopefully; i'll buy ya a brew next time
  154. |               i'm in mountain view!)
  155.  
  156. I'll never turn down a beer, at least, not a good one!
  157.  
  158. | p.s. here's to hoping that the new layered drivers will make all the jag/tps
  159. |      driver differences totally moot - unfortunately it looks like irix 5.0
  160. |      for multi-processors won't be around soon enough to cure (some of) my 
  161. |      ills
  162.  
  163. The differences will disappear to the greatest extent possible.
  164. It will be a while before you can get your hands on it; I can't
  165. give any dates, except 'probably calendar year 1993'.
  166. --
  167. Let no one tell me that silence gives consent,  |   Dave Olson
  168. because whoever is silent dissents.             |   Silicon Graphics, Inc.
  169.     Maria Isabel Barreno                        |   olson@sgi.com
  170.