Table of Contents

DMKPAG Source

References

Source Listing

DMKPAG.ASSEMBLE.txt
  1. PAG TITLE 'DMKPAG (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKPAG 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO CONSTRUCT THE IOBLOKS AND SCHEDULE THE TASKS THAT MOVE 00010000
  11. * VIRTUAL MEMORY PAGES BETWEEN AUXILIARY DASD STORAGE AND REAL 00011000
  12. * MAIN STORAGE, AND TO CALCULATE TOTAL SYSTEM PAGING LOAD AT 00012000
  13. * USER SPECIFIED INTERVALS 00013000
  14. * 00014000
  15. * ATTRIBUTES - 00015000
  16. * 00016000
  17. * SERIALLY REUSABLE, RESIDENT, ENTERED VIA GOTO 00017000
  18. * 00018000
  19. * ENTRY POINTS - 00019000
  20. * 00020000
  21. * DMKPAGIO - ENTERED TO START PAGING OPERATIONS 00021000
  22. * 00022000
  23. * ENTRY POINTS - NON-EXECUTABLE 00023000
  24. * 00024000
  25. * DMKPAGPS - COUNT OF PAGING SIO'S 00025000
  26. * DMKPAGCC - COUNT OF CALLS TO THIS ROUTINE 00026000
  27. * DMKPAGQ - ANCHOR FOR LIST OF CPEXBLOKS FOR IN-TRANSIT PAGES 00027000
  28. * DMKPAGIC - NUMBER OF PAGING SIO'S OVER WHICH TO MEASURE LOAD 00028000
  29. * DMKPAGQR - MAINTAIN PAGE I/O FOR QUERY PAGING COMMAND 00029000
  30. * DMKPAGST - START OF PAGE LOAD MEASUREMENT PERIOD 00030000
  31. * DMKPAGSP - END OF PAGE LOAD MEASUREMENT PERIOD 00031000
  32. * DMKPAGLO - "DMKFRELO" MINUS LENGTH OF ONE PAGING IOBLOK 00032000
  33. * DMKPAGHI - "DMKFREHI" 00033000
  34. * DMKPAGSK - ANCHOR OF AVAILABLE PAGE I/O BLOCKS 00034000
  35. * DMKPAGDP - FLAG FOR SETTING PCI ON ALL 2305 REQUESTS 00035000
  36. * DMKPAGWS - SAVE AREA FOR THE PAGE WAIT TIME FOR THE ATTACHED 00036000
  37. * PROCESSOR 00037000
  38. * 00038000
  39. * ENTRY CONDITIONS - 00039000
  40. * 00040000
  41. * THE ANCHORS DMKPTRRQ AND DMKPTRWQ ARE POINTERS TO PUSH DOWN 00041000
  42. * STACKS OF CPEXBLOKS FOR PAGES TO BE MOVED. IN EACH CPEXBLOK 00042000
  43. * CPEXR0+3 CONTAINS THE DASD OP-CODE FOR THE OPERATION, CPEXR5 00043000
  44. * POINTS TO THE SWPTABLE ENTRY, CPEXR7 POINTS TO THE CORTABLE 00044000
  45. * ENTRY, AND CPEXR11 POINTS TO THE OWNER'S VMBLOK. 00045000
  46. * GPR12 = ADDRESS OF DMKPAGIO 00046000
  47. * 00047000
  48. * EXIT CONDITIONS - 00048000
  49. * 00049000
  50. * NONE 00050000
  51. * 00051000
  52. * CALLS TO OTHER ROUTINES - 00052000
  53. * 00053000
  54. * DMKFREE - TO OBTAIN STORAGE FOR PAGING IOBLOKS 00054000
  55. * DMKIOSQR - TO SCHEDULE THE I/O OPERATION ON THE REAL DEVICE 00055000
  56. * DMKDSPCH - EXIT VIA GOTO TO WAIT FOR INTERRUPTS 00056000
  57. * DMKOPRWT - WRITE ERROR MESSAGE DMKPAG415E TO OPERATOR 00057000
  58. * DMKCVTBH - BINARY TO HEX CONVERT ROUTINE 00058000
  59. * DMKSTKCP - TO STACK FOR EXECUTION CPEXBLOKS QUEUED ON PAGES 00059000
  60. * DMKFRET - TO RETURN PAGING IOBLOK IN DYNAMIC PAGING AREA 00060000
  61. * DMKSCNRD - FIND 'CUU' DEV ADDRESS GIVEN RDEVBLOK 00061000
  62. * 00062000
  63. * EXTERNAL REFERENCES - 00063000
  64. * 00064000
  65. * DMKSYSOW - ADDRESS OF THE SYSTEM OWNED VOLUME LIST 00065000
  66. * DMKPTRRQ - PAGE READ REQUEST QUEUE 00066000
  67. * DMKPTRWQ - PAGE WRITE REQUEST QUEUE 00067000
  68. * DMKPTRFF - TOTAL NUMBER OF FLUSHED PAGES 00068000
  69. * DMKPTRSS - TOTAL NUMBER OF STOLEN PAGES 00069000
  70. * DMKSLC - HIGH END OF V=R AREA (IF ANY) - OR 0 00070000
  71. * 00071000
  72. * TABLES / WORKAREAS - 00072000
  73. * 00073000
  74. * 1. SWPTABLE - ENTRIES CONTAIN DASD ADDRESSES FOR PAGES 00074000
  75. * 00075000
  76. * REGISTER USAGE - 00076000
  77. * 00077000
  78. * GPR0 = SCRATCH 00078000
  79. * GPR1 = CPEXBLOK BASE 00079000
  80. * GPR2 = SCRATCH 00080000
  81. * GPR3 = SCRATCH 00081000
  82. * GPR4 = SCRATCH 00082000
  83. * GPR5 = SWPTABLE ENTRY BASE 00083000
  84. * GPR7 = CORTABLE ENTRY BASE 00084000
  85. * GPR8 = RDEVBLOK BASE 00085000
  86. * GPR10 = IOBLOK BASE 00086000
  87. * GPR11 = VMBLOK BASE 00087000
  88. * GPR12 = DMKPAG BASE 00088000
  89. * GPR14 = EXTERNAL LINKAGE 00089000
  90. * GPR15 = EXTERNAL LINKAGE 00090000
  91. * 00091000
  92. * NOTES - 00092000
  93. * 00093000
  94. * NONE 00094000
  95. * 00095000
  96. * OPERATION - 00096000
  97. * 00097000
  98. * A. PROCESSING FOR CALL TO DMKPAGIO 00098000
  99. * 1. IF A PREFORMATTED PAGING IOBLOK EXISTS, GET ITS ADDRESS AND 00099000
  100. * SKIP TO STEP 2; OTHERWISE, CALL DMKFREE FOR FREE STORAGE 00100000
  101. * AND FORMAT A SKELETON IOBLOK 00101000
  102. * A. EXAMPLE OF A PAGING IOBLOK 00102000
  103. * 00103000
  104. * PAGESK X'07',PAGESEEK,CC,6 SEEK CCW 00104000
  105. * PAGESS X'23',PAGESECT,CC,1 SET SECTOR CCW 00105000
  106. * PAGESRCH X'31',PAGESEEK+2,CC,5 SEARCH ID EQUAL CCW 00106000
  107. * PAGESTIC X'08',PAGESRCH TIC *-8 (4 BYTES) 00107000
  108. * PAGEIOB X'00000000' POINTER TO SLOT SORTED IOBLOK 00108000
  109. * X'06'/X'05',DATA ADDRESS,CC,4096 RD/WR CCWS 00109000
  110. * PAGESNS X'04'/X'08',0,SILI+SKIP,1 SENSE CCW OR 00110000
  111. * TIC CCW TO THE NEXT SORTED IOBLOK 00111000
  112. * 00112000
  113. * 2. INSERT THE CORRECT PAGE FRAME ADDRESS AND DASD OPCODE INTO 00113000
  114. * THE PAGING IOBLOK AND INSERT THE DASD ADDRESS INFORMATION 00114000
  115. * FROM THE SWPTABLE ENTRY INTO THE SEEK ARGUMENT FIELD 00115000
  116. * 3. USE THE VOLUME INDEX IN THE COMPRESSED DASD ADDRESS TO IN- 00116000
  117. * DEX INTO THE SYSTEM OWNED VOLUME LIST, LOCATE THE DEVICE 00117000
  118. * INDEX AND POINT TO THE RDEVBLOK FOR THE PAGING DEVICE 00118000
  119. * 4. SEARCH THE QUEUE OF IOBLOKS ON THE RDEVBLOK FOR A PAGING 00119000
  120. * IOBLOK FOR THE SAME CYLINDER AS THE NEW REQUEST; IF ONE 00120000
  121. * IS FOUND, GO TO STEP 5, OTHERWISE GO TO STEP 7. 00121000
  122. * 5. IOBLOK SORT ROUTINES BY DEVICE TYPE: 00122000
  123. * 00123000
  124. * 5A. 2314/2319 - THE IOBLOKS FOR 2314/2319 ARE SORTED BY 00124000
  125. * SLOTS, USING SLOT VALUES 0 TO 7, REPRESENTING PAGES 00125000
  126. * 1 TO 8, 9 TO 16, 17 TO 24, AND 25 TO 32. 00126000
  127. * 00127000
  128. * SLOTS 00128000
  129. * 0 1 2 3 4 5 6 7 00129000
  130. * 00130000
  131. *TRACK/PAGE 0/1 0/2 1/3 1/4 2/5 3/6 3/7 4/8 00131000
  132. * 5/9 5/10 6/11 6/12 7/13 8/14 8/15 9/16 00132000
  133. * 10/17 10/18 11/19 11/20 12/21 13/22 13/23 14/24 00133000
  134. * 15/25 15/26 16/27 16/28 17/29 18/30 18/31 19/32 00134000
  135. * 00135000
  136. * A. IOBLOKS FOR RECORDS ON THE SAME TRACK ARE CHAINED 00136000
  137. * TOGATHER BY THE TIC ADDRESS IN THE PREVIOUS IOBLOK 00137000
  138. * POINTING TO THE SEARCH ID EQUAL CCW OF THE 00138000
  139. * NEXT IOBLOK, BYPASSING THE SEEK AND NO-OP CCWS. 00139000
  140. * B. ALL OTHER IOBLOKS ARE CHAINED TOGATHER BY THE TIC 00140000
  141. * ADDRESS IN THE PREVIOUS IOBLOK POINTING TO THE 00141000
  142. * SEEK CCW OF THE NEXT IOBLOK. 00142000
  143. * 00143000
  144. EJECT 00144000
  145. * 5B. 2305 - THE IOBLOKS FOR THE 2305-1 AND 2305-2 ARE SORTED 00145000
  146. * BY SLOTS (3 SLOTS PER REVOLUTION), AND DISREGARDING 00146000
  147. * CYLINDER AND TRACK/HEAD ADDRESSES. 00147000
  148. * 00148000
  149. * NOTE: ON 2305-1 AND 2305-2 DRUM, YOU CAN INCLUDE A SEEK 00149000
  150. * (OR SEEK HEAD) BETWEEN CONSECUTIVE CCWS IN A STRING, 00150000
  151. * WITHOUT AN EXTRA REVOLUTION, WHETHER THE HEAD CHANGES 00151000
  152. * OR NOT. A SET SECTOR CCW BETWEEN ADJACENT RECORDS OR 00152000
  153. * SLOTS WILL CAUSE AN EXTRA REVOLUTION TO BE TAKEN. 00153000
  154. * 00154000
  155. * TRACK/ SLOTS 00155000
  156. * HEAD 1 2 3 00156000
  157. * 00157000
  158. * 0 1 2 3 00158000
  159. * 1 4 5 6 00159000
  160. * 2 7 8 9 00160000
  161. * 3 10 11 12 00161000
  162. * 4 13 14 15 00162000
  163. * 5 16 17 18 00163000
  164. * 6 19 20 21 00164000
  165. * 7 22 23 24 00165000
  166. * |------PAGES-----| 00166000
  167. * 00167000
  168. * 00168000
  169. * A. IOBLOKS FOR RECORDS ON THE SAME TRACK ARE CHAINED 00169000
  170. * TOGATHER BY THE TIC ADDRESS IN THE PREVIOUS IOBLOK 00170000
  171. * POINTING TO THE SEARCH ID EQUAL CCW OF THE NEXT IOBLOK 00171000
  172. * BYPASSING THE SEEK AND SET SECTOR CCWS (EX. PAGES 00172000
  173. * 22,23,24). 00173000
  174. * B. IOBLOKS WHICH ARE ADJACENT (SLOT WISE) AND NOT ON THE 00174000
  175. * SAME TRACK ARE CHAINED TOGATHER BY THE TIC IN 00175000
  176. * THE PREVIOUS IOBLOK POINTING TO THE SET SECTOR CCW 00176000
  177. * IN THE NEXT IOBLOK. THE SET SECTOR CCW IS REPLACED BY 00177000
  178. * THE SEEK CCW. (EX. PAGES 1 5 9). 00178000
  179. * C. IOBLOKS FOR THE LAST RECORD OF ONE TRACK AND THE FIRST 00179000
  180. * RECORD OF AN OTHER TRACK ARE CHAINED TOGATHER BY THE 00180000
  181. * TIC ADDRESS IN THE PREVIOUS IOBLOK POINTING TO THE 00181000
  182. * SET SECTOR CCW IN THE NEXT IOBLOK. THE SET SECTOR 00182000
  183. * CCW IS REPLACED BY THE SEEK CCW. (EX. PAGE 3 TO 10). 00183000
  184. * D. ALL OTHER IOBLOKS ARE CHAINED TOGATHER BY THE TIC 00184000
  185. * ADDRESS OF PREVIOUS IOBLOK POINTING TO THE SEEK CCW 00185000
  186. * OF THE NEXT IOBLOK, WITH THE SET SECTOR CCW 00186000
  187. * FOLLOWING THE SEEK CCW. 00187000
  188. * (EX. PAGE 1 TO 3). 00188000
  189. * 00189000
  190. * E. EXAMPLE OF CALLS TO DMKPAG FOR PAGE IO. 00190000
  191. * PAGES - 57,24,20,16,8,5,3,6,43,1 00191000
  192. * SORTED BY DMKPAG -- 00192000
  193. * PAGES - 16,20,57,43,8,24,1,5,3,6 00193000
  194. * 00194000
  195. EJECT 00195000
  196. * 5C. 3330 - THE IOBLOKS FOR THE 3330 AND 3330-11 ARE SORTED 00196000
  197. * BY TRACK. 00197000
  198. * 00198000
  199. * NOTE: ON A 3330-1 AND 3330-11 DISK, YOU CAN NOT INCLUDE 00199000
  200. * A SEEK (OR SEEK HEAD) BETWEEN THE CCWS IN A STRING 00200000
  201. * (EVEN THOUGH THE HEAD NUMBER DOSEN'T CHANGE) WITHOUT 00201000
  202. * IT COSTING AN EXTRA REVOLUTION. A DUMMY RECORD OF 110 00202000
  203. * BYTES IS REQUIRED TO ALLOW SEEKS BETWEEN CCWS, BUT 00203000
  204. * HARDWARE SPEC. LIMITS THE DUMMY RECORD SIZE TO 101 00204000
  205. * BYTES. CP DMKFMT PROGRAM FORMATS CP DISK WITH 50 00205000
  206. * BYTE DUMMY RECORDS. 00206000
  207. * 00207000
  208. * TRACK/ TRK RCD NUMBER TRACK/ TRK RCD NUMBER 00208000
  209. * HEAD 1 2 3 HEAD 1 2 3 00209000
  210. * 00210000
  211. * 0 1 2 3 10 31 32 33 00211000
  212. * 1 4 5 6 11 34 35 36 00212000
  213. * 2 7 8 9 12 37 38 39 00213000
  214. * 3 10 11 12 13 40 41 42 00214000
  215. * 4 13 14 15 14 43 44 45 00215000
  216. * 5 16 17 18 15 46 47 48 00216000
  217. * 6 19 20 21 16 49 50 51 00217000
  218. * 7 22 23 24 17 52 53 54 00218000
  219. * 8 25 26 27 18 55 56 57 00219000
  220. * 9 28 29 30 |------PAGES-----| 00220000
  221. * |------PAGES-----| 00221000
  222. * 00222000
  223. * A. IOBLOKS FOR RECORDS ON THE SAME TRACK ARE CHAINED 00223000
  224. * TOGATHER BY THE TIC ADDRESS IN THE PREVIOUS IOBLOK 00224000
  225. * POINTING TO THE SEARCH ID EQUAL CCW OF THE NEXT IOBLOK 00225000
  226. * BYPASSING THE SEEK AND SET SECTOR CCWS (EX. PAGES 00226000
  227. * 22 23 24). 00227000
  228. * B. IOBLOKS FOR THE LAST RECORD OF ONE TRACK AND THE FIRST 00228000
  229. * RECORD OF AN OTHER TRACK ARE CHAINED TOGATHER BY THE 00229000
  230. * TIC ADDRESS IN THE PREVIOUS IOBLOK POINTING TO THE 00230000
  231. * SET SECTOR CCW IN THE NEXT IOBLOK. THE SET SECTOR 00231000
  232. * CCW IS REPLACED BY THE SEEK CCW. (EX. PAGE 3 TO 10). 00232000
  233. * C. ALL OTHER IOBLOKS ARE CHAINED TOGATHER BY THE TIC 00233000
  234. * ADDRESS OF PREVIOUS IOBLOK POINTING TO THE SEEK CCW 00234000
  235. * OF THE NEXT IOBLOK, WITH THE SET SECTOR CCW 00235000
  236. * FOLLOWING THE SEEK CCW. 00236000
  237. * (EX. PAGE 1 TO 3). 00237000
  238. * 00238000
  239. * D. EXAMPLE OF CALLS TO DMKPAG FOR PAGE IO. 00239000
  240. * PAGES - 51,9,4,6,18,49,17,16,50,8,7 00240000
  241. * SORTED BY DMKPAG -- 00241000
  242. * PAGES - 49,50,51,7,8,9,4,6,16,17,18 00242000
  243. * 00243000
  244. EJECT 00244000
  245. * 5D. 3340 - THE IOBLOKS FOR 3340 ARE SORTED BY 00245000
  246. * LOGICAL TRACKS (2 RECORDS PER LOGICAL TRACK) AND 00246000
  247. * IN AN EVEN/ODD TRACK SEQUENCE. 00247000
  248. * 00248000
  249. * NOTE: ON 3340 DISK, YOU CAN NOT INCLUDE A SEEK (OR SEEK 00249000
  250. * HEAD) BETWEEN THE CCWS IN A STRING (EVEN THOUGH THE 00250000
  251. * HEAD NUMBER DOESN'T CHANGE) WITHOUT IT COSTING AN 00251000
  252. * EXTRA REVOLUTION, WITH EXCEPTION OF CCWS CROSSING 00252000
  253. * INDEX POINT (HOME ADDRESS AND RECORD ZERO). 00253000
  254. * 00254000
  255. * | PAGE OR RECORD NUMBER | 00255000
  256. * TRACK OR HEAD |EVEN TRACKS | ODD TRACKS| TRACK OR HEAD 00256000
  257. * 0 | 1 | 2 | 3 | 4 | 1 00257000
  258. * 2 | 5 | 6 | 7 | 8 | 3 00258000
  259. * 4 | 9 | 10 | 11 | 12 | 5 00259000
  260. * 6 | 13 | 14 | 15 | 16 | 7 00260000
  261. * 8 | 17 | 18 | 19 | 20 | 9 00261000
  262. * 10 | 21 | 22 | 23 | 24 | 11 00262000
  263. * 00263000
  264. * SECTOR VALUES | 2 | 32 | 2 | 32 | 00264000
  265. * |LOGICAL TRK |LOGICAL TRK| 00265000
  266. * | ONE PHYSICAL TRACK | 00266000
  267. * 00267000
  268. * IOBLOKS ARE CHAINED TOGATHER WITH TICS IN THE 00268000
  269. * FOLLOWING WAY: 00269000
  270. * A. IOBLOKS FOR RECORDS ON THE SAME LOGICAL TRACK 00270000
  271. * WILL BE CHAINED TOGATHER BY THE TIC ADDRESS IN THE 00271000
  272. * PREVIOUS IOBLOK POINTING TO THE SEARCH ID EQUAL 00272000
  273. * COMMAND OF THE NEXT IOBLOK, BYPASSING THE SEEK 00273000
  274. * AND SET SECTOR COMMANDS. (EX. PAGES - 1 2 7 8 9 10) 00274000
  275. * B. IOBLOKS FOR THE LAST RECORD OF ONE EVEN/ODD TRACK 00275000
  276. * AND THE FIRST RECORD OF ANOTHER ODD/EVEN TRACK ARE 00276000
  277. * CHAINED TOGATHER BY THE TIC ADDRESS IN THE FIRST 00277000
  278. * IOBLOK POINTING TO THE SET SECTOR COMMAND IN THE 00278000
  279. * SECOND IOBLOK, AND THE SET SECTOR COMMAND OF THE 00279000
  280. * SECOND IOBLOK IS REPLACED BY A SEEK COMMAND. 00280000
  281. * (EXAMPLE - PAGE 2 TO 7 PAGE 20 TO 9). 00281000
  282. * C. ALL OTHER IOBLOKS ARE CHAINED TOGATHER BY THE 00282000
  283. * TIC ADDRESS IN THE PREVIOUS IOBLOK POINTING TO THE 00283000
  284. * SEEK COMMAND OF THE NEXT IOBLOK, WITH THE SET SECTOR 00284000
  285. * COMMAND FOLLOWING THE SEEK COMMAND. 00285000
  286. * (EX. PAGES - 1 7 9 15 18 21) 00286000
  287. * D. IOBLOKS FOR EVEN/ODD CYLINDERS ON THE 3340 70MB 00287000
  288. * DATA MODULE ARE TREATED AS SAME CYLINDER FOR THE SORT 00288000
  289. * (EXAMPLE-(0,1),(2,3),(4,5),(6,7),(694,695),(696,697)) 00289000
  290. * E. EXAMPLE OF CALLS TO DMKPAGIO FOR PAGE IO. 00290000
  291. * PAGES - 2 11 16 15 9 17 12 10 1 (6 REVOLUTIONS) 00291000
  292. * SORTED BY DMKPAG -- 00292000
  293. * PAGES - 1 2 11 12 9 10 15 16 17 (2.24 REVOLUTIONS) 00293000
  294. EJECT 00294000
  295. * 6. FOR REQUESTS FOR THE SAME SLOT, SORT BY REQUEST 00295000
  296. * PRIORITY. 00296000
  297. * 00297000
  298. * REQUEST PRIORITY 00298000
  299. * Q1, READ 0 00299000
  300. * Q2, READ 2 00300000
  301. * Q1, WRITE 4 00301000
  302. * Q2, WRITE 6 00302000
  303. * E1, READ 8 00303000
  304. * ¬E1, READ 10 00304000
  305. * E1, WRITE 12 00305000
  306. * ¬E1, WRITE 14 00306000
  307. * 00307000
  308. * 6A. CONTINUE WITH STEP 8. 00308000
  309. * 7. CALL DMKIOSQR TO INITIATE THE I/O 00309000
  310. * 8. DECREMENT AND TEST THE PAGEIO COUNT; IF IT IS ZERO, BAL TO 00310000
  311. * THE OVERHEAD CALCULATION SUBROUTINE DESCRIBED BELOW IN 00311000
  312. * SECTION C. 00312000
  313. * 9. GET THE NEXT CPEXBLOK ON THE QUEUE. IF ONE EXISTS, RESTART 00313000
  314. * WITH STEP 1; OTHERWISE, EXIT VIA A GOTO TO DISPATCH 00314000
  315. * 00315000
  316. * 5E. 3350 - THE IOBLOKS FOR THE 3350 ARE SORTED BY SLOTS 00316000
  317. * (4 SLOTS PER REVOLUTION) WITHIN A CYLINDER. 00317000
  318. * 00318000
  319. * NOTE: ON 3350 DISK, YOU CAN INCLUDE A SEEK HEAD COMMAND 00319000
  320. * BETWEEN CONSECUTIVE CCWS IN A STRING, WITHOUT THE LOSS 00320000
  321. * OF A DISK REVOLUTION WHEN A HEAD SWITCH OCCURS. 00321000
  322. * 00322000
  323. * TRACK/ SLOTS TRACK/ SLOTS 00323000
  324. * HEAD 1 2 3 4 HEAD 1 2 3 4 00324000
  325. * 00325000
  326. * 0 1 2 3 4 15 61 62 63 64 00326000
  327. * 1 5 6 7 8 16 65 66 67 68 00327000
  328. * 2 9 10 11 12 17 69 70 71 72 00328000
  329. * 3 13 14 15 16 18 73 74 75 76 00329000
  330. * 4 17 18 19 20 19 77 78 79 80 00330000
  331. * 5 21 22 23 24 20 81 82 83 84 00331000
  332. * 6 25 26 27 28 21 85 86 87 88 00332000
  333. * 7 29 30 31 32 22 89 90 91 92 00333000
  334. * 8 33 34 35 36 23 93 94 95 96 00334000
  335. * 9 37 38 39 40 24 97 98 99 100 00335000
  336. * 10 41 42 43 44 25 101 102 103 104 00336000
  337. * 11 45 46 47 48 26 105 106 107 108 00337000
  338. * 12 49 50 51 52 27 109 110 111 112 00338000
  339. * 13 53 54 55 56 28 113 114 115 116 00339000
  340. * 14 57 58 59 60 29 117 118 119 120 00340000
  341. * |-------PAGES------| |-------PAGES-------| 00341000
  342. * 00342000
  343. * 00343000
  344. * A. IOBLOKS FOR RECORDS ON THE SAME TRACK ARE CHAINED 00344000
  345. * TOGETHER BY THE TIC ADDRESS IN THE PREVIOUS IOBLOK 00345000
  346. * POINTING TO THE SEARCH ID EQUAL CCW OF THE NEXT IOBLOK 00346000
  347. * BYPASSING THE SEEK AND SET SECTOR CCWS (EX. PAGES 00347000
  348. * 33,34,36). 00348000
  349. * B. IOBLOKS WHICH ARE ADJACENT (SLOT WISE) AND NOT ON THE 00349000
  350. * SAME TRACK ARE CHAINED TOGETHER BY THE TIC IN 00350000
  351. * THE PREVIOUS IOBLOK POINTING TO THE SET SECTOR CCW 00351000
  352. * IN THE NEXT IOBLOK. THE SET SECTOR CCW IS REPLACED BY 00352000
  353. * THE SEEK CCW. (EX. PAGES 5,46,115). 00353000
  354. * C. IOBLOKS FOR THE LAST RECORD OF ONE TRACK AND THE FIRST 00354000
  355. * RECORD OF AN OTHER TRACK ARE CHAINED TOGETHER BY THE 00355000
  356. * TIC ADDRESS IN THE PREVIOUS IOBLOK POINTING TO THE 00356000
  357. * SET SECTOR CCW IN THE NEXT IOBLOK. THE SET SECTOR 00357000
  358. * CCW IS REPLACED BY THE SEEK CCW. (EX. PAGE 72 TO 101). 00358000
  359. * D. ALL OTHER IOBLOKS ARE CHAINED TOGETHER BY THE TIC 00359000
  360. * ADDRESS OF PREVIOUS IOBLOK POINTING TO THE SEEK CCW 00360000
  361. * OF THE NEXT IOBLOK, WITH THE SET SECTOR CCW 00361000
  362. * FOLLOWING THE SEEK CCW. 00362000
  363. * (EX. PAGE 1 TO 3). 00363000
  364. * 00364000
  365. * E. EXAMPLE OF CALLS TO DMKPAG FOR PAGE IO. 00365000
  366. * PAGES - 103,14,40,88,5,50,3,11,70,21 00366000
  367. * SORTED BY DMKPAG -- 00367000
  368. * PAGES - 5,14,103,40,21,50,3,88,70,11 00368000
  369. * 00369000
  370. SPACE 1 00370000
  371. * ERROR MESSAGE - 00371000
  372. * 00372000
  373. * DMKPAG415E CONTINUOUS PAGING ERRORS FROM DASD XXX 00373000
  374. * 00374000
  375. * THE ABOVE MESSAGE WILL BE ISSUED IF 5 CONSECTIVE 00375000
  376. * ERRORS HAVE OCCURED ON A PAGING DEVICE. THE SYSTEM 00376000
  377. * WILL THEN ENTER A DISABLED WAIT STATE. (CODE 00F) 00377000
  378. * 00378000
  379. *. 00379000
  380. EJECT 00380000
  381. COPY OPTIONS 00381000
  382. COPY LOCAL OPTIONS @V306638 00382000
  383. SPACE 2 00383000
  384. DMKPAG CSECT 00384000
  385. SPACE 3 00385000
  386. EXTRN DMKPTRRQ,DMKPTRWQ 00386000
  387. EXTRN DMKIOSQR 00387000
  388. EXTRN DMKSTKCP 00388000
  389. EXTRN DMKSTKMP @V407594 00389000
  390. EXTRN DMKSTKOP @V407594 00390000
  391. EXTRN DMKSTKIO @V408246 00391000
  392. EXTRN DMKCVTBH 00392000
  393. EXTRN DMKSCNRD @VA03787 00393000
  394. EXTRN DMKSYSOW 00394000
  395. EXTRN DMKMCHST @V407510 00395000
  396. EXTRN DMKCVTAB @VA04301 00396000
  397. EXTRN DMKPTRSS @V408246 00397000
  398. EXTRN DMKSCNRU @VA07455 00398000
  399. ENTRY DMKPAGSK @V408246 00399000
  400. ENTRY DMKPAGDP @V408246 00400000
  401. AIF (NOT &AP).NOAP10 @VA10137 00400100
  402. EXTRN DMKDSPRU @VA10805 00400310
  403. .NOAP10 ANOP @VA10137 00400500
  404. ENTRY DMKPAGQ 00401000
  405. ENTRY DMKPAGIO 00402000
  406. ENTRY DMKPAGQR @VA08859 00403000
  407. ENTRY DMKPAGST 00404000
  408. ENTRY DMKPAGPS,DMKPAGCC 00405000
  409. ENTRY DMKPAGWS @VMH0012 00406000
  410. ENTRY DMKPAGLO 00407000
  411. ENTRY DMKPAGHI 00408000
  412. EJECT 00409000
  413. USING PSA,R0 00410000
  414. USING CPEXBLOK,R1 00411000
  415. USING SWPFLAG,R5 00412000
  416. USING CORTABLE,R7 00413000
  417. USING RDEVBLOK,R8 00414000
  418. USING IOBLOK,R10 00415000
  419. USING VMBLOK,R11 00416000
  420. SPACE 00417000
  421. USING *,R12 00418000
  422. SPACE 00419000
  423. DMKPAGIO EQU * ENTERED VIA GOTO 00420000
  424. AIF (NOT &AP).NOAP1 **AIF*** 00421000
  425. TM APSTAT1,APUOPER RUNNING AS AP @V407594 00422000
  426. BZ NOUNLK NO @V407594 00423000
  427. CL R11,LASTUSER IS THIS LASTUSER @V407594 00424000
  428. BE NOUNLK YES, DO NOT UNLOCK @V407594 00425000
  429. CLC VMLOCK+2(2),LPUADDR LOCKED BY THIS PROCESSOR @V407594 00426000
  430. BNE NOUNLK NO, BYPASS UNLOCK @V407594 00427000
  431. LR R1,R11 VMBLOK TO R1 FOR UNLOCK @V407594 00428000
  432. LOCK RELEASE,TYPE=VMBLOK UNLOCK R11 AT ENTRY @V407594 00429000
  433. NOUNLK DS 0H @V407594 00430000
  434. .NOAP1 ANOP **ANOP** 00431000
  435. L R13,=A(DMKPTRRQ) POINT TO Q OF PAGE READ REQUESTS 00432000
  436. GETQ L R1,PREFIXA ACCESS ABSOLUTE PSA @V407594 00433000
  437. CLI XTNDLOCK-PSA(R1),0 SYSTEM EXTENDING @V407594 00434000
  438. BE CKQ NO -- PROCEED AS USUAL 00435000
  439. L R13,=A(DMKPTRWQ) POINT TO WRITE QUEUE 00436000
  440. L R1,0(,R13) GET 1ST REQUEST 00437000
  441. LTR R1,R1 ANY ?? 00438000
  442. BNP EXITX NO -- ONE COMING SOON, HOPEFULLY 00439000
  443. B DOIO YES -- START IT OUT -- 00440000
  444. SPACE 00441000
  445. CKQ L R1,0(,R13) GET NEXT REQUEST 00442000
  446. LTR R1,R1 ANYTHING THERE 00443000
  447. BP DOIO YES -- SET UP FOR I/O 00444000
  448. BM EXITX END OF THE LINE -- EXIT NOW 00445000
  449. LA R13,4(,R13) FINISHED WITH THIS QUEUE - TEST NEXT 00446000
  450. B GETQ .... 00447000
  451. SPACE 00448000
  452. DOIO EQU * START UP I/O FOR THIS PAGE 00449000
  453. L R2,DMKPAGCC COUNT PAGE I/O REQUESTS 00450000
  454. AL R2,F1 ... 00451000
  455. ST R2,DMKPAGCC .. 00452000
  456. L R0,CPEXFPNT POINT TO NEXT QUEUED REQUEST 00453000
  457. ST R0,0(,R13) AND MAKE IT 1ST IN LINE 00454000
  458. CHARGE SWITCH,CPEXR11 CHARGE I/O TO CORRECT USER @V407594 00455000
  459. L R2,DMKPAGQ POINT TO FIRST ENTRY IN IN-TRANSIT QUEUE 00456000
  460. LA R3,DMKPAGQ POINT TO QUEUE ANCHOR 00457000
  461. ST R1,DMKPAGQ MAKE NEW ENTRY FIRST ON QUEUE 00458000
  462. ST R1,CPEXBPNT-CPEXBLOK(,R2) UPDATE BACKCHAIN OF OLD 1ST E 00459000
  463. STM R2,R3,CPEXFPNT PLACE NEW ENTRY IN CHAIN 00460000
  464. SLR R0,R0 CLEAR OUT 00461000
  465. ST R0,CPEXMISC RELATED TASK CHAIN 00462000
  466. L R10,IOBSTACK GET A PREFORMATTED IOBLOK 00463000
  467. LTR R10,R10 HAVE ANY ?? 00464000
  468. BNP GETIOBLK NO -- MAKE UP A NEW ONE @V2A2029 00465000
  469. LM R5,R6,MODELSS GET MODEL SET SECTOR CCW @V2A2029 00466000
  470. ALR R5,R10 ADJUST DATA ADDRESS @V2A2029 00467000
  471. STM R5,R6,PAGESS AND STORE IN PAGE IOBLOK @V2A2029 00468000
  472. B SETRWCCW GO SET UP READ/WRITE CCW @V2A2029 00469000
  473. DROP R10 NO -- MAKE UP A NEW ONE 00470000
  474. EJECT 00471000
  475. GETIOBLK LR R10,R1 SAVE ADDRESS OF CPEXBLOK @V2A2029 00472000
  476. LA R0,PAGESIZE FIRST, GET SOME 00473000
  477. CALL DMKFREE FREE STORAGE 00474000
  478. LR R14,R1 AND USE R14 FOR TEMPORARY 00475000
  479. USING IOBLOK,R14 ADDRESSABILITY 00476000
  480. LR R15,R10 SAVE ADDRESS OF CPEXBLOK .. 00477000
  481. XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR ENTIRE IOBLOK 00478000
  482. LA R4,WAITPAGE GET ADDRESS FOR IOBIRA 00479000
  483. LA R5,PAGECCWS GET ADDRESS OF CHANNEL PROGRAM FOR IOBCAW 00480000
  484. ST R4,IOBIRA SET UP IRA RETURN ADDRESS 00481000
  485. ST R5,IOBCAW STORE CAW ADDRESS FOR PAGING CHAN. PROG. 00482000
  486. ST R14,IOBLINK IN CASE NEW IOB GETS CHAINED 1ST @V407438 00483000
  487. SPACE 00484000
  488. LM R0,R11,MODELCCW GET PROTOTYPE PAGING CCWS 00485000
  489. ALR R0,R14 ADJUST ADDRESS IN SEEK 00486000
  490. ALR R2,R14 IN SET SECTOR 00487000
  491. ALR R4,R14 IN SEARCH 00488000
  492. ALR R6,R14 AND IN TIC 00489000
  493. STM R0,R11,PAGECCWS AND SAVE IN IOBLOK EXTENSION 00490000
  494. LR R1,R15 RESTORE ADDRESSABILITY FOR CPEXBLOK 00491000
  495. L R11,CPEXR11 AND FOR USER'S VMBLOK 00492000
  496. DROP R14 ABANDON TEMPORARY ADDRESSABILITY 00493000
  497. LR R10,R14 AND REESTABLISH STANDARD 00494000
  498. USING IOBLOK,R10 00495000
  499. EJECT 00496000
  500. SETRWCCW EQU * HERE DIRECTLY TO SET UP CCW IN FORMATTED IOBLOK 00497000
  501. L R5,CPEXR5 GET ADDRESS OF SWPTABLE ENTRY 00498000
  502. L R7,CPEXR7 AND OF CORTABLE ENTRY 00499000
  503. OI SWPFLAG,SWPTRANS FLAG VIRTUAL PAGE IN TRANSIT 00500000
  504. L R0,IOBMISC GET NEXT IOBLOK IN STACK 00501000
  505. ST R0,IOBSTACK AND MAKE IT FIRST 00502000
  506. ST R1,IOBMISC SAVE POINTER TO TRANSIT CPEXBLOK 00503000
  507. SL R7,ACORETBL GET PAGE FRAME ADDRESS/256 00504000
  508. SLL R7,8 GET PAGE FRAME ADDRESS 00505000
  509. ICM R7,B'1000',CPEXR0+3 GET DASD OP-CODE FROM SAVED GPR0 00506000
  510. ST R7,PAGERW AND SET 1ST HALF OF R/W CCW 00507000
  511. MVI PAGERW+4,CC MAKE SURE FLAGS ARE CORRECT @V408246 00508000
  512. MVC IOBUSER,ASYSVM CHARGE IOB UNSTACK TO SYSTEM @VA07397 00509000
  513. SLR R0,R0 CLEAR OUT 00510000
  514. ST R0,IOBRADD ADDRESS, FLAGS AND STATUS 00511000
  515. OI IOBFLAG,IOBPAG+IOBCP FLAG AS PAGING IOBLOK 00512000
  516. ST R0,IOBCYL CLEAR CYLINDER AND RETRY COUNT 00513000
  517. SLR R8,R8 CLEAR DEVICE REGISTER @V408246 00514000
  518. IC R8,SWPCODE GET VOLUME CODE @V408246 00515000
  519. SLL R8,3 CONVERT TO INDEX FOR OWNDLIST @V408246 00516000
  520. AL R8,=A(DMKSYSOW) INDEX TO CORRECT ENTRY @V408246 00517000
  521. LH R8,OWNDRDEV-OWNDLIST(,R8) GET INDEX TO RDEVBLOK @V408246 00518000
  522. LTR R8,R8 IS IT STILL THERE? @V408246 00519000
  523. BNM CHKWRIT YES @V408246 00520000
  524. MVI IOBSTAT,IOBFATAL+IOBCC3 NO, FLAG FATAL I/O @V408246 00521000
  525. OI SWPFLAG,SWPRECMP BYPASS SYSTEM FALURE @V408246 00522000
  526. SR R0,R0 @V408246 00523000
  527. ST R0,PAGEIOB CLEAR CHAINING FIELD @V408246 00524000
  528. LR R1,R10 GET IOBLOK POINTER @V408246 00525000
  529. CALL DMKSTKIO AND STACK BLOCK @V408246 00526000
  530. B GETQ LOOK FOR MORE REQUESTS @V408246 00527000
  531. SPACE 3 00528000
  532. CHKWRIT DS 0H @V408246 00529000
  533. MVI PAGEPRI,0 INITIALIZE PRIORITY @V408246 00530000
  534. CLI PAGERW,X'05' PAGE WRITE ?? 00531000
  535. BNE GETRDEV NO -- 00532000
  536. L R3,PAGESOUT COUNT PENDING SWAPS 00533000
  537. LA R3,1(,R3) ... 00534000
  538. ST R3,PAGESOUT ... 00535000
  539. OI PAGEPRI,4 SET-UP WRITE PRIORITY @V408246 00536000
  540. SPACE 00537000
  541. GETRDEV EQU * 00538000
  542. TM VMQLEVEL,VMQ1 FOR Q1? @V408246 00539000
  543. BO *+8 YES @V408246 00540000
  544. OI PAGEPRI,2 NO, ADD IN Q2 PRIORITY @V408246 00541000
  545. TM VMDSTAT,VMINQ IN-Q? @V408246 00542000
  546. BO *+8 YES @V408246 00543000
  547. OI PAGEPRI,8 NO, ADD IN NOT IN-Q PRIORITY @V408246 00544000
  548. SLL R8,3(0) CONVERT TO BYTE INDEX @V200820 00545000
  549. AL R8,ARIODV POINT TO CORRECT RDEVBLOK 00546000
  550. AIF (NOT &AP).NOAP2 **AIF*** 00547000
  551. LA R1,RDEVIOBL POINT TO RDEV LOCK WORD @V407594 00548000
  552. LOCK OBTAIN,TYPE=PRIVATE,SPIN=YES LOCK RDEVBLOK @V407594 00549000
  553. .NOAP2 ANOP **ANOP** 00550000
  554. SPACE 00551000
  555. SR R3,R3 CLEAR INDEX REGISTER 00552000
  556. IC R3,SWPDPAGE AND GET PAGE NUMBER 00553000
  557. SR R2,R2 CLEAR FOR DIVIDE 00554000
  558. BCTR R3,0 AND GET PAGE NUMBER-1 00555000
  559. CLI RDEVTYPE,TYP2314 PAGING ON 2314/2319 ? @VM01167 00556000
  560. BE PAG2314 YES -- 00557000
  561. SPACE 00558000
  562. CLI RDEVTYPE,TYP3340 PAGING ON 3340 ? @VM01167 00559000
  563. BE PAG3340 YES - BRANCH @V2A2029 00560000
  564. SPACE 00561000
  565. CLI RDEVTYPE,TYP3350 PAGING ON 3350 ? @V304498 00562000
  566. BE PAG3350 YES, CALCULATE HEAD NUMBER @V304498 00563000
  567. SPACE 1 00564000
  568. CLI RDEVTYPE,TYP3375 Paging on 3375 ? HRC106DK 00564100
  569. BE PAG3375 Yes, calculate head number HRC106DK 00564200
  570. SPACE 1 HRC106DK 00564300
  571. CLI RDEVTYPE,TYP3380 Paging on 3380 ? HRC106DK 00564400
  572. BE PAG3380 Yes, calculate head number HRC106DK 00564500
  573. SPACE 1 HRC106DK 00564600
  574. D R2,F3 CALCULATE HEAD NUMBER 00565000
  575. LA R1,SECT3330 SECTOR TABLE FOR 3330 @VM01167 00566000
  576. CLI RDEVTYPE,TYP2305 IS IT A 2305 00567000
  577. BNE GETSECTR NO -- GO CALCULATE SECTOR 00568000
  578. LA R1,SEC23052 SECTOR TABLE FOR 2305 M2 @VM01167 00569000
  579. CLI RDEVMDL,MODEL1 2305 MODEL 1 ?? 00570000
  580. BNE GETSECTR NO -- TO CALCULATE SECTOR @VM01167 00571000
  581. LA R1,SEC23051 SECTOR TABLE FOR 2305 M1 @VM01167 00572000
  582. B GETSECTR GO SET SECTOR @V2A2029 00573000
  583. SPACE 00574000
  584. PAG3340 D R2,F2 CALCULATE HEAD NUMBER @V2A2029 00575000
  585. LA R1,SECT3340 SECTOR TABLE FOR 3340 @VM01167 00576000
  586. LA R14,ONE SLOT NUMBER FOR 1ST EVEN HEAD @VM01167 00577000
  587. TM SWPDPAGE,BIT6+BIT7 IS THIS A EVEN HEAD NUMBER ? @VM01167 00578000
  588. BM SORTSLOT YES - LEAVE AS ONE @VM01167 00579000
  589. AR R14,R14 SET SLOT NUMBER FOR 1ST ODD HEAD @V2A2029 00580000
  590. SORTSLOT STC R14,PAGESRCD AND SAVE FOR SORTING @VM01167 00581000
  591. B GETSECTV GET SECTOR VALUE @VM01167 00582000
  592. SPACE 00583000
  593. PAG3350 D R2,F4 CALCULATE HEAD NUMBER @V304498 00584000
  594. LA R1,SECT3350 SECTOR TABLE 3350 @V304498 00585000
  595. SPACE 1 00586000
  596. B GETSECTR HRC106DK 00586050
  597. SPACE 1 HRC106DK 00586100
  598. PAG3375 D R2,F8 Calculate head number HRC106DK 00586150
  599. LA R1,SECT3375 Sector table 3375 HRC106DK 00586200
  600. B GETSECTR HRC106DK 00586250
  601. SPACE 1 HRC106DK 00586300
  602. PAG3380 D R2,F10 Calculate head number HRC106DK 00586350
  603. LA R1,SECT3380 Sector table 3380 HRC106DK 00586400
  604. SPACE 1 HRC106DK 00586450
  605. GETSECTR LA R9,1(,R2) GET SLOT NUMBER @VA04482 00587000
  606. STC R9,PAGESRCD AND SAVE FOR SORTING @VM01167 00588000
  607. GETSECTV SLL R3,16 HEAD NUMBER TO HIGH BYTES @VM01167 00589000
  608. IC R3,0(R2,R1) GET SECTOR VALUE FOR THIS RECORD @VM01167 00590000
  609. ICM R3,B'0010',SWPDPAGE INSERT RECORD NUMBER 00591000
  610. B SETADDR GO JOIN COMMON CODE BELOW 00592000
  611. SPACE 00593000
  612. PAG2314 EQU * HERE FOR 2314 CHANNEL PROGRAM 00594000
  613. MVI PAGESS,NOPCODE NOP THE SET SECTOR COMMAND @VM01167 00595000
  614. LA R1,HDTABLE(R3) POINT TO HEAD NUMBER FOR PAGE 00596000
  615. D R2,F8 GET SLOT NUMBER (REMAINDER IN GPR 2) 00597000
  616. LR R3,R2 SAVE IN GPR3 00598000
  617. ICM R3,B'0100',0(R1) INSERT HEAD NUMBER IN BYTE 1 00599000
  618. ICM R3,B'0010',SWPDPAGE INSERT RECORD NUMBER IN BYTE 2 00600000
  619. SPACE 00601000
  620. SETADDR LH R2,SWPCYL GET CYLINDER NUMBER 00602000
  621. STM R2,R3,PAGESEEK STORE SEEK ADDRESS IN TASK 00603000
  622. STH R2,IOBCYL SET CYLINDER IN IOBLOK 00604000
  623. CLI RDEVTYPE,TYP3340 PAGING ON 3340 ? @VM01167 00605000
  624. BNE CK2305 NO, CHECK 2305 @VM01167 00606000
  625. TM RDEVFTR,FTR70MB 2 LOGICAL CYLINDERS/PHYSICAL ? @VM01167 00607000
  626. BZ SLOTSORT NO, MUST BE 35MB @VM01167 00608000
  627. NI IOBCYL+1,X'FF'-BIT7 FORCE SORT ON EVEN CYLINDERS@VM01167 00609000
  628. B SLOTSORT GO LOCATE IOBLOK FOR THIS CYL @VM01167 00610000
  629. CK2305 CLI RDEVTYPE,TYP2305 PAGING ON 2305? @VA03430 00611000
  630. BNE SLOTSORT NO -- DO CYLINDER ORIENTED SLOT SORT 00612000
  631. SLR R1,R1 FORCE CYLINDER 0 00613000
  632. STH R1,IOBCYL ... 00614000
  633. SPACE 00615000
  634. SLOTSORT LR R2,R8 SAVE ADDRESS OF RDEVBLOK 00616000
  635. LH R1,IOBCYL GET CYLINDER NUMBER FOR COMPARE HALF 00617000
  636. SPACE 00618000
  637. FINDIOB L R3,IOBFPNT-IOBLOK(,R2) LOOK FOR AN IOBLOK FOR SAME CYL 00619000
  638. CR R3,R8 ANY MORE ON CHAIN 00620000
  639. BE QUEUEIO NO -- NEED A SEPARATE SIO 00621000
  640. TM IOBFLAG-IOBLOK(R3),IOBPAG PAGING I/O TASK ?? 00622000
  641. BZ FINDIOB2 NO -- KEEP LOOKING 00623000
  642. TM IOBSTAT-IOBLOK(R3),IOBMINI IS THIS A MINI IOB? @V407438 00624000
  643. BO FINDIOB2 YES, THEN SKIP IT TOO... @V407438 00625000
  644. CH R1,IOBCYL-IOBLOK(,R3) IO FOR SAME CYLINDER ?? 00626000
  645. BE SORTIT YES -- GO DO SLOT SORTING 00627000
  646. BL QUEUEIO NO -- LOOK NO FARTHER 00628000
  647. FINDIOB2 LR R2,R3 SAVE BACK CHAIN POINTER 00629000
  648. B FINDIOB AND KEEP LOOKING 00630000
  649. SPACE 00631000
  650. SORTIT SR R2,R2 CLEAR BACKCHAIN POINTER 00632000
  651. SR R6,R6 CLEAR OLD BACK POINTER @V408246 00633000
  652. CLI RDEVTYPE,TYP2305 2305 DEVICE TYPE ? @VM01167 00634000
  653. BE PAGE2305 YES - @VM01167 00635000
  654. CLI RDEVTYPE,TYP3350 3350 DEVICE ? @V304498 00636000
  655. BE SORT3350 YES, SLOT SORT WITHIN CYLINDER(S)@V304498 00637000
  656. CLI RDEVTYPE,TYP3375 3375 device ? HRC106DK 00637100
  657. BE SORT3375 Yes, slot sort within cylinder(s)HRC106DK 00637200
  658. CLI RDEVTYPE,TYP3380 3380 device ? HRC106DK 00637300
  659. BE SORT3380 Yes, slot sort within cylinder(s)HRC106DK 00637400
  660. CLI RDEVTYPE,TYP3330 3330 DEVICE TYPE ? @VM01167 00638000
  661. BE PAGE3330 YES - @VM01167 00639000
  662. CLI RDEVTYPE,TYP3340 3340 DEVICE TYPE ? @VM01167 00640000
  663. BE PAGE3340 YES - @VM01167 00641000
  664. CLI RDEVTYPE,TYP2314 2314/2319 DEVICE TYPE ? @VM01167 00642000
  665. BNE QUEUEIO NO - GO QUEUE IOBLOK @VM01167 00643000
  666. LA R15,CCW2314 YES, GET ADDRESS OF CHAIN ROUTINE@VM01167 00644000
  667. B PAGE2314 ENTER 2314 SORT ROUTINE @VM01167 00645000
  668. SPACE 00646000
  669. * CHAIN TIC IN IOBLOK(R2) TO CORRECT CCW IN NEXT IOBLOK(R10) 00647000
  670. SPACE 00648000
  671. CCW2314 LA R5,PAGESRCH ADDR OF SEARCH ID EQUAL CCW(R10) @VM01167 00649000
  672. CLC PAGEHEAD,PAGEHEAD-IOBLOK(R2) SAME TRACK/HEAD ? @VM01167 00650000
  673. BNE SK2314 NO, MUST TIC TO SEEK @VA03674 00651000
  674. CLC PAGERCD,PAGERCD-IOBLOK(R2) ASCENDING RECORDS? @VA03674 00652000
  675. BH TIC2314 YES, TIC TO SEARCH ID EQUAL CCW @VA03674 00653000
  676. SK2314 LA R5,PAGESS NO, TIC TO SET SECTOR CCW SLOT @VA03674 00654000
  677. MVC PAGESS,PAGESK OVERLAY SET SECTOR WITH SEEK CCW @VM01167 00655000
  678. TIC2314 ST R5,PAGESNS-IOBLOK(,R2) INSERT 'TIC TO' ADDRESS @VM01167 00656000
  679. MVI PAGESNS-IOBLOK(R2),TICOP MOVE IN TIC OP-CODE(08)@VM01167 00657000
  680. BR R14 RETURN TO CALLER @VM01167 00658000
  681. SPACE 00659000
  682. SORT3350 LA R15,CCW3350 3350 CHAIN IOBLOK ROUTINE @V304498 00660000
  683. MVI LASTSLOT,4 Highest slot number for 3350 HRC106DK 00660100
  684. B SORT2305 PERFORM 3350 SLOT SORT @V304498 00661000
  685. SORT3375 LA R15,CCW3350 3350/75/80 chain IOBLOK routine HRC106DK 00661100
  686. MVI LASTSLOT,8 Highest slot number for 3375 HRC106DK 00661200
  687. B SORT2305 Perform 3375 slot sort HRC106DK 00661300
  688. SORT3380 LA R15,CCW3350 3350/75/80 chain IOBLOK routine HRC106DK 00661400
  689. MVI LASTSLOT,10 Highest slot number for 3380 HRC106DK 00661500
  690. B SORT2305 Perform 3380 slot sort HRC106DK 00661600
  691. PAGE2305 LA R15,CCW2305 2305 CHAIN IOBLOK ROUTINE @VM01167 00662000
  692. PAGE2314 EQU * 2314/2319 CHAIN IOBLOK ROUTINE @VM01167 00663000
  693. SORT2305 CLC PAGESECT,PAGESECT-IOBLOK(R3) COMPARE SECTORS @VM01167 00664000
  694. BL INIOB LOW, SORT IN ASENDING ORDER @VM01167 00665000
  695. BE CHKPRI EQUAL, CHECK PRIORITY ORDER @V408246 00666000
  696. LR R2,R3 SAVE BACKCHAIN ADDRESS @VM01167 00667000
  697. L R3,PAGEIOB-IOBLOK(R2) GET NEXT IOBLOK @V408246 00668000
  698. LTR R3,R3 IS THERE ONE? @V408246 00669000
  699. BZ ENDIOB END OF CHAIN - INSERT HERE @VM01167 00670000
  700. CLC PAGESECT-IOBLOK(,R2),PAGESECT-IOBLOK(R3) @VM01167 00671000
  701. BNL INIOB BREAK IN ORDER, INSERT IOBLOK @VM01167 00672000
  702. B SORT2305 TRY AGAIN @VM01167 00673000
  703. SPACE 00674000
  704. CHKPRI DS 0H @V408246 00675000
  705. CLC PAGEPRI(1),PAGEPRI-IOBLOK(R3) BETTER PRIORITY? @V408246 00676000
  706. BNL SKIPIT NO @V408246 00677000
  707. LR R6,R3 YES, SAVE OLD BLOCK @V408246 00678000
  708. LTR R2,R2 REORDERING 1ST REQUEST? @V408246 00679000
  709. BNZ PRIODRA NO @V408246 00680000
  710. L R3,PAGEIOB-IOBLOK(R3) NEXT POINTER @V408246 00681000
  711. LTR R3,R3 IS THERE ONE ? @V408246 00682000
  712. BZ PRIODR NONE @V408246 00683000
  713. MVC IOBFPNT-IOBLOK(8,R3),IOBFPNT-IOBLOK(R6) VALID @V408246 00684000
  714. * UNCHAINING INFO 00685000
  715. B INIOB UNCHAIN AND RECHAIN @V408246 00686000
  716. PRIODR DS 0H REPLACING 1ST AND ONLY REQUEST @V408246 00687000
  717. LR R3,R6 RESTORE ONLY POINTER @V408246 00688000
  718. SR R6,R6 CLEAR REPLACED POINTER @V408246 00689000
  719. B INIOB MEARGE IN @V408246 00690000
  720. PRIODRA DS 0H @V408246 00691000
  721. L R3,PAGEIOB-IOBLOK(R3) NEXT POINTER @V408246 00692000
  722. LTR R3,R3 IS TEHERE ONE ? @V408246 00693000
  723. BNZ INIOB OK, CHAIN IN @V408246 00694000
  724. B ENDIOB LAST REQUEST @V408246 00695000
  725. * 00696000
  726. SKIPIT LR R2,R3 SAVE BACKCHAIN ADDRESS @VM01167 00697000
  727. L R3,PAGEIOB-IOBLOK(R2) GET NEXT IOBLOK @V408246 00698000
  728. LTR R3,R3 IS THERE ONE ? @V408246 00699000
  729. BZ ENDIOB END OF CHAIN - INSERT HERE @VM01167 00700000
  730. CLC PAGESECT-IOBLOK(,R3),PAGESECT-IOBLOK(R2) @VM01167 00701000
  731. BNH SORT2305 BREAK IN ORDER - SORT @VM01167 00702000
  732. B SKIPIT TRY NEXT IOBLOK @VM01167 00703000
  733. SPACE 00704000
  734. * CHAIN TIC IN IOBLOK(R2) TO CORRECT CCW IN NEXT IOBLOK(R10) 00705000
  735. SPACE 00706000
  736. CCW2305 LA R5,PAGESK ADDRESS OF SEEK CCW @VM01167 00707000
  737. CLI DMKPAGDP,X'FF' PCI DRUM FLAG SET ? @VA07060 00708000
  738. BE *+8 YES @VA07060 00709000
  739. OI PAGESK+4,8 YES, PCI ON ALL 2305 REQUESTS @V408246 00710000
  740. CLI PAGESRCD,ONE IS THIS RECORD ONE ? @VM01167 00711000
  741. BE RCDONE YES, CHECK PREVIOUS RECORD @VM01167 00712000
  742. CLC PAGESRCD,PAGESRCD-IOBLOK(R2) ADJACENT RECORDS @VM01167 00713000
  743. BNH TIC2305 NO,CHAIN IN SEEK AND SECTOR CCWS @VM01167 00714000
  744. CLC PAGECYL,PAGECYL-IOBLOK(R2) SAME CYLINDER ? @VM01167 00715000
  745. BNE SK2305 NO-ADJACENT RECORDS-DIFFERENT CYL@VM01167 00716000
  746. LA R5,PAGESRCH ADDRESS OF SEARCH ID EQUAL CCW @VM01167 00717000
  747. CLC PAGEHEAD-IOBLOK(,R2),PAGEHEAD SAME TRACK/HEAD ? @VM01167 00718000
  748. BE TIC2305 YES, SAME TRACK AND ADJACENT @VM01167 00719000
  749. * RECORDS - TIC TO SEARCH ID EQUAL CCW 00720000
  750. B SK2305 CHAIN TO SEEK WITHOUT SET SECTOR @VM01167 00721000
  751. SPACE 00722000
  752. RCDONE DS 0H @V408246 00723000
  753. OI PAGESK+4,8 PCI START OF SLOT 1 REQUEST @V408246 00724000
  754. CLI PAGESRCD-IOBLOK(R2),THREE PRIOR IOB FOR SLOT 3? @V408246 00725000
  755. BNE TIC2305 NO,CHAIN IN SEEK AND SECTOR CCWS @VM01167 00726000
  756. SK2305 LA R5,PAGESS ADDRESS OF SET SECTOR CCW @VM01167 00727000
  757. MVC PAGESS,PAGESK OVERLAY SET SECTOR WITH SEEK CCW @VM01167 00728000
  758. TIC2305 ST R5,PAGESNS-IOBLOK(,R2) STORE 'TIC TO' ADDRESS @VM01167 00729000
  759. MVI PAGESNS-IOBLOK(R2),TICOP MOVE IN TIC OP-CODE @VM01167 00730000
  760. BR R14 RETURN TO CALLER @VM01167 00731000
  761. SPACE 00732000
  762. PAGE3330 LA R15,CCW3330 3330 CHAIN IOBLOK ROUTINE @VM01167 00733000
  763. SORT3330 CLC PAGEHEAD,PAGEHEAD-IOBLOK(R3) SAME TRACK/HEAD ? @VM01167 00734000
  764. BE EQ3330 YES - SORT BY RECORD NUMBER @VM01167 00735000
  765. NXT3330 LR R2,R3 SAVEBACK CHAIN ADDRESS @VM01167 00736000
  766. L R3,PAGEIOB-IOBLOK(R2) GET NEXT IOBLOK @V408246 00737000
  767. LTR R3,R3 IS THERE ONE ? @V408246 00738000
  768. BZ ENDIOB END OF CHAIN - INSERT @VM01167 00739000
  769. B SORT3330 SORT WITH THIS TASK @VM01167 00740000
  770. SPACE 00741000
  771. EQ3330 CLC PAGERCD,PAGERCD-IOBLOK(R3) COMPARE RECORDS @VM01167 00742000
  772. BL INIOB LOW - INSERT IOBLOK HERE @VM01167 00743000
  773. LR R2,R3 SAVE BACK CHAIN ADDRESS @VM01167 00744000
  774. L R3,PAGEIOB-IOBLOK(R2) GET NEXT IOBLOK @V408246 00745000
  775. LTR R3,R3 IS THERE ONE ? @V408246 00746000
  776. BZ ENDIOB END OF CHAIN - INSERT HERE @VM01167 00747000
  777. CLC PAGEHEAD,PAGEHEAD-IOBLOK(R3) SAME TRACK/HEAD ? @VM01167 00748000
  778. BE EQ3330 YES - SAME TRACK/HEAD @VM01167 00749000
  779. B INIOB HIGH - INSERT IOBLOK HERE @VM01167 00750000
  780. SPACE 00751000
  781. * CHAIN TIC IN IOBLOK(R2) TO CORRECT CCW IN NEXT IOBLOK(R10) 00752000
  782. SPACE 00753000
  783. CCW3330 LA R5,PAGESK ADDRESS OF SEEK CCW @VM01167 00754000
  784. OI PAGESK+4,8 PCI START OF FOLLOWING REQUEST @V408246 00755000
  785. CLC PAGEHEAD,PAGEHEAD-IOBLOK(R2) SAME TRACK/HEAD ? @VM01167 00756000
  786. BNE UNEQHD NO, CHECK FOR SLOT 3 TO SLOT 1 @VA04482 00757000
  787. IC R4,PAGERCD-IOBLOK(,R2) GET RECORD NUMBER @VM01167 00758000
  788. LA R4,1(,R4) UPDATE BY ONE @VM01167 00759000
  789. CLM R4,B'0001',PAGERCD ADJACENT RECORDS ? @VM01167 00760000
  790. BNE TICSETS NO, TIC TO SET SECTOR @VA04482 00761000
  791. LA R5,PAGESRCH YES, TIC TO SEARCH ID EQUAL CCW @VM01167 00762000
  792. B CHAINTIC GO STORE TIC ADDRESS @VM01167 00763000
  793. UNEQHD CLI PAGESRCD-IOBLOK(R2),THREE PRIOR IOB FOR SLOT 3? @VA04482 00764000
  794. BNE CHAINTIC NO - TIC TO SEEK AND SET SETOR @VM01167 00765000
  795. CLI PAGESRCD,ONE IS THIS REQUEST FOR SLOT 1 @VA04482 00766000
  796. BNE CHAINTIC NO - TIC TO SEEK AND SET SECTOR @VM01167 00767000
  797. MVC PAGESS,PAGESK OVERLAY SET SECTOR WITH SEEK @VM01167 00768000
  798. TICSETS LA R5,PAGESS SET TIC ADDRESS TO SET SECTOR @VA04482 00769000
  799. CHAINTIC ST R5,PAGESNS-IOBLOK(,R2) STORE 'TIC TO' ADDRESS @VM01167 00770000
  800. MVI PAGESNS-IOBLOK(R2),TICOP MOVE IN TIC OP-CODE(08)@VM01167 00771000
  801. BR R14 RETURN TO CALLER @VM01167 00772000
  802. SPACE 00773000
  803. PAGE3340 LA R15,CCW3340 3340 CHAIN IOBLOK ROUTINE @VM01167 00774000
  804. SPACE 00775000
  805. SORT3340 CLC PAGESRCD,PAGESRCD-IOBLOK(R3) COMPARE @VM01167 00776000
  806. * 3340 SLOT NUMBERS 00777000
  807. BL INIOB LOW- SORT IN ASCENDING ORDER @VM01167 00778000
  808. BE EQ3340 SLOT EQUAL - CHECK FOR EQUAL HEAD@V2A2029 00779000
  809. NXT3340 LR R2,R3 SAVE BACKCHAIN ADDRESS @V2A2029 00780000
  810. L R3,PAGEIOB-IOBLOK(R2) NEXT SORTED TASK @V408246 00781000
  811. LTR R3,R3 END OF CHAIN ? @V408246 00782000
  812. BZ ENDIOB END OF CHAIN - INSERT IOBLOK @VM01167 00783000
  813. B SORT3340 TRY NEXT TASK @V2A2029 00784000
  814. SPACE 00785000
  815. EQ3340 CLC PAGECYL,PAGECYL-IOBLOK(R3) SAME CYLINDER ? @VM01167 00786000
  816. BNE UPDT3340 NO, UPDATE SLOT VALUE @VM01167 00787000
  817. CLC PAGEHEAD,PAGEHEAD-IOBLOK(R3) COMPARE LOGICAL @VM01167 00788000
  818. * HEADS ? 00789000
  819. BE EQHEADS BRANCH - HEADS EQUAL @V2A2029 00790000
  820. UPDT3340 IC R4,PAGESRCD GET SLOT NUMBER @VM01167 00791000
  821. LA R4,2(,R4) AND UPDATE TO NEXT SLOT (PLUS 2) @V2A2029 00792000
  822. STC R4,PAGESRCD AND SAVE @VM01167 00793000
  823. B NXT3340 TRY NEXT 3340 TASK @V2A2029 00794000
  824. SPACE 00795000
  825. EQHEADS CLC PAGESECT,PAGESECT-IOBLOK(R3) COMPARE SECTORS @VM01167 00796000
  826. BL INIOB LOWER- INSERT BEFORE R3 @VM01167 00797000
  827. LR R2,R3 SAVE BACKCHAIN ADDRESS @V2A2029 00798000
  828. L R3,PAGEIOB-IOBLOK(R2) NEXT TASK ADDRESS @V408246 00799000
  829. LTR R3,R3 END OF CHAIN ? @V408246 00800000
  830. BZ ENDIOB END OF CHAIN - INSERT IT @VM01167 00801000
  831. B INIOB CORRECT SLOT - INSERT HERE @VM01167 00802000
  832. SPACE 00803000
  833. * CHAIN TIC IN IOBLOK(R2) TO CORRECT CCW IN NEXT IOBLOK(R10) 00804000
  834. SPACE 00805000
  835. CCW3340 DS 0H @V408246 00806000
  836. OI PAGESK+4,8 PCI START OF FOLLOWING REQUEST @V408246 00807000
  837. CLC PAGECYL(2),PAGECYL-IOBLOK(R2) SAME CYLINDER? @V408246 00808000
  838. BNE SK3340 NO, MUST HAVE SEEK CCW @VM01167 00809000
  839. LA R5,PAGESRCH ADDRESS OF SEARCH ID EQUAL @VM01167 00810000
  840. CLC PAGESRCD,PAGESRCD-IOBLOK(R2) SAME TRACK ? @VM01167 00811000
  841. BE TIC3340 YES, SET TIC ADDRESS TO SEARCH @V2A2029 00812000
  842. * ID EQ BYPASSING SEEK AND SET SECTOR CCWS 00813000
  843. SK3340 LA R5,PAGESK ADDRESS OF SEEK COMMAND CCW @VM01167 00814000
  844. IC R4,PAGESRCD-IOBLOK(,R2) GET PREVIOUS SLOT @VM01167 00815000
  845. LA R4,1(,R4) NUMBER AND UPDATE BY ONE @V2A2029 00816000
  846. CLM R4,B'0001',PAGESRCD IS THIS THE NEXT SLOT ? @VM01167 00817000
  847. BNE TIC3340 NO - LEAVE SEEK AND SET SECTOR IN@V2A2029 00818000
  848. CLC PAGESECT-IOBLOK(,R2),PAGESECT RECORD 2 OF ONE @VM01167 00819000
  849. * EVEN/ODD TRACK TO RECORD ONE OF NEXT ODD/EVEN TRACK ? 00820000
  850. BNH TIC3340 NO - LEAVE SEEK AND SET SECTOR IN@V2A2029 00821000
  851. * RECORD 2 VALUE (20) TO RECORD ONE VALUE (02) 00822000
  852. MVC PAGESS,PAGESK OVERLAY SET SECTOR WITH SEEK CCW @VM01167 00823000
  853. LA R5,PAGESS POINT TO SEEK CCW @VM01167 00824000
  854. TIC3340 ST R5,PAGESNS-IOBLOK(,R2) STORE TIC TO ADDRESS @VM01167 00825000
  855. MVI PAGESNS-IOBLOK(R2),TICOP MOVE IN TIC OP-CODE @VM01167 00826000
  856. BR R14 RETURN TO CALLER @VM01167 00827000
  857. SPACE 00828000
  858. INIOB LTR R2,R2 REPLACING 1ST IOBLOK ? @VM01167 00829000
  859. BNZ TWOIOBS NO - @VM01167 00830000
  860. LM R1,R2,IOBFPNT-IOBLOK(R3) UNCHAIN 1ST IOBLOK @VM01167 00831000
  861. STM R1,R2,IOBFPNT AND CHAIN IN NEW IOBLOK @VM01167 00832000
  862. ST R10,IOBFPNT-IOBLOK(,R2) AND CHAIN IN @VM01167 00833000
  863. ST R10,IOBBPNT-IOBLOK(,R1) NEW 1ST IOBLOK @VM01167 00834000
  864. B ONEIOB DO NOT UPDATE OLD IOBLOK @VM01167 00835000
  865. SPACE 00836000
  866. TWOIOBS BALR R14,R15 UPDATE TIC ADDRESS @VM01167 00837000
  867. ST R10,PAGEIOB-IOBLOK(,R2) CHAIN IN NEW IOBLOK @VM01167 00838000
  868. ONEIOB LR R2,R10 NEW IOBLOK ADDRESS @VM01167 00839000
  869. LR R10,R3 ADDRESS OF THE NEXT IOBLOK @VM01167 00840000
  870. SPACE 00841000
  871. ENDIOB BALR R14,R15 ADJUST TIC ADDRESS TO NEXT IOBLOK@VM01167 00842000
  872. ST R10,PAGEIOB-IOBLOK(,R2) CHAIN IN NEW IOBLOK @VM01167 00843000
  873. LTR R10,R6 REPLACED TASK? @V408246 00844000
  874. BNZ ENDIOBA YES @V407594 00845000
  875. AIF (NOT &AP).NOAP3 **AIF*** 00846000
  876. LA R1,RDEVIOBL PT TO RDEV LOCK @V407594 00847000
  877. LOCK RELEASE,TYPE=PRIVATE UNLOCK RDEVBLOK @V407594 00848000
  878. .NOAP3 ANOP **ANOP** 00849000
  879. B EXIT DONE WITH THIS REQUEST @V407594 00850000
  880. ENDIOBA DS 0H HERE IF REPLACED TASK @V407594 00851000
  881. MVC PAGESNS(7),MODELNOP RESTORE SENSE @V408246 00852000
  882. LM R2,R3,MODELSS PROTO-TYPE SET SECTOR @V408246 00853000
  883. ALR R2,R10 FILL IN CORRECT ADDRESS @V408246 00854000
  884. STM R2,R3,PAGESS @V408246 00855000
  885. SR R6,R6 CLEAR . . @V408246 00856000
  886. ST R6,PAGEIOB . . NEXT REQUEST POINTER @V408246 00857000
  887. B SLOTSORT REORDER IN CHAIN @V408246 00858000
  888. SPACE 00859000
  889. QUEUEIO LA R1,RDEVIOBL PT TO RDEV LOCK @V407594 00860000
  890. LOCK RELEASE,TYPE=PRIVATE UNLOCK RDEVBLOK @V407594 00861000
  891. CALL DMKIOSQR SCHEDULE PAGING I/O @V407594 00862000
  892. L R1,DMKPAGPS ADD 1 TO COUNT OF 00863000
  893. AL R1,F1 PAGING START I/O'S 00864000
  894. ST R1,DMKPAGPS AND RESTORE 00865000
  895. EXIT EQU * UPDATE I/O COUNT FOR OVERHEAD, AND EXIT 00866000
  896. L R15,PAGIOCTR GET PAGE I/O COUNT 00867000
  897. BCT R15,*+8 DECREMENT AND TEST 00868000
  898. BAL R14,OVERHEAD WHEN 0, GO RE-CALCULATE PAGE OVERHEAD 00869000
  899. ST R15,PAGIOCTR UPDATE PAGE I/O COUNT 00870000
  900. L R1,DMKPAGQR GET PAGE I/O FOR QUERY COMMAND @VA08859 00871000
  901. AL R1,F1 ADD 1 TO IT AND SAVE @VA08859 00872000
  902. ST R1,DMKPAGQR ..... @VA08859 00873000
  903. B GETQ GO LOOK FOR MORE REQUESTS 00874000
  904. SPACE 00875000
  905. EXITX CHARGE SWITCH,ASYSVM SET R11 TO ASYSVM FOR DISPATCH @V407594 00876000
  906. AIF (NOT &AP).NOAP11 @VA10805 00876010
  907. TM APSTAT1,APUOPER RUNNING AP? @VA09257 00876100
  908. BNO NORMEXT NOT AP EXIT NORMALLY. @VA09257 00876200
  909. L R15,PREFIXA ACCESS OTHER PSA @VA09257 00876300
  910. CLI XTNDLOCK-PSA(R15),0 IS SYSTEM EXTENDING? @VA09257 00876400
  911. BE NOEXTEN NO NOT EXTENDING FREE STORAGE. @VA09257 00876500
  912. NORMEXT DS 0H @VA09257 00876600
  913. .NOAP11 ANOP 00876610
  914. GOTO DMKDSPCH ALL DONE -- LEAVE @V407594 00877000
  915. AIF (NOT &AP).NOAP12 @VA10805 00877010
  916. NOEXTEN DS 0H @VA09257 00877100
  917. L R15,PREFIXB ACCESS OTHER PSA @VA09257 00877200
  918. TM XCPEND-PSA(R15),XCDISP DISPATCH PENDING? @VA09257 00877300
  919. BZ NORMEXT NO DISPATCH PENDING. @VA09257 00877400
  920. LOCK RELEASE,TYPE=SYS YES,RELEASE THE LOCK @VA09257 00877500
  921. GOTO DMKDSPRU UNLOCKED ENTRY TO DSP @VA09257 00877600
  922. .NOAP12 ANOP 00877610
  923. SPACE 00878000
  924. PRINT DATA 00879000
  925. HDTABLE DS 0H TABLE OF HEAD NUMBERS FOR 2314 PAGES 00880000
  926. DC AL1(00,00,01,01,02,03,03,04) 00881000
  927. DC AL1(05,05,06,06,07,08,08,09) 00882000
  928. DC AL1(10,10,11,11,12,13,13,14) 00883000
  929. DC AL1(15,15,16,16,17,18,18,19) 00884000
  930. PRINT NODATA 00885000
  931. CCW3350 LA R5,PAGESK ADDRESS OF SEEK CCW @V304498 00886000
  932. OI PAGESK+4,8 PCI START OF FOLLOWING REQUEST @V408246 00887000
  933. CLI PAGESRCD,ONE IS THIS SLOT ONE? @VA04482 00888000
  934. BE RCDON50 YES, CHECK PREVIOUS SLOT @VA04482 00889000
  935. IC R4,PAGESRCD-IOBLOK(R2) GET PRIOR IOB SLOT NO. @VA04482 00890000
  936. LA R4,1(R4) BUMP SLOT NUMBER BY ONE @VA04482 00891000
  937. CLM R4,B'0001',PAGESRCD ADJACENT SLOTS? @VA04482 00892000
  938. BNE TIC3350 NO, CHAIN TO SEEK AND SET SECTOR @VA04482 00893000
  939. CLC PAGECYL,PAGECYL-IOBLOK(R2) SAME CYLINDER ? @V304498 00894000
  940. BNE SK3350 NO-ADJACENT RECORDS-DIFFERENT CYL@V304498 00895000
  941. LA R5,PAGESRCH ADDRESS OF SEARCH ID EQUAL CCW @V304498 00896000
  942. CLC PAGEHEAD-IOBLOK(,R2),PAGEHEAD SAME TRACK/HEAD ? @V304498 00897000
  943. BE TIC3350 YES, SAME TRACK AND ADJACENT @V304498 00898000
  944. * RECORDS - TIC TO SEARCH ID EQUAL 00899000
  945. B SK3350 CHAIN TO SEEK WITHOUT SET SECTOR @V304498 00900000
  946. SPACE 00901000
  947. RCDON50 CLC PAGESRCD-IOBLOK(1,R2),LASTSLOT Highest slot? HRC106DK 00902100
  948. BNE TIC3350 NO,CHAIN IN SEEK AND SECTOR CCWS @V304498 00903000
  949. SK3350 LA R5,PAGESS ADDRESS OF SET SECTOR CCW @V304498 00904000
  950. MVC PAGESS,PAGESK OVERLAY SET SECTOR WITH SEEK CCW @V304498 00905000
  951. TIC3350 ST R5,PAGESNS-IOBLOK(,R2) STORE 'TIC TO' ADDRESS @V304498 00906000
  952. MVI PAGESNS-IOBLOK(R2),TICOP MOVE IN TIC OP-CODE @V304498 00907000
  953. BR R14 RETURN TO CALLER @V304498 00908000
  954. SPACE 00909000
  955. EJECT 00910000
  956. *. 00911000
  957. * B. OPERATION OF THE PAGING INTERRUPT HANDLER - 00912000
  958. * 1. LOCATE THE CPEXBLOK FOR THE TASK THAT INITIATED THE PAGING 00913000
  959. * OPERATION AND UNCHAIN IT FROM THE INTRANSIT QUEUE 00914000
  960. * 2. IF NO ERRORS OCCURED FOR THE OPERATION, CALL DMKSTKCP TO 00915000
  961. * STACK THE DEFERED REQUESTS FOR EXECUTION, RETURN THE USED 00916000
  962. * IOBLOK TO THE STACK, AND EXIT VIA A GOTO TO DMKDSPCH 00917000
  963. * 3. IF ERRORS OCCURED IN A CHANNEL PROGRAM, FLAG THE CPEXBLOKS 00918000
  964. * TO BE UNSTACKED SO THAT DMKDSPCH WILL TRANSFER CONTROL TO 00919000
  965. * TO THE CALLING ROUTINE WITH A CONDITION CODE OF 4 00920000
  966. * 4. IF 5 CONSECTIVE ERRORS OCCUR ON A PAGING DEVICE; ERROR 00921000
  967. * MESSAGE DMKPAG415E WILL BE ISSUED TO THE SYSTEMS OPERATOR 00922000
  968. * AND THE SYSTEM WILL THEN ENTER A DISABLED WAIT STATE. 00923000
  969. *. 00924000
  970. SPACE 00925000
  971. WAITPAGE EQU * 00926000
  972. USING *,R12 ADDRESSABILITY ON ENTRY 00927000
  973. L R12,=A(DMKPAG) STANDARD ADDRESSABILITY 00928000
  974. USING DMKPAG,R12 00929000
  975. SPACE 00930000
  976. SR R6,R6 CLEAR PCI SWITCH @V408246 00931000
  977. SLR R9,R9 CLEAR ERROR SWITCH 00932000
  978. TM IOBCSW+5,IL INCORRECT LENGTH ERROR @VM08726 00933000
  979. BO WTPGERR YES, FORCE FATAL ERROR CONDITION @V408246 00934000
  980. TM IOBSTAT,IOBFATAL UNRECOVERABLE ERROR ? @VM08726 00936000
  981. BO WTPGERR YES, ANYLIZE FURTHER @V408246 00937000
  982. STC R9,PGERCTR ZERO PAGE ERROR COUNT @V408246 00938000
  983. TM IOBCSW+4,X'FF'-(CUE+CE+DE) MUST BE ZERO @V408246 00939000
  984. BNZ WTPGERR ERROR @V408246 00940000
  985. TM IOBCSW+4,CE+DE MUST BE ONE @V408246 00941000
  986. BO GETCPEX YES,OK @V408246 00942000
  987. CLI IOBCSW+5,PCI JUST PCI? @V408246 00943000
  988. BNE WTPGERR NO,ASSUME ERRORS THEN @V408246 00944000
  989. L R6,IOBCSW @V408246 00945000
  990. LA R6,0(,R6) LAST CCW POINTER @V408246 00946000
  991. LR R1,R10 SAVE COPIED IOBLOK @V408246 00947000
  992. L R10,IOBCAW POINT TO PAGECCWS @V408246 00948000
  993. SH R10,=Y(PAGECCWS-IOBLOK) BACK-UP TO START OF @V408246 00949000
  994. * ORIGINAL 00950000
  995. LA R0,IOBSIZE GET RID OF COPIED BLOCK @V408246 00951000
  996. CALL DMKFRET @V408246 00952000
  997. GETCPEX DS 0H PROCESS NEXT IOBLOK @V408246 00953000
  998. LTR R6,R6 PCI? @V408246 00954000
  999. BZ GETCPEXA NO @V408246 00955000
  1000. LA R1,PAGESK 1ST CCW @V408246 00956000
  1001. CR R6,R1 IN THIS TASK? @V408246 00957000
  1002. BL GETCPEXA NO @V408246 00958000
  1003. LA R1,PAGESNS+8 LAST CCW @V408246 00959000
  1004. CR R6,R1 IN THIS TASK? @V408246 00960000
  1005. BNH WTPGXIT YES, DONE @V408246 00961000
  1006. GETCPEXA DS 0H @V408246 00962000
  1007. CLI PAGERW,X'05' PAGE WRITE ?? 00963000
  1008. BNE UNTRANS NO --- 00964000
  1009. L R2,PAGESOUT GET PENDING WRITE COUNT 00965000
  1010. BCTR R2,0 DECREMENT 00966000
  1011. ST R2,PAGESOUT AND SAVE 00967000
  1012. SPACE 00968000
  1013. UNTRANS EQU * 00969000
  1014. L R4,PAGEIOB SAVE NEXT POINTER @V408246 00970000
  1015. ICM R1,B'1111',IOBMISC ANY STACKED REQUESTS? @V408246 00971000
  1016. BZ UNSTCKA NO (PCI MUST HAVE CLEARED) @V408246 00972000
  1017. XC IOBMISC,IOBMISC YES, MAKE SURE CLEARED NOW @V408246 00973000
  1018. OI PAGERW+4,SKIP AVOID ANY PROBLEMS WITH RETRY @V408246 00974000
  1019. LM R2,R3,CPEXFPNT AND UNCHAIN CPEXBLOK FROM TRANSIT QUEUE 00975000
  1020. ST R2,CPEXFPNT-CPEXBLOK(,R3) --- 00976000
  1021. ST R3,CPEXBPNT-CPEXBLOK(,R2) --- 00977000
  1022. SPACE 2 00978000
  1023. UNSTACK L R3,CPEXMISC SAVE POINTER TO NEXT CPREQUEST 00979000
  1024. AIF (NOT &AP).NOAP4 **AIF*** 00980000
  1025. CLI CPEXADD,0 DID DMKPTR INDICATE AFFINITY @V407594 00981000
  1026. BE CALLSTK NO, STACK FOR EITHER PROCESSOR @V407594 00982000
  1027. CLC CPEXADD(1),LPUADDR+1 AFFINITY FOR THIS PROC'R @V407594 00983000
  1028. STC R9,CPEXADD INSERT POSSIBLE ERROR FLAG @V407594 00984000
  1029. BNE STKOTHER NO- STACK FOR OTHER PROCESSOR @V407594 00985000
  1030. CALL DMKSTKMP STACK FOR CURRENT PROCESSOR ONLY @V407594 00986000
  1031. B NXTSTK LOOK FOR CHAINED CPEXBLOK @V407594 00987000
  1032. STKOTHER CALL DMKSTKOP STACK FOR OTHER PROCESSOR ONLY @V407594 00988000
  1033. B NXTSTK LOOK FOR CHAINED CPEXBLOK @V407594 00989000
  1034. CALLSTK DS 0H STACK CPEXBLOCK FOR EITHER PROCR @V407594 00990000
  1035. .NOAP4 ANOP **ANOP** 00991000
  1036. STC R9,CPEXADD INSERT POSSIBLE ERROR FLAG 00992000
  1037. CALL DMKSTKCP STACK THE CURRENT BLOK 00993000
  1038. NXTSTK DS 0H @V407594 00994000
  1039. LTR R1,R3 ANY MORE BLOKS ?? 00995000
  1040. BNZ UNSTACK YES -- GO UNSTACK THEM 00996000
  1041. UNSTCKA DS 0H @V408246 00997000
  1042. LTR R6,R6 PCI? @V408246 00998000
  1043. BNZ UNSTACK2 YES, FOREGO RELEASE UNTIL END @V408246 00999000
  1044. UNSTACK1 DS 0H @VA10137 01000100
  1045. L R0,IOBSTACK GET TOP OF IOBSTACK @VA10137 01000425
  1046. ST R10,IOBSTACK AND PUSH IT 01001000
  1047. ST R0,IOBMISC DOWN 01002000
  1048. LM R2,R3,MODELNOP CLEAR OUT 01003000
  1049. STM R2,R3,PAGESNS THE TIC @VM01167 01004000
  1050. ST R1,PAGEIOB CLEAR POINTER TO SLOT-SORTED IOBLOKS 01005000
  1051. MVI PAGESK+4,CC MAKE SURE PCI IS CLEARED @V408246 01006000
  1052. UNSTACK2 LTR R10,R4 WERE THERE ANY SLOT-SORTED IOBLOK(S) ? 01007000
  1053. BNZ GETCPEX YES -- GO PROCESS 01008000
  1054. WTPGXIT DS 0H @V408246 01009000
  1055. GOTO DMKDSPCH OTHERWISE, LEAVE 01010000
  1056. EJECT 01011000
  1057. * 01012000
  1058. * HANDLE SERIOUS PAGING I/O ERRORS 01013000
  1059. * 01014000
  1060. * 01015000
  1061. WTPGERR DS 0H @V408246 01016000
  1062. CL R10,IOBLINK LAST IOBLOK ? @VA11208 01017000
  1063. BE WTPGERRX YES @VA11208 01018000
  1064. LA R0,IOBSIZE NO,RETURN @VA11208 01019000
  1065. LR R1,R10 COPIED IOBLOCK @V408246 01020000
  1066. CALL DMKFRET @V408246 01021000
  1067. B WTPGXIT EXIT @V408246 01022000
  1068. WTPGERRX DS 0H @V408246 01023000
  1069. ICM R4,B'1111',PAGEIOB CHAINED IOBLOK POINTER @VA09024 01024100
  1070. BZ WTPGERRB NONE @V408246 01025000
  1071. LH R1,IOBRADD GET THE REAL DEVIVE ADDRESS @VA09024 01026100
  1072. CALL DMKSCNRU GET RDEVBLOK ADDRESS FOR IOS @VA09024 01026200
  1073. BNZ WTPGERRC SOMETHING IS SICK, RETURN @VA09024 01026300
  1074. WTPGERRA DS 0H @VA09024 01026400
  1075. MVC PAGESNS(7),MODELNOP NOP CCW @V408246 01036000
  1076. MVI PAGESS,NOPCODE CHANGE POSSIBLE SK,SK TO SK,NOP @V408246 01037000
  1077. NI PAGESK+4,255-8 RESET POSSIBLE PCI FLAG @V408246 01038000
  1078. NI PAGESS+4,255-8 . . @V408246 01039000
  1079. NI IOBSTAT,255-IOBFATAL RESET FATAL FLAG @V408246 01040000
  1080. ST R9,PAGEIOB @V408246 01041000
  1081. CALL DMKIOSQR AND RESCHEDULE INDIVIDUALLY @V408246 01042000
  1082. LTR R10,R4 NEXT ON CHAIN? @V408246 01043000
  1083. BZ WTPGXIT NONE @V408246 01044000
  1084. L R4,PAGEIOB SAVE CHAIN POINTER @V408246 01045000
  1085. B WTPGERRA REPEAT UNTIL END OF CHAIN @V408246 01046000
  1086. WTPGERRB DS 0H @V408246 01047000
  1087. L R1,IOBMISC CPEXBLOK POINTER FOR REQUEST @V408246 01048000
  1088. L R5,CPEXR5 SWAPTABLE POINTER @V408246 01049000
  1089. TM SWPFLAG,SWPRECMP NORMAL PAGING AREA? @V408246 01050000
  1090. BNZ WTPGERRC NO, BYPASS FATAL SYSTEM ERROR @V408246 01051000
  1091. * TESTING 01052000
  1092. IC R9,PGERCTR INCREMENT @V408246 01053000
  1093. LA R9,1(,R9) FATAL PAGE I/O COUNTER @V408246 01054000
  1094. STC R9,PGERCTR @V408246 01055000
  1095. C R9,F5 HAVE FIVE CONSECATIVE ERRORS @V408246 01056000
  1096. * OCCURED? 01057000
  1097. BH PERMERR YES - ISSUE DMKPAG415E MESSAGE @V408246 01058000
  1098. WTPGERRC DS 0H @V408246 01059000
  1099. SLR R9,R9 SET-UP I/O ERROR INDICATOR FOR @V408246 01060000
  1100. * RETURN 01061000
  1101. BCTR R9,0 I/O ERROR RETURN = -1 @V408246 01062000
  1102. B GETCPEX REJOIN NORMAL CODE @V408246 01063000
  1103. * 01064000
  1104. * UNACCEPTABLE PAGING I/O ERROR ACTIVITY 01065000
  1105. * 01066000
  1106. * HERE IF PERMANENT PAGING ERROR CONDITION 01067000
  1107. * ASSUME THAT INFO. IN 'IOBRADD' IS NOT VALID 01068000
  1108. PERMERR EQU * @VA03787 01069000
  1109. L R1,IOBMISC GET CPEXBLOK POINTER @VA03787 01070000
  1110. L R5,CPEXR5 THEN GET SWPTABLE ENTRY @VA03787 01071000
  1111. SR R8,R8 CLEAR REG 8 @VA03787 01072000
  1112. IC R8,SWPCODE GET VOLUME CODE @VA03787 01073000
  1113. SLL R8,3 MAKE IT INDEX FOR OWNED LIST @VA03787 01074000
  1114. AL R8,=A(DMKSYSOW) POINT TO PROPER ENTRY @VA03787 01075000
  1115. LH R8,OWNDRDEV-OWNDLIST(,R8) GET RDEVBLOK INDEX@VA03787 01076000
  1116. SLL R8,3 CONVERT IT TO BYTES @VA03787 01077000
  1117. AL R8,ARIODV NOW POINT TO THE RDEVBLOK @VA03787 01078000
  1118. CALL DMKSCNRD GO FIND 'CUU' ADDRESS @VA03787 01079000
  1119. CALL DMKCVTBH CONVERT IT TO HEX 01080000
  1120. STCM R1,B'0111',PAGEDEV PUT DEVICE ADDR. IN THE MESSAGE 01081000
  1121. LA R0,MSG415LN SIZE OF MESSAGE INTO R0 01082000
  1122. LA R1,MSG415 ADDRESS OF MESSAGE INTO R1 01083000
  1123. LA R2,PSW415 GET PAG WAIT STATE CODE @V407510 01084000
  1124. GOTO DMKMCHST TERMINATE SYSTEM @V407510 01085000
  1125. EJECT 01086000
  1126. *. 01087000
  1127. * C. OPERATION OF THE PAGING LOAD CALCULATOR 01088000
  1128. * 1. STORE TOD CLOCK AND COMPUTE LENGTH OF RECORDING INTERVAL 01089000
  1129. * 2. CONVERT THE TIME TO MICROSECONDS, INSURING THAT IT FITS IN 01090000
  1130. * ONE WORD (31 BITS PLUS SIGN) 01091000
  1131. * 3. OBTAIN PAGE-WAIT TIME OVER THE INTERVAL 01092000
  1132. * 4. PROJECT PAGE-WAIT PERCENTAGE FOR NEXT INTERVAL 01093000
  1133. * 5. CALCULATE THE PAGING RATE IN PAGES/SECOND, SAVE IN PSA 01094000
  1134. * 6. CALCULATE THE RATIO OF STOLEN TO FLUSHED PAGES, AND STORE 01095000
  1135. * IN PGSRATIO IN DMKPSA. 01096000
  1136. * 7. RESET COUNTERS AND VALUES FOR THE START OF A NEW MEASURE- 01097000
  1137. * MENT INTERVAL, AND RETURN TO MAINLINE CODE 01098000
  1138. *. 01099000
  1139. SPACE 2 01100000
  1140. OVERHEAD EQU * HERE TO RE-CALCULATE PAGING OVERHEAD 01101000
  1141. STM R10,R13,PAGSAVRG SAVE REGS @VM40121 01102000
  1142. STCK DMKPAGSP REMEMBER END OF RECORDING PERIOD 01103000
  1143. BC 3,DOWNWEGO CLOCK NOT FUNCTIONING @VA04301 01104000
  1144. LM R0,R3,DMKPAGST GET START AND END OF RECORDING PERIOD 01105000
  1145. LA R4,1 GET CONSTANT FOR ARITHMETIC 01106000
  1146. SR R6,R6 CLEAR SHIFT COUNTER 01107000
  1147. LA R7,100 GET CONSTANT FOR PERCENTAGE CALCULATIONS 01108000
  1148. SLR R3,R1 CALCULATE LENGTH OF RECORDING PERIOD 01109000
  1149. BC 11,*+6 ... 01110000
  1150. SLR R2,R4 ... 01111000
  1151. SLR R2,R0 ... 01112000
  1152. SRDL R2,12 AND CONVERT TO MICROSECONDS 01113000
  1153. LR R0,R2 SAVE THE ELAPSED TIME 01114000
  1154. LR R1,R3 ... 01115000
  1155. D R0,=F'10000' CONVERT TO 1/100'S OF A SECOND 01116000
  1156. LTR R15,R1 SAVE AND TEST THE RESULT 01117000
  1157. BP *+8 OK TO USE -- 01118000
  1158. LA R15,1 SET MAXIMUM RATE 01119000
  1159. L R1,DMKPAGIC GET NUMBER OF PAGIO'S DONE 01120000
  1160. MR R0,R7 TIMES 100 01121000
  1161. DR R0,R15 AND GET PAGING RATE 01122000
  1162. L R15,PREFIXA OBTAIN CURRENT REAL PSA VALUE @VM40121 01123000
  1163. STH R1,PAGERATE(R15) PAGE RATE TO ABSOLUTE 0 @V4M0121 01124000
  1164. BAL R15,SHIFTER MAKE SURE THAT IT FITS IN ONE REGISTER 01125000
  1165. SR R10,R10 INDEX TO MAIN PROC WAITSAVE VALUE@V4M0121 01126000
  1166. SR R11,R11 PREFIX VALUE FOR REAL PSA @V4M0121 01127000
  1167. LA R13,1 COUNTER - ONE FOR UP MODE @V4M0121 01128000
  1168. TM APSTAT1,APUOPER APU OPERATIONAL ? @V4M0121 01129000
  1169. BNO COMPSTAT NO - ONLY 1 PASS THRU CODE BELOW @V4M0121 01130000
  1170. LA R13,2 YES - MAKE 2 PASSES THRU CODE @V4M0121 01131000
  1171. * BELOW TO COMPUTE STATISTICS FOR 01132000
  1172. * BOTH PROCESSORS. 01133000
  1173. COMPSTAT DS 0H @VM00029 01133100
  1174. TM APSTAT1,PROCIPL IS THIS THE IPL'ED PROCESSOR? @VMV0008 01134100
  1175. BO COMPSTA2 YES, BRANCH @VM00029 01135100
  1176. LA R10,8 NO - BEFORE COMPUTE PAGEING STATS@V4M0121 01136000
  1177. * SET INDEX TO AP WORKSAVE VALUE. 01137000
  1178. COMPSTA2 DS 0H @VM00029 01138100
  1179. L R0,DMKPAGWS(R10) 1ST WORD OF SAVED PG WT TIME @VMH0012 01139000
  1180. L R1,DMKPAGWS+N4(R10) 2ND WD OF SAVED PG WT TIME @VMH0012 01140000
  1181. L R8,PAGEWAIT(R11) 1ST WORD OF CURRENT PG WT TOTAL@V4M0121 01141000
  1182. L R9,PAGEWAIT+N4(R11) 2ND WORD OF PAGE WAIT TOTAL @V4M0121 01142000
  1183. ST R8,DMKPAGWS(R10) SAVE PAGEWAIT FOR @VMH0012 01143000
  1184. ST R9,DMKPAGWS+N4(R10) NEXT TIME @VMH0012 01144000
  1185. SPACE 01145000
  1186. SLR R1,R9 COMPUTE PAGE WAIT OVER INTERVAL 01146000
  1187. BC 8+2+1,*+6 ... 01147000
  1188. SLR R0,R4 .. 01148000
  1189. SLR R0,R8 . 01149000
  1190. SRDL R0,12 AND CONVERT TO MICROSECONDS 01150000
  1191. SPACE 01151000
  1192. LTR R1,R1 REMEMBER SETTING OF HIGH ORDER 01152000
  1193. BALR R15,R0 BIT IN LOW ORDER REGISTER 01153000
  1194. SPACE 01154000
  1195. N R1,=XL4'7FFFFFFF' CLEAR HIGH ORDER BIT 01155000
  1196. LR R5,R0 SAVE HIGH ORDER WORD 01156000
  1197. MR R0,R7 MULTIPLY BY 100 FOR PERCENTAGE 01157000
  1198. MR R4,R7 MULTIPLY HIGH ORDER WORD 01158000
  1199. ALR R0,R5 AND ADD IN OVERFLOW 01159000
  1200. SPM R15 WAS HIGH ORDER BIT ON ? 01160000
  1201. BNM ALIGN NO -- 01161000
  1202. SRL R7,1 ALIGN MULTIPLIER WITH MISSING BIT 01162000
  1203. ALR R0,R7 AND ADD IN PARTIAL SUM 01163000
  1204. ALIGN SRDL R0,0(R6) ALIGN WITH DIVISOR 01164000
  1205. DR R0,R3 GET PAGING OVERHEAD PERCENTAGE 01165000
  1206. LH R0,PAGELOAD(R11) GET PREVIOUS PAGE LOAD VALUE. @V4M0121 01166000
  1207. ALR R0,R0 TIMES 2 01167000
  1208. AH R0,PAGELOAD(R11) TIMES 3 @V4M0121 01168000
  1209. ALR R1,R0 PLUS RECENT LOAD 01169000
  1210. SRL R1,2 /4 FOR SMOOTHED AVERAGE 01170000
  1211. STH R1,PAGELOAD(R11) AND SAVE IN EACH REAL PSA. @V4M0121 01171000
  1212. X R10,F08 INVERT WAITSAVE INDEX @V4M0121 01172000
  1213. L R11,PREFIXB ADDR OF OTHER PREFIX AREA @V4M0121 01173000
  1214. BCT R13,COMPSTA2 COMPUTE PAGING STATISTICS FOR @VM00036 01174100
  1215. * THE OTHER PROCESSOR. 01175000
  1216. LM R10,R13,PAGSAVRG RESTORE CALLERS REQUIRED REGS @V4M0121 01176000
  1217. SR R0,R0 CLEAR OUT 01177000
  1218. STCK DMKPAGST REMEMBER START OF NEXT RECORDING PERIOD 01178000
  1219. BC 12,CLOCKOK IS CLOCK FUNCTIONING? @VA04301 01179000
  1220. DOWNWEGO GOTO DMKCVTAB CLOCK DAMAGED...ABEND CVT001 @VA04301 01180000
  1221. CLOCKOK EQU * @VA04301 01181000
  1222. L R15,DMKPAGIC GET NEXT RECORDING PERIOD 01182000
  1223. BR R14 AND RETURN TO CALLER 01183000
  1224. SPACE 01184000
  1225. SHIFTER EQU * HERE TO TRUNCATE DIVISOR TO ONE WORD 01185000
  1226. LTR R2,R2 ANY DATA IN HIGH ORDER WORD ?? 01186000
  1227. BZ SHIFTER1 NO - INSURE NON-NEGATIVE 01187000
  1228. SRDL R2,1 SHIFT ONE 01188000
  1229. ALR R6,R4 AND COUNT NUMBER OF SHIFTS 01189000
  1230. B SHIFTER CONTINUE 01190000
  1231. SHIFTER1 LTR R3,R3 INSURE NON-NEGATIVE VALUE -- 01191000
  1232. BCR 11,R15 IF NOT MINUS, EXIT 01192000
  1233. SRL R3,1 OTHERWISE, SHIFT ONE MORE 01193000
  1234. ALR R6,R4 BUMP SHIFT COUNT 01194000
  1235. BR R15 AND EXIT 01195000
  1236. SPACE 01196000
  1237. PAGSAVRG DS 4F OVERHEAD REG SAVEAREA @V4M0121 01197000
  1238. F08 DC F'08' BIT TO INVERT WAITSAVE INDEX @V4M0121 01198000
  1239. SPACE 01199000
  1240. DMKPAGWS DS 0F @VMH0012 01200000
  1241. DC X'7FFFFFFF' WAITSAVE VALUE FOR MAIN PROC @V4M0121 01201000
  1242. DC X'FFFFF000' @V4M0121 01202000
  1243. DC X'7FFFFFFF' WAITSAVE VALUE FOR THE APU @V4M0121 01203000
  1244. DC X'FFFFF000' @V4M0121 01204000
  1245. EJECT 01205000
  1246. MODELCCW DS 0D PROTOTYPE PAGING CCWS 01206000
  1247. CCW 7,PAGESEEK-IOBLOK,CC,6 SEEK 01207000
  1248. MODELSS CCW 35,PAGESECT-IOBLOK,CC,1 SET SECTOR @V2A2029 01208000
  1249. CCW 49,PAGESEEK+2-IOBLOK,CC,5 SEARCH ID EQUAL 01209000
  1250. CCW 8,PAGESRCH-IOBLOK,0,0 TIC *-8 01210000
  1251. MODELRD CCW 0,0,CC,4096 READ/NOP PROTOTYPES 01211000
  1252. MODELNOP CCW 4,0,SILI+SKIP,1 DUMMY SENSE TO END THE CHAIN 01212000
  1253. SPACE 01213000
  1254. * NOTE THAT A SENSE IS USED INSTEAD OF A NOP SO THAT RPS DEVICES WILL 01214000
  1255. * NOT LOSE TRACK OF THE SECTOR 01215000
  1256. SPACE 01216000
  1257. MSG415 DC C'DMKPAG415E CONTINUOUS PAGING ERRORS FROM DASD XXX' 01217000
  1258. MSG415LN EQU *-MSG415 LENGTH OF MESSAGE 01218000
  1259. ORG *-3 01219000
  1260. PAGEDEV DC X'000000' DASDI DEVICE CAUSING THE ERROR CONDITION 01220000
  1261. ORG 01221000
  1262. PGERCTR DC X'00' PAGE ERROR COUNTER. 01222000
  1263. DS 0D 01223000
  1264. PSW415 EQU X'0F' PAG WAIT STATE CODE @V407510 01224000
  1265. SPACE 01225000
  1266. SPACE 3 01226000
  1267. MODEL1 EQU X'01' 2305 MODEL 1 01227000
  1268. MODEL2 EQU X'02' 2305 MODEL 2 01228000
  1269. PAGCYL24 EQU 24 24 PAGES PER CYLINDER (2305/3340)@VM01167 01229000
  1270. PAGCYL32 EQU 32 32 PAGES PER CYLINDER (2314/2319)@VM01167 01230000
  1271. PAGCYL57 EQU 57 57 PAGES PER CYLINDER (3330) @VM01167 01231000
  1272. ONE EQU 1 @VM01167 01232000
  1273. THREE EQU 3 @VM01167 01233000
  1274. FOUR EQU 4 @V304498 01234000
  1275. NOPCODE EQU 3 @VM01167 01235000
  1276. TICOP EQU 8 @VM01167 01236000
  1277. BIT7 EQU X'01' @VM01167 01237000
  1278. BIT6 EQU X'02' @VM01167 01238000
  1279. N4 EQU 4 INDEX TO 2ND WORD @V4M0121 01239000
  1280. SPACE 2 01240000
  1281. DMKPAGQ DC 2A(DMKPAGQ) QUEUE OF CPEXBLOKS FOR IN-TRANSIT PAGES 01241000
  1282. SPACE 3 01242000
  1283. SPACE 01243000
  1284. DMKPAGST DC D'0' START OF PAGE LOAD MEASUREMENT PERIOD 01244000
  1285. DMKPAGSP DC D'0' END OF PAGE LOAD MEASUREMENT PERIOD 01245000
  1286. SPACE 01246000
  1287. DMKPAGQR DC F'0' PAGE I/O COUNT FOR QUERY COMMAND @VA08859 01247000
  1288. DMKPAGIC DC F'200' NUMBER OF PAGE I/O'S TO MEASURE 01248000
  1289. PAGIOCTR DC F'200' NUMBER OF PAGE IO'S LEFT IN CURRENT PERIOD 01249000
  1290. DMKPAGPS DC F'0' COUNT OF PAGING START I/O'S 01250000
  1291. DMKPAGCC DC F'0' COUNT OF CALLS TO DMKPAG 01251000
  1292. SPACE 01252000
  1293. IOBSTACK DC A(0) STACK OF PRE-FORMATTED IOBLOKS 01253000
  1294. DMKPAGSK EQU IOBSTACK ALLOW LOG-OFF TO REDUCE NUMBERS @V408246 01254000
  1295. DMKPAGDP DC X'FF' SWITCH FOR PCI ON ALL 2305 @VA07060 01255000
  1296. * REQUESTS 01256000
  1297. SPACE 01257000
  1298. LASTSLOT DS XL1 Highest slot number on 3350/75/80HRC106DK 01257100
  1299. DYNFRET DC F'0' NO OF CALLS TO DMKFRET FOR IOBLOKS 01258000
  1300. * WHICH WERE IN THE DYNAMIC PAGING AREA 01259000
  1301. SPACE 01260000
  1302. DMKPAGLO DC A(*-*) "DMKFRELO" MINUS LENGTH OF ONE PAGING IOBLOK 01261000
  1303. DMKPAGHI DC A(*-*) "DMKFREHI" 01262000
  1304. SPACE 01263000
  1305. PAGESOUT DC F'0' COUNT OF PENDING PAGE WRITES 01264000
  1306. SEC23051 DC AL1(2,32,62) SECTOR VALUES FOR 2305 M1 @VM01167 01265000
  1307. SEC23052 DC AL1(3,57,111) SECTOR VALUES FOR 2305 M2 @VM01167 01266000
  1308. SECT3330 DC AL1(2,44,86) SECTOR VALUES FOR 3330 @VM01167 01267000
  1309. SECT3340 DC AL1(2,32) SECTOR VALUES FOR 3340 @VM01167 01268000
  1310. SECT3350 DC AL1(2,33,63,94) SECTOR VALUES FOR 3350 @V304498 01269000
  1311. SECT3375 DC AL1(4,27,51,75,98,122,145,169) HRC106DK 01269100
  1312. SECT3380 DC AL1(5,26,46,67,87,108,128,149,170,190) HRC106DK 01269200
  1313. EJECT 01270000
  1314. LTORG 01271000
  1315. EJECT 01272000
  1316. COPY IOBLOKS 01273000
  1317. COPY RBLOKS 01274000
  1318. COPY CORE 01275000
  1319. COPY SAVE 01276000
  1320. COPY ALLOC 01277000
  1321. IOBLOK DSECT CONTINUE THE DSECT 01278000
  1322. * ANY CHANGES IN PAGESIZE MUST ALSO BE REFLECTED 01279000
  1323. * IN DMKUSO AND DMKMON 01280000
  1324. ORG , MAKE SURE WE'RE AT THE END @V200820 01281000
  1325. PAGECCWS DS 6D SPACE FOR PAGING CCWS 01282000
  1326. ORG PAGECCWS CCW DEFINITIONS 01283000
  1327. PAGESK DS D SPACE FOR SEEK 01284000
  1328. PAGESS DS D SPACE FOR SET SECTOR 01285000
  1329. PAGESRCH DS D SPACE FOR SEARCH 01286000
  1330. PAGESTIC DS F SPACE FOR TIC @V2A2029 01287000
  1331. PAGEIOB DS F POINTER TO SLOT SORTED IOBLOK 01288000
  1332. PAGERW DS D SPACE FOR READ/WRITE 01289000
  1333. PAGEPRI EQU PAGERW+5 SPACE FOR REQUEST PRIORITY @V408246 01290000
  1334. PAGESNS DS D SPACE FOR SENSE/TIC @VM01167 01291000
  1335. ORG PAGESNS+7 @VM01167 01292000
  1336. PAGESRCD DS X SPACE FOR SLOT NUMBER @VA04482 01293000
  1337. PAGESEEK DS D SPACE FOR SEEK ARGUMENT AND SECTOR 01294000
  1338. ORG PAGESEEK+2 @VM01167 01295000
  1339. PAGECYL DS H SPACE FOR CYLINDER ADDRESS @VM01167 01296000
  1340. PAGEHEAD DS H SPACE FOR HEAD ADDRESS @VM01167 01297000
  1341. PAGERCD DS X SPACE FOR RECORD NUMBER @VM01167 01298000
  1342. PAGESECT DS X SECTOR NUMBER 01299000
  1343. PAGESIZE EQU (*-IOBLOK)/8 SIZE OF EXTENDED IOBLOK IN DOUBLE WORDS 01300000
  1344. EJECT 01301000
  1345. PSA 01302000
  1346. COPY VMBLOK 01303000
  1347. COPY DEVTYPES 01304000
  1348. COPY EQU 01305000
  1349. END 01306000