COMPILATION LISTING OF SEGMENT tune_disk Compiled by: Multics PL/I Compiler, Release 33a, of May 30, 1990 Compiled at: ACTC Technologies Inc. Compiled on: 10/09/90 0956.9 mdt Tue Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1990 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* *********************************************************** */ 8 9 10 11 /****^ HISTORY COMMENTS: 12* 1) change(90-08-07,Vu), approve(90-08-07,MCR8189), 13* audit(90-09-24,WAAnderson), install(90-10-09,MR12.4-1036): 14* Error message from tune_disk without arguments is malformed. 15* END HISTORY COMMENTS */ 16 17 18 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 19 tune_disk: 20 td: 21 proc; 22 23 /* User level procedure to control the tuning of the disk system. */ 24 25 /* Created 84-05-23, by T. Oke */ 26 /* Auditting changes by Chris Jones, August 1984 */ 27 28 dcl arg char (arg_len) based (arg_ptr); 29 dcl arg_count fixed bin; 30 dcl arg_index fixed bin; 31 dcl arg_len fixed bin (21); 32 dcl arg_list_ptr ptr; 33 dcl arg_ptr ptr; 34 35 dcl brief bit (1) initial ("1"b); 36 dcl code fixed bin (35); 37 dcl i fixed bin; 38 dcl MYNAME char (9) static options (constant) initial ("tune_disk"); 39 dcl prev_arg char (256) varying; 40 dcl reason char (64) varying; 41 dcl stagnate fixed bin (35); 42 dcl time float bin (27); 43 44 45 dcl 1 o like opt_info_tune; 46 dcl 1 s like sys_info_tune; 47 48 dcl error_table_$bad_arg fixed bin (35) ext; 49 dcl error_table_$noarg fixed bin (35) ext; 50 51 dcl cu_$arg_count_rel entry (fixed bin, ptr, fixed bin (35)); 52 dcl cu_$arg_list_ptr entry (ptr); 53 dcl cu_$arg_ptr_rel entry (fixed bin, ptr, fixed bin (21), fixed bin (35), ptr); 54 dcl com_err_ entry () options (variable); 55 dcl hphcs_$disk_tune entry (char (*), ptr, char (*) varying, fixed bin (35)); 56 dcl ioa_ entry () options (variable); 57 58 dcl (addr, after, before, bin, float, null, substr) builtin; 59 60 dcl conversion condition; 61 62 /* Get arguments. */ 63 64 on conversion goto bad_arg; 65 66 call cu_$arg_list_ptr (arg_list_ptr); 67 call init_args; 68 69 if ^get_next_arg () then do; 70 call ioa_ ( 71 "Usage:^a drive_name io_type -load n -response m -or-^/^a reset_max -or-^/^a reset_sys -or-^/^a stagnate seconds -or-^/^a system io_type -max n -map io_type" 72 , MYNAME, MYNAME, MYNAME, MYNAME, MYNAME); 73 74 call ioa_ (" io_type is one of: ^(^a ^)", io_name); 75 return; 76 end; 77 78 else if arg = "reset_max" | arg = "reset_sys" then do; 79 call hphcs_$disk_tune (arg, null (), reason, code); 80 if code ^= 0 then 81 goto print_code; 82 return; 83 end; 84 else if arg = "stagnate" then do; 85 if ^get_next_arg () then 86 goto no_arg; 87 time = float (arg); 88 stagnate = time * 1000000.0; 89 if stagnate < 0 | stagnate > 360000000 then do; 90 call com_err_ (error_table_$bad_arg, MYNAME, "0 <= stagnate time <= 6 minutes."); 91 return; 92 end; 93 94 call hphcs_$disk_tune (STAGNATE_TIME, addr (stagnate), reason, code); 95 if code ^= 0 then 96 goto print_code; 97 return; 98 end; 99 100 else if arg = "system" then do; 101 s.type = get_io_type (); 102 s.max_depth, s.map = -1; 103 sys_arg_loop: 104 if ^get_next_arg () then 105 goto sys_arg_done; 106 if arg = "-max" then do; /* sys max_load */ 107 if ^get_next_arg () then 108 goto no_arg; 109 s.max_depth = bin (arg, 35); 110 goto sys_arg_loop; 111 end; 112 else if arg = "-map" then do; /* sys depth map */ 113 s.map = get_io_type (); 114 goto sys_arg_loop; 115 end; 116 goto bad_arg; 117 118 sys_arg_done: 119 if s.map < 0 & s.max_depth < 1 then 120 return; /* nothing modified */ 121 122 call hphcs_$disk_tune (SYS_TUNE, addr (s), reason, code); 123 if code ^= 0 then 124 goto print_code; 125 return; 126 end; 127 128 else if arg_len > 5 then 129 if substr (arg, 1, 3) = "dsk" & substr (arg, 5, 1) = "_" then do; 130 /* sub-system */ 131 o.sub_sys = before (arg, "_"); /* sub_sys name */ 132 o.dev = bin (after (arg, "_"), 17); /* device number */ 133 o.type = get_io_type (); /* io type to tune */ 134 o.load, o.response = -1; 135 136 opt_arg_loop: 137 if ^get_next_arg () then 138 goto opt_arg_done; 139 if arg = "-load" | arg = "-ld" then do; /* load limit */ 140 if ^get_next_arg () then 141 goto no_arg; 142 o.load = bin (arg, 17); 143 goto opt_arg_loop; 144 end; 145 else if arg = "-response" | arg = "-rsp" then do; 146 /* response */ 147 if ^get_next_arg () then 148 goto no_arg; 149 o.response = bin (arg, 35); 150 goto opt_arg_loop; 151 end; 152 goto bad_arg; 153 154 opt_arg_done: 155 if o.load < 1 then do; 156 call com_err_ (error_table_$noarg, MYNAME, "-load must be specified and >1."); 157 end; 158 159 if o.response < 1 then do; 160 call com_err_ (error_table_$noarg, MYNAME, "-response must be specified and >1."); 161 end; 162 if o.response < 1 | o.load < 1 then 163 return; 164 165 call hphcs_$disk_tune (OPT_TUNE, addr (o), reason, code); 166 if code ^= 0 then 167 goto print_code; 168 return; 169 end; 170 goto bad_arg; 171 172 exit: 173 return; 174 175 no_arg: 176 call com_err_ (error_table_$noarg, MYNAME, "after " || prev_arg); 177 return; 178 179 bad_arg: 180 call com_err_ (error_table_$bad_arg, MYNAME, arg); 181 return; 182 183 print_code: 184 call com_err_ (code, MYNAME, "Reason given is ""^a"".", reason); 185 return; 186 187 /* initialize argument processing. */ 188 189 init_args: 190 proc; 191 192 dcl code fixed bin (35); 193 194 arg_index = 1; 195 call cu_$arg_count_rel (arg_count, arg_list_ptr, code); 196 if code ^= 0 then 197 arg_count = 0; 198 return; 199 200 /* Get next arguments. Returns "0"b if failure. */ 201 202 get_next_arg: 203 entry returns (bit (1)); 204 205 if arg_index <= 1 then 206 prev_arg = ""; 207 else prev_arg = arg; 208 209 if arg_index <= arg_count then do; 210 call cu_$arg_ptr_rel (arg_index, arg_ptr, arg_len, code, arg_list_ptr); 211 if code = 0 then do; 212 arg_index = arg_index + 1; 213 return ("1"b); /* success */ 214 end; 215 end; 216 return ("0"b); /* no argument */ 217 218 219 get_io_type: 220 entry returns (fixed bin); 221 222 if ^get_next_arg () then 223 goto no_arg; 224 225 if arg = "test" then do; 226 call com_err_ (error_table_$bad_arg, MYNAME, "Cannot set TEST parms."); 227 goto exit; 228 end; 229 230 do i = 0 to MAX_IO_NAME; 231 if arg = io_name (i) then 232 return (i); 233 end; 234 call com_err_ (error_table_$bad_arg, MYNAME, "Unknown IO type " || arg || "."); 235 goto exit; 236 237 end init_args; 238 1 1 /* Begin include file ...... disk_tune.incl.pl1 84-05-16 */ 1 2 /* Structures used for passing tuning information to disk_control$tune. */ 1 3 1 4 /* Structure for sys_info operation. */ 1 5 1 6 /* type - indicates which system information IO type is to be altered. 1 7* max_depth - is the maximum depth permissible before full optimizaiton. 1 8* map - is the depth counter to utilize for determining depth. 1 9**/ 1 10 1 11 dcl 1 sys_info_tune aligned based, 1 12 2 type fixed bin, 1 13 2 max_depth fixed bin (35), 1 14 2 map fixed bin; 1 15 1 16 dcl SYS_TUNE char (8) static options (constant) initial ("sys_tune"); 1 17 1 18 /* Structure for optimizer tuning. */ 1 19 1 20 /* type - indicates which IO type is to be tuned. 1 21* sub_sys - indicates which sub-system is to be tuned. 1 22* dev - indicates the drive within the sub-system. 1 23* response - is the multiplier for maximum response. 1 24* load - is the fully optimized load point. 1 25**/ 1 26 1 27 dcl 1 opt_info_tune aligned based, 1 28 2 type fixed bin, 1 29 2 sub_sys char (4), 1 30 2 dev fixed bin, 1 31 2 response fixed bin (35), 1 32 2 load fixed bin; 1 33 1 34 dcl OPT_TUNE char (8) static options (constant) initial ("opt_tune"); 1 35 dcl STAGNATE_TIME char (8) static options (constant) 1 36 initial ("stagnate"); 1 37 dcl RESET_SYS char (9) static options (constant) 1 38 initial ("reset_sys"); /* reset sys_info.depth's */ 1 39 dcl RESET_MAX char (9) static options (constant) 1 40 initial ("reset_max"); /* reset max_depth's */ 1 41 1 42 /* Define character array matching io_types. */ 1 43 1 44 dcl MAX_IO_NAME fixed bin static options (constant) initial (5); 1 45 1 46 dcl io_name (0:4) char (10) static options (constant) 1 47 initial ("page_read", "page_write", "vtoc_read", "vtoc_write", "test"); 1 48 1 49 /* Define error code type names. */ 1 50 1 51 dcl code_names (6) char (32) static options (constant) 1 52 initial ("stagnate time range", 1 53 "invalid IO TYPE", 1 54 "invalid map IO TYPE", 1 55 "unknown sub-system", 1 56 "invalid device number", 1 57 "response < 1"); 1 58 1 59 /* End of include file ...... disk_tune.incl.pl1 */ 239 240 end tune_disk; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/09/90 0956.9 tune_disk.pl1 >spec>install>1036>tune_disk.pl1 239 1 10/02/84 0950.0 disk_tune.incl.pl1 >ldd>include>disk_tune.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. MAX_IO_NAME constant fixed bin(17,0) initial dcl 1-44 ref 230 MYNAME 000024 constant char(9) initial packed unaligned dcl 38 set ref 70* 70* 70* 70* 70* 90* 156* 160* 175* 179* 183* 226* 234* OPT_TUNE 000020 constant char(8) initial packed unaligned dcl 1-34 set ref 165* STAGNATE_TIME 000016 constant char(8) initial packed unaligned dcl 1-35 set ref 94* SYS_TUNE 000022 constant char(8) initial packed unaligned dcl 1-16 set ref 122* addr builtin function dcl 58 ref 94 94 122 122 165 165 after builtin function dcl 58 ref 132 arg based char packed unaligned dcl 28 set ref 78 78 79* 84 87 100 106 109 112 128 128 131 132 139 139 142 145 145 149 179* 207 225 231 234 arg_count 000100 automatic fixed bin(17,0) dcl 29 set ref 195* 196* 209 arg_index 000101 automatic fixed bin(17,0) dcl 30 set ref 194* 205 209 210* 212* 212 arg_len 000102 automatic fixed bin(21,0) dcl 31 set ref 78 78 79 79 84 87 100 106 109 112 128 128 128 131 132 139 139 142 145 145 149 179 179 207 210* 225 231 234 arg_list_ptr 000104 automatic pointer dcl 32 set ref 66* 195* 210* arg_ptr 000106 automatic pointer dcl 33 set ref 78 78 79 84 87 100 106 109 112 128 128 131 132 139 139 142 145 145 149 179 207 210* 225 231 234 before builtin function dcl 58 ref 131 bin builtin function dcl 58 ref 109 132 142 149 brief 000110 automatic bit(1) initial packed unaligned dcl 35 set ref 35* code 000111 automatic fixed bin(35,0) dcl 36 in procedure "td" set ref 79* 80 94* 95 122* 123 165* 166 183* code 000100 automatic fixed bin(35,0) dcl 192 in procedure "init_args" set ref 195* 196 210* 211 com_err_ 000022 constant entry external dcl 54 ref 90 156 160 175 179 183 226 234 conversion 000250 stack reference condition dcl 60 ref 64 cu_$arg_count_rel 000014 constant entry external dcl 51 ref 195 cu_$arg_list_ptr 000016 constant entry external dcl 52 ref 66 cu_$arg_ptr_rel 000020 constant entry external dcl 53 ref 210 dev 2 000237 automatic fixed bin(17,0) level 2 dcl 45 set ref 132* error_table_$bad_arg 000010 external static fixed bin(35,0) dcl 48 set ref 90* 179* 226* 234* error_table_$noarg 000012 external static fixed bin(35,0) dcl 49 set ref 156* 160* 175* float builtin function dcl 58 ref 87 hphcs_$disk_tune 000024 constant entry external dcl 55 ref 79 94 122 165 i 000112 automatic fixed bin(17,0) dcl 37 set ref 230* 231 231* io_name 000000 constant char(10) initial array packed unaligned dcl 1-46 set ref 74* 231 ioa_ 000026 constant entry external dcl 56 ref 70 74 load 4 000237 automatic fixed bin(17,0) level 2 dcl 45 set ref 134* 142* 154 162 map 2 000244 automatic fixed bin(17,0) level 2 dcl 46 set ref 102* 113* 118 max_depth 1 000244 automatic fixed bin(35,0) level 2 dcl 46 set ref 102* 109* 118 null builtin function dcl 58 ref 79 79 o 000237 automatic structure level 1 unaligned dcl 45 set ref 165 165 opt_info_tune based structure level 1 dcl 1-27 prev_arg 000113 automatic varying char(256) dcl 39 set ref 175 205* 207* reason 000214 automatic varying char(64) dcl 40 set ref 79* 94* 122* 165* 183* response 3 000237 automatic fixed bin(35,0) level 2 dcl 45 set ref 134* 149* 159 162 s 000244 automatic structure level 1 unaligned dcl 46 set ref 122 122 stagnate 000235 automatic fixed bin(35,0) dcl 41 set ref 88* 89 89 94 94 sub_sys 1 000237 automatic char(4) level 2 packed packed unaligned dcl 45 set ref 131* substr builtin function dcl 58 ref 128 128 sys_info_tune based structure level 1 dcl 1-11 time 000236 automatic float bin(27) dcl 42 set ref 87* 88 type 000244 automatic fixed bin(17,0) level 2 in structure "s" dcl 46 in procedure "td" set ref 101* type 000237 automatic fixed bin(17,0) level 2 in structure "o" dcl 45 in procedure "td" set ref 133* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. RESET_MAX internal static char(9) initial packed unaligned dcl 1-39 RESET_SYS internal static char(9) initial packed unaligned dcl 1-37 code_names internal static char(32) initial array packed unaligned dcl 1-51 NAMES DECLARED BY EXPLICIT CONTEXT. bad_arg 001271 constant label dcl 179 ref 64 116 152 170 exit 001230 constant label dcl 172 ref 227 235 get_io_type 001536 constant entry internal dcl 219 ref 101 113 133 get_next_arg 001416 constant entry internal dcl 202 ref 69 85 103 107 136 140 147 222 init_args 001353 constant entry internal dcl 189 ref 67 no_arg 001231 constant label dcl 175 set ref 85 107 140 147 222 opt_arg_done 001111 constant label dcl 154 ref 136 opt_arg_loop 001011 constant label dcl 136 ref 143 150 print_code 001316 constant label dcl 183 ref 80 95 123 166 sys_arg_done 000672 constant label dcl 118 ref 103 sys_arg_loop 000615 constant label dcl 103 ref 110 114 td 000254 constant entry external dcl 19 tune_disk 000264 constant entry external dcl 19 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2120 2150 1750 2130 Length 2356 1750 30 171 150 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME td 412 external procedure is an external procedure. on unit on line 64 64 on unit init_args 106 internal procedure calls itself recursively. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME init_args 000100 code init_args td 000100 arg_count td 000101 arg_index td 000102 arg_len td 000104 arg_list_ptr td 000106 arg_ptr td 000110 brief td 000111 code td 000112 i td 000113 prev_arg td 000214 reason td 000235 stagnate td 000236 time td 000237 o td 000244 s td THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this call_int_other return_mac fl2_to_fx1 tra_ext_1 signal_op enable_op shorten_stack ext_entry int_entry real_to_real_round_ any_to_any_round_ any_to_any_truncate_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count_rel cu_$arg_list_ptr cu_$arg_ptr_rel hphcs_$disk_tune ioa_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 35 000247 19 000253 64 000272 66 000311 67 000320 69 000324 70 000335 74 000365 75 000405 78 000406 79 000420 80 000451 82 000453 84 000454 85 000460 87 000471 88 000511 89 000515 90 000520 91 000544 94 000545 95 000574 97 000576 100 000577 101 000603 102 000611 103 000615 106 000626 107 000634 109 000645 110 000655 112 000656 113 000662 114 000670 116 000671 118 000672 122 000677 123 000726 125 000730 128 000731 131 000743 132 000753 133 000777 134 001005 136 001011 139 001022 140 001034 142 001045 143 001055 145 001056 147 001066 149 001077 150 001107 152 001110 154 001111 156 001114 159 001140 160 001143 162 001167 165 001175 166 001224 168 001226 170 001227 172 001230 175 001231 177 001267 179 001271 181 001315 183 001316 185 001351 189 001352 194 001362 195 001365 196 001377 198 001403 202 001415 205 001425 207 001433 209 001444 210 001447 211 001466 212 001470 213 001472 216 001514 219 001535 222 001544 225 001561 226 001570 227 001617 230 001622 231 001632 233 001671 234 001673 235 001742 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved