1 /****^  ***********************************************************
  2         *                                                         *
  3         * Copyright, (C) Honeywell Bull Inc., 1987                *
  4         *                                                         *
  5         * Copyright, (C) Honeywell Information Systems Inc., 1982 *
  6         *                                                         *
  7         *********************************************************** */
  8         /* use: pl1_macro hc_tune.pl1.pmac */
  9 
 10 hc_tune: proc ();
 11 
 12 /* *      HC_TUNE
 13    *
 14    *      This procedure manages the getting and setting of system tuning parameters.
 15    *      It is organized in a somewhat unusual fashion for a PL/I program, in order to
 16    *      make the addition of new tuning parameters as simple as possible. All the tuning
 17    *      parameters appear in a section of code at the very end of this program. A complex
 18    *      mechanism of gotos and label variables is used to minize the size of the program,
 19    *      and, more importantly, to make the description of individual tuning parameters
 20    *      as simple and straightforward as possible. Each tuning parameter must be a single
 21    *      word quantity at some known address in the supervisor, and is described by a
 22    *      block of code like this:
 23    *
 24    *      dcl  tc_data$post_purge_switch fixed bin (35) external static;
 25    *      %set NUM to NUM + 1;
 26    *      TP (NUM): call tp_init (addr (tc_data$post_purge_switch),
 27    *                     "post_purge", "pp", TP_ON_OFF);
 28    *
 29    *                call on_or_off ();
 30    *                goto RETURN;
 31    *
 32    *      The parameters to tp_init are:
 33    *         1) The location of the value in the supervisor address space.
 34    *         2) The long name of the tuning parameter.
 35    *         3) The short name. If the short name is "", it will be the same as the long name.
 36    *         4) The type, as defined in tuning_parameter_info.incl.pl1
 37    *
 38    *      Additionally, the value tp_special may be set to "1"b to indicate that this parameter
 39    *      is not to be listed by a normal listing operation. It is intended for internal system
 40    *      parameters, solely in order to make them easy to set by other than patching.
 41    *
 42    *      There are two procedures available to insure that an input value is acceptable. The
 43    *      range procedure is called with two limits, and aborts an attempt to set if the value
 44    *      falls outside the limits of the specified range. The on_or_off procedure aborts if
 45    *      an attempt is made to set an on/off parameter to an invalid value. Additionally, the
 46    *      procedure abort may be called if it is necessary to invalid a n attempt to set a
 47    *      tuning parameter for some other, more complex, reason.
 48    *
 49    *      The existing examples in this program should be used as guidelines for how to add
 50    *      and name new tuning parameters.
 51    *
 52    *      04/21/81, W. Olin Sibert
 53    *      Modified 10/24/81, J. Bongiovanni, to fix bug in maxabs
 54    *      Modified February 1982, BIM, for stack truncation parameters
 55    *      Modified March 1982, J. Bongiovanni, for trap_invalid_masked, wsf bug fix
 56    *      Modified April 1982, J. Bongiovanni, gv_integration
 57    *      Modified July 1982, J. Bongiovanni, meter_ast_locking
 58    *      Modified August 1982, J. Bongiovanni, realtime_io parameters
 59    *      Modified October 1982, J. Bongiovanni, checksum_filemap
 60    *      Modified February 1983, E. N. Kittlitz, default_256K_enable
 61    *      Modified October 1984, M. Pandolf, dirlock_writebehind
 62    */
 63 
 64 /* ^L */
 65 
 66 dcl  P_input_name char (32) parameter;                      /* Name of parameter to get or set */
 67 dcl  P_old_value bit (36) aligned parameter;                /* Current value for parameter */
 68 dcl  P_new_value bit (36) aligned parameter;                /* New value, for setting */
 69 dcl  P_tp_ptr pointer parameter;                            /* Its address (in ring zero) */
 70 dcl  P_long_name char (*) parameter;                        /* Long name, for output */
 71 dcl  P_short_name char (*) parameter;                       /* Short name, for output */
 72 dcl  P_error char (*) parameter;                            /* Description of error while setting, if any */
 73 dcl  P_tp_type fixed bin parameter;                         /* Its type */
 74 dcl  P_area_ptr pointer parameter;                          /* Pointer to area for parameter list allocation */
 75 dcl  P_special_flag bit (1) aligned parameter;              /* Whether to return "special" values, in a listing */
 76 dcl  P_tp_count fixed bin parameter;                        /* Number of defined tuning parameters */
 77 dcl  P_tp_list_ptr pointer parameter;                       /* Pointer to returned array of info */
 78 dcl  P_code fixed bin (35) parameter;                       /* Error code */
 79 
 80 dcl  input_name char (32);
 81 dcl  function fixed bin;                                    /* What we are supposed to do */
 82 dcl  return_label label variable internal local;            /* Used for our pseudo-subroutine call mechanism */
 83 dcl  lookup_return_label variable label internal local;
 84 dcl  severity fixed bin;                                    /* Severity code for syserr call */
 85 dcl  code fixed bin (35);
 86 dcl  return_special bit (1) aligned;                        /* Whether to list "special" parameters */
 87 dcl  error_reason char (128);                               /* Description of error encountered in setting */
 88 
 89 dcl  based_value bit (36) aligned based;                    /* For parameter assignment */
 90 
 91 dcl  list_area area based (list_area_ptr);
 92 dcl  list_area_ptr pointer;
 93 
 94 dcl 1 tp_list (tp_list_size) based (tp_list_ptr) like tp_info;
 95 dcl  tp_list_ptr pointer;
 96 dcl  tp_list_size fixed bin;
 97 dcl  list_idx fixed bin;
 98 
 99 dcl  tp_ptr pointer;                                        /* Pointer to tuning parameter currently of interest */
100 dcl  tp_type fixed bin;                                     /* Type of this tuning parameter */
101 dcl  tp_idx fixed bin;                                      /* Its index */
102 dcl  tp_short_name char (16);                               /* Short and long names */
103 dcl  tp_long_name char (32);
104 dcl  tp_special bit (1) aligned;                            /* Whether it is "special" */
105 
106 dcl  tp_value bit (36) aligned;                             /* Current value, as bits */
107 dcl  binary_value fixed bin (35) aligned;                   /* unspec equivalent of tp_value */
108 dcl  scaled_value fixed bin (35, 18) aligned;               /* unspec equivalent of tp_value */
109 dcl  char_value char (4) aligned;                           /* unspec equivalent of tp_value */
110 dcl  float_value float bin (27) aligned;                    /* unspec equivalent of tp_value */
111 
112 dcl  new_value bit (36) aligned;                            /* New value, as above */
113 dcl  new_binary_value fixed bin (35) aligned;
114 dcl  new_scaled_value fixed bin (35, 18) aligned;
115 dcl  new_char_value char (4) aligned;
116 dcl  new_float_value float bin (27) aligned;
117 
118 dcl  pds$process_group_id char (32) aligned external static;
119 
120 dcl  error_table_$unknown_tp fixed bin (35) external static;
121 dcl  error_table_$invalid_tp_value fixed bin (35) external static;
122 
123 dcl  syserr entry options (variable);
124 
125 dcl  ONE_SECOND fixed bin (35) internal static options (constant) init (1000000); /* Assorted limits in microseconds */
126 dcl  ONE_MINUTE fixed bin (35) internal static options (constant) init (60000000);
127 dcl  TEN_MINUTES fixed bin (35) internal static options (constant) init (600000000);
128 dcl  FIVE_HOURS fixed bin (35) internal static options (constant) init (18000000000);
129 
130 dcl  SCALE fixed bin (35) internal static options (constant) init (262144); /* Converts fixed bin (35) to (35,18) */
131 
132 dcl  LIST init (1) fixed bin internal static options (constant);
133 dcl  GET init (2) fixed bin internal static options (constant);
134 dcl  SET init (3) fixed bin internal static options (constant);
135 
136 dcl (addr, decimal, divide, float, hbound, round, trunc, unspec) builtin;
137 
138 /* ^L */
139 
140 hc_tune$get: entry (P_input_name, P_tp_type, P_old_value, P_tp_ptr, P_long_name, P_short_name, P_code);
141 
142 /* This entrypoint returns the address and present value of the named tuning parameter.
143    It will return an error code if the tuning parameter does not exist. It is accessed
144    via metering_gate_$get_tuning_parameter */
145 
146           input_name = P_input_name;                        /* Copy input parameter */
147           function = GET;                                   /* Say what we're doing */
148           code = 0;
149 
150           return_label = GET_LOOKUP_RETURNS;
151           goto LOOKUP;                                      /* Find it, set idx & code */
152 
153 GET_LOOKUP_RETURNS:
154           if code ^= 0 then do;                             /* Couldn't find it */
155                P_code = code;
156                return;
157                end;
158 
159           P_old_value = tp_value;                           /* Return value and address */
160           P_tp_ptr = tp_ptr;
161           P_tp_type = tp_type;
162           P_long_name = tp_long_name;
163           P_short_name = tp_short_name;
164 
165           P_code = 0;
166           return;                                           /* End of hc_tune$get */
167 
168 /* ^L */
169 
170 hc_tune$set: entry (P_input_name, P_new_value, P_old_value, P_tp_ptr, P_error, P_code);
171 
172 /* This entry sets a tuning parameter, also returning its old value and address. The change
173    is announced on the BOS console. It is accessed via hphcs_$set_tuning_parameter */
174 
175           severity = ANNOUNCE;
176           goto SET_COMMON;
177 
178 
179 hc_tune$set_silent: entry (P_input_name, P_new_value, P_old_value, P_tp_ptr, P_error, P_code);
180 
181 /* This entry sets a tuning parameter, as above, but logs the change without typing it out.
182    Used only by the Initializer, it is accessed via initializer_gate_$set_tuning_parameter */
183 
184           severity = LOG;
185           goto SET_COMMON;
186 
187 
188 SET_COMMON:
189           code = 0;
190           input_name = P_input_name;                        /* Copy input parameter */
191           new_value = P_new_value;
192           unspec (new_binary_value) = new_value;            /* Make it available in all its forms */
193           unspec (new_scaled_value) = new_value;
194           unspec (new_char_value) = new_value;
195           unspec (new_float_value) = new_value;
196 
197           function = GET;                                   /* First, find it */
198           return_label = SET_LOOKUP_RETURNS;
199           goto LOOKUP;                                      /* Find it, set idx & code */
200 
201 SET_LOOKUP_RETURNS:
202           if code ^= 0 then do;                             /* Can't set it */
203                P_code = code;
204                P_error = error_reason;
205                return;
206                end;
207 
208           P_old_value = tp_value;                           /* Return value and address */
209           P_tp_ptr = tp_ptr;
210 
211           function = SET;                                   /* Next, check whether the new value is valid */
212           return_label = SET_CHECK_RETURNS;
213           goto TP (tp_idx);
214 
215 SET_CHECK_RETURNS:
216           if code ^= 0 then do;                             /* Can't set it */
217                P_code = code;
218                P_error = error_reason;
219                return;
220                end;
221 
222 /* ^L */
223 
224           if tp_type = TP_CHAR then                         /* Call syserr to announce the change */
225                call syserr (severity, "hc_tune: Changing ^a from ""^4a"" to ""^4a"" for ^a",
226                     tp_long_name, char_value, new_char_value, pds$process_group_id);
227 
228           else if tp_type = TP_INTEGER then
229                call syserr (severity, "hc_tune: Changing ^a from ^d to ^d for ^a",
230                     tp_long_name, binary_value, new_binary_value, pds$process_group_id);
231 
232           else if tp_type = TP_SCALED_INTEGER then
233                call syserr (severity, "hc_tune: Changing ^a from ^f to ^f for ^a",
234                     tp_long_name, round (decimal (scaled_value), 4),
235                     round (decimal (new_scaled_value), 4), pds$process_group_id);
236 
237           else if tp_type = TP_MICROSECONDS then
238                call syserr (severity, "hc_tune: Changing ^a from ^f to ^f seconds for ^a",
239                     tp_long_name, (float (binary_value) / 1.0e6),
240                     (float (new_binary_value) / 1.0e6), pds$process_group_id);
241 
242           else if tp_type = TP_ON_OFF then
243                call syserr (severity, "hc_tune: Changing ^a from ^[on^;off^] to ^[on^;off^] for ^a",
244                     tp_long_name, (binary_value ^= 0), (new_binary_value ^= 0), pds$process_group_id);
245 
246           else if tp_type = TP_FLOAT
247           then call syserr (severity, "hc_tune: Changing ^a from ^f to ^f for ^a.",
248                     tp_long_name, float_value, new_float_value, pds$process_group_id);
249 
250           else call syserr (severity, "hc_tune: Changing ^a from ^w to ^w for ^a",
251                     tp_long_name, tp_value, new_value, pds$process_group_id);
252 
253 
254           tp_ptr -> based_value = new_value;                /* Do it */
255 
256           P_code = 0;
257           P_error = "";
258           return;                                           /* End of hc_tune$get */
259 
260 /* ^L */
261 
262 hc_tune$list: entry (P_area_ptr, P_special_flag, P_tp_count, P_tp_list_ptr);
263 
264 /* This entrypoint returns a list of all the defined tuning parameters, and their current
265    values. If P_special_flag is set, it returns all parameters, including special ones.
266    It is accessed via metering_gate_$list_tuning_parameters. */
267 
268           input_name = "";
269           code = 0;
270 
271           list_area_ptr = P_area_ptr;
272           return_special = P_special_flag;
273 
274           function = LIST;
275 
276           return_label = LIST_COUNT_RETURNS;                /* "return" to our label, below */
277           tp_list_size = 0;                                 /* start out empty */
278           do tp_idx = 1 to hbound (TP, 1);                  /* First, count them */
279                goto TP (tp_idx);                            /* "call" */
280 LIST_COUNT_RETURNS:
281                if return_special | (^tp_special) then tp_list_size = tp_list_size + 1;
282                end;
283 
284           allocate tp_list in (list_area) set (tp_list_ptr); /* Make room to return to our caller */
285 
286           return_label = LIST_LISTING_RETURNS;              /* "return" to our label, below */
287           list_idx = 1;                                     /* start out with the first one */
288           do tp_idx = 1 to hbound (TP, 1);                  /* Get info for each parameter, again */
289                goto TP (tp_idx);                            /* "call" to get info on this parameter */
290 LIST_LISTING_RETURNS:                                       /* and "return" here */
291                if tp_special & (^return_special) then goto LIST_NOT_RETURN_THIS_ONE;
292 
293                tp_list (list_idx).type = tp_type;
294                tp_list (list_idx).long_name = tp_long_name;
295                tp_list (list_idx).short_name = tp_short_name;
296                tp_list (list_idx).ptr = tp_ptr;
297                tp_list (list_idx).value = tp_value;
298                tp_list (list_idx).special = tp_special;
299                list_idx = list_idx + 1;
300 
301 LIST_NOT_RETURN_THIS_ONE:
302                end;
303 
304           P_tp_count = tp_list_size;                        /* Return info */
305           P_tp_list_ptr = tp_list_ptr;
306 
307           return;                                           /* End of hc_tune$list */
308 
309 /* ^L */
310 
311 tp_init: proc (P_tp_ptr, P_long_name, P_short_name, P_type);
312 
313 dcl  P_tp_ptr pointer parameter;
314 dcl  P_long_name char (*) parameter;
315 dcl  P_short_name char (*) parameter;
316 dcl  P_type fixed bin;
317 
318 /* This procedure initializes values for a single tuning parameter */
319 
320           tp_ptr = P_tp_ptr;
321           tp_long_name = P_long_name;
322           tp_short_name = P_short_name;
323           tp_type = P_type;
324           if tp_short_name = "" then tp_short_name = tp_long_name;
325 
326           tp_special = "0"b;
327           code = 0;
328 
329           tp_value = tp_ptr -> based_value;                 /* Get the value from ring zero */
330 
331           unspec (binary_value) = tp_value;
332           unspec (scaled_value) = tp_value;
333           unspec (char_value) = tp_value;
334           unspec (float_value) = tp_value;
335 
336           return;
337           end tp_init;
338 
339 /* ^L */
340 
341 /* This portion of the program decides whether a particular tuning parameter exists, and
342    sets code and tp_idx appropriately. */
343 
344 LOOKUP:   lookup_return_label = return_label;               /* Save return label, for "recursion" */
345 
346           return_label = LOOKUP_INTERNAL_RETURN;
347           do tp_idx = 1 to hbound (TP, 1);                  /* Try each one in its turn */
348                goto TP (tp_idx);                            /* "call" */
349 LOOKUP_INTERNAL_RETURN:
350                if tp_long_name = input_name then goto lookup_return_label; /* This is the one we want */
351                if tp_short_name = input_name then goto lookup_return_label;
352                end;
353 
354           code = error_table_$unknown_tp;                   /* Sorry, no sale */
355           error_reason = "";
356           tp_idx = -1;
357           goto lookup_return_label;                         /* "return" */
358 
359 
360 
361 /* This part of the program finishes off the lookup/checking of each individual tuning parameter */
362 
363 RETURN:   goto return_label;                                /* Set all values, etc. */
364 
365 
366 
367 
368 /* This label is used to indicate that a parameter cannot be set to the requested value
369    for some reason. No attempt is made to describe the reason, however. */
370 
371 ABORT_SETTING:
372           code = error_table_$invalid_tp_value;
373 
374           goto return_label;
375 
376 /* ^L */
377 
378 range: proc (P_lower, P_upper, P_range_description);
379 
380 /* This procedure insures that, for set attempts only, the specified value is within range */
381 
382 dcl  P_lower fixed bin (35) parameter;
383 dcl  P_upper fixed bin (35) parameter;
384 dcl  P_range_description char (*) parameter;
385 
386 
387           if function ^= SET then return;                   /* Not setting, ignore it */
388 
389           if new_binary_value < P_lower then call abort (P_range_description);
390           if new_binary_value > P_upper then call abort (P_range_description);
391 
392           return;                                           /* All OK */
393           end range;
394 
395 
396 
397 need_integer: proc ();
398 
399 /* This procedure aborts if a scaled "integer" is not actually an integral value */
400 
401           if function ^= SET then return;
402 
403           if trunc (new_scaled_value) ^= new_scaled_value then
404                call abort ("an integer value");
405 
406           return;
407           end need_integer;
408 
409 
410 
411 on_or_off: proc ();
412 
413 /* This procedure rejects attempts to set on/off parameters to invalid values */
414 
415           if function ^= SET then return;                   /* Not setting, ignore it */
416 
417           if new_binary_value ^= 0 then
418                if new_binary_value ^= 1 then
419                     call abort ("Not ""on"" or ""off""");
420 
421           return;                                           /* All OK */
422           end on_or_off;
423 
424 
425 /* COMMENT THIS IN WHEN A FLOATING POINT PARM IS DEFINED */
426 
427 
428 /* float_range:
429 /*        procedure (P_lower, P_upper, P_range_description);
430 /*
431 /*        declare (P_lower, P_upper) float bin (27) aligned;
432 /*        declare P_range_description character (*);
433 
434 /*        if function ^= SET then return;
435 
436 /*        if new_float_value < P_lower | new_float_value > P_upper
437 /*        then call abort (P_range_description);
438 
439 /*        return;
440 /*        end float_range;
441 */
442 scaled_range:
443           procedure (P_lower, P_upper, P_range_description);
444 
445           declare (P_lower, P_upper) fixed bin (35, 18);
446           declare P_range_description character (*);
447 
448           if function ^= SET
449           then return;
450 
451           if new_scaled_value < P_lower | new_scaled_value > P_upper
452           then call abort (P_range_description);
453 
454           return;
455           end scaled_range;
456 
457 
458 abort: proc (P_reason);
459 
460 /* This procedure just performs an abort -- it would be used anywhere the
461    valid values cannot be tested by either of the above procedures. It is a
462    procedure only in order to retain the general procedural structure of this
463    program. */
464 
465 dcl  P_reason char (*);
466 
467 
468           error_reason = P_reason;
469 
470           goto ABORT_SETTING;
471 
472           end abort;
473 
474 /* ^L */
475 
476 /* At last, the tuning parameters themselves: */
477 
478 %set NUM to 0;
479 
480 dcl  tc_data$tefirst fixed bin (35) external static;
481 %set NUM to NUM + 1;
482 TP (NUM): call tp_init (addr (tc_data$tefirst),
483                "tefirst", "", TP_MICROSECONDS);
484 
485           call range (500, ONE_MINUTE, "between 500 us. and one minute");
486           goto RETURN;
487 
488 
489 
490 dcl  tc_data$telast fixed bin (35) external static;
491 %set NUM to NUM + 1;
492 TP (NUM): call tp_init (addr (tc_data$telast),
493                "telast", "", TP_MICROSECONDS);
494 
495           call range (500, ONE_MINUTE, "between 500 us. and one minute");
496           if function = SET
497                then if ^tc_data$gv_integration_set
498                     then tc_data$gv_integration = 4 * new_binary_value;
499           goto RETURN;
500 
501 
502 
503 dcl  tc_data$timax fixed bin (35) external static;
504 %set NUM to NUM + 1;
505 TP (NUM): call tp_init (addr (tc_data$timax),
506                "timax", "", TP_MICROSECONDS);
507 
508           call range (500, ONE_MINUTE, "between 500 us. and one minute");
509           goto RETURN;
510 
511 
512 
513 dcl  tc_data$priority_sched_inc fixed bin (35) external static;
514 %set NUM to NUM + 1;
515 TP (NUM): call tp_init (addr (tc_data$priority_sched_inc),
516                "priority_sched_inc", "psi", TP_MICROSECONDS);
517 
518           call range (100000, FIVE_HOURS, "between 100 ms. and five hours");
519           goto RETURN;
520 
521 
522 
523 dcl  tc_data$ncpu fixed bin (35) external static;
524 dcl  tc_data$max_max_eligible fixed bin (35) external static;
525 dcl  tc_data$min_eligible fixed bin (35) external static;
526 %set NUM to NUM + 1;
527 TP (NUM): call tp_init (addr (tc_data$min_eligible),
528                "min_eligible", "mine", TP_SCALED_INTEGER);
529 
530           call need_integer ();
531           call range ((tc_data$ncpu * SCALE), (tc_data$max_eligible), "at least as large as the number of cpus");
532           call range (0, (tc_data$max_eligible), "not greater than max_eligible");
533           goto RETURN;                                      /* up to the maximum allowed */
534 
535 
536 
537 dcl  tc_data$max_eligible fixed bin (35) external static;
538 %set NUM to NUM + 1;
539 TP (NUM): call tp_init (addr (tc_data$max_eligible),
540                "max_eligible", "maxe", TP_SCALED_INTEGER);
541 
542           call need_integer ();
543           call range ((tc_data$min_eligible), (tc_data$max_max_eligible), "between min_eligible and max_max_eligible");
544           goto RETURN;                                      /* up to the maximum allowed */
545 
546 
547 
548 dcl  tc_data$max_batch_elig fixed bin (35) external static;
549 %set NUM to NUM + 1;
550 TP (NUM): call tp_init (addr (tc_data$max_batch_elig),
551                "max_batch_elig", "maxabs", TP_INTEGER);
552 
553           call range (0, (tc_data$max_eligible), "between 0 and max_eligible");
554           goto RETURN;
555 
556 
557 
558 dcl  tc_data$working_set_factor fixed bin (35) external static;
559 %set NUM to NUM + 1;
560 TP (NUM): call tp_init (addr (tc_data$working_set_factor),
561                "working_set_factor", "wsf", TP_SCALED_INTEGER);
562 
563           call range (0, (2 * SCALE), "between 0 and 2");
564           goto RETURN;
565 
566 
567 
568 dcl  tc_data$working_set_addend fixed bin (35) external static;
569 %set NUM to NUM + 1;
570 TP (NUM): call tp_init (addr (tc_data$working_set_addend),
571                "working_set_addend", "wsa", TP_INTEGER);
572 
573           call range (-1000, 1000, "between -1000 and 1000");
574           goto RETURN;
575 
576 
577 
578 dcl  tc_data$deadline_mode fixed bin (35) external static;
579 %set NUM to NUM + 1;
580 TP (NUM): call tp_init (addr (tc_data$deadline_mode),
581                "deadline_mode", "dmode", TP_ON_OFF);
582 
583           call on_or_off ();                                /* only two possible values */
584           goto RETURN;
585 
586 
587 
588 dcl  tc_data$int_q_enabled fixed bin (35) external static;
589 %set NUM to NUM + 1;
590 TP (NUM): call tp_init (addr (tc_data$int_q_enabled),
591                "int_q_enabled", "intq", TP_ON_OFF);
592 
593           call on_or_off ();                                /* only two possible values */
594           goto RETURN;
595 
596 
597 
598 dcl  tc_data$post_purge_switch fixed bin (35) external static;
599 %set NUM to NUM + 1;
600 TP (NUM): call tp_init (addr (tc_data$post_purge_switch),
601                "post_purge", "pp", TP_ON_OFF);
602 
603           call on_or_off ();                                /* only two possible values */
604           goto RETURN;
605 
606 
607 
608 dcl  tc_data$pre_empt_sample_time fixed bin (35) external static;
609 %set NUM to NUM + 1;
610 TP (NUM): call tp_init (addr (tc_data$pre_empt_sample_time),
611                "pre_empt_sample_time", "pest", TP_MICROSECONDS);
612 
613           call range (500, ONE_SECOND, "between 500 us. and one second");
614           goto RETURN;
615 
616 
617 
618 dcl  tc_data$gp_at_notify fixed bin (35) external static;
619 %set NUM to NUM + 1;
620 TP (NUM): call tp_init (addr (tc_data$gp_at_notify),
621                "gp_at_notify", "gpn", TP_ON_OFF);
622 
623           call on_or_off ();                                /* only two possible values */
624           goto RETURN;
625 
626 
627 
628 dcl  tc_data$gp_at_ptlnotify fixed bin (35) external static;
629 %set NUM to NUM + 1;
630 TP (NUM): call tp_init (addr (tc_data$gp_at_ptlnotify),
631                "gp_at_ptlnotify", "gpp", TP_ON_OFF);
632 
633           call on_or_off ();                                /* only two possible values */
634           goto RETURN;
635 
636 
637 
638 dcl  tc_data$process_initial_quantum fixed bin (35) external static;
639 %set NUM to NUM + 1;
640 TP (NUM): call tp_init (addr (tc_data$process_initial_quantum),
641                "process_initial_quantum", "piq", TP_MICROSECONDS);
642 
643           call range (100000, (30 * ONE_SECOND), "between 100 ms. and 30 seconds");
644           goto RETURN;
645 
646 
647 
648 dcl  tc_data$quit_priority fixed bin (35) external static;
649 %set NUM to NUM + 1;
650 TP (NUM): call tp_init (addr (tc_data$quit_priority),
651                "quit_priority", "qp", TP_SCALED_INTEGER);
652 
653           call range (0, (2 * SCALE), "between zero and two");
654           goto RETURN;
655 
656 
657 
658 dcl  tc_data$nto_delta fixed bin (35) external static;
659 %set NUM to NUM + 1;
660 TP (NUM): call tp_init (addr (tc_data$nto_delta),
661                "notify_timeout_interval", "nto_delta", TP_MICROSECONDS);
662 
663           call range (ONE_SECOND, TEN_MINUTES, "between one second and ten minutes");
664           goto RETURN;
665 
666 
667 
668 dcl  tc_data$time_out_severity fixed bin (35) external static;
669 %set NUM to NUM + 1;
670 TP (NUM): call tp_init (addr (tc_data$time_out_severity),
671                "notify_timeout_severity", "nto_severity", TP_INTEGER);
672 
673           call range (-1, 5, "any of -1, 0, 1, 3, 4, or 5");          /* Disallow 2 */
674           if new_binary_value = 2 then call abort ("any of -1, 0, 1, 3, 4, or 5");
675           goto RETURN;
676 
677 
678 
679 dcl  sst$nused fixed bin (35) external static;
680 dcl  sst$write_limit fixed bin (35) external static;
681 %set NUM to NUM + 1;
682 TP (NUM): call tp_init (addr (sst$write_limit),
683                "write_limit", "wlim", TP_INTEGER);
684 
685           call range (30, divide (sst$nused, 2, 35, 0), "between 30 pages and half of memory");
686           goto RETURN;
687 
688 %set NUM to NUM + 1;
689 declare tc_data$stk_truncate bit (1) ext static;
690 TP (NUM): call tp_init (addr (tc_data$stk_truncate),
691    "stack_truncation", "stkt", TP_ON_OFF);
692 
693           tp_special = "1"b;
694           call on_or_off ();
695           goto RETURN;
696 
697 declare tc_data$stk_truncate_always bit (1) aligned ext;
698 
699 %set NUM to NUM + 1;
700 TP (NUM): call tp_init (addr (tc_data$stk_truncate_always),
701        "stack_truncation_always", "stta", TP_ON_OFF);
702 
703           tp_special = "1"b;
704           call on_or_off;
705           goto RETURN;
706 
707 %set NUM to NUM + 1;
708 declare tc_data$stk_trunc_avg_f1 aligned fixed bin (35, 18) ext static;
709 declare tc_data$stk_trunc_avg_f2 aligned fixed bin (35, 18) ext static;
710 
711 TP (NUM): call tp_init (addr (tc_data$stk_trunc_avg_f1),
712                "stk_trunc_block_avg_factor", "stk_baf",
713               TP_SCALED_INTEGER);
714 
715            tp_special = "1"b;
716            call scaled_range (0b, 1b, "between zero and one.");
717 
718           if function = SET
719           then tc_data$stk_trunc_avg_f2 = 1b - tc_data$stk_trunc_avg_f1;
720 
721            goto RETURN;
722 
723 
724 %set NUM to NUM + 1;
725 declare wired_hardcore_data$trap_invalid_masked bit (1) aligned ext static;
726 TP (NUM): call tp_init (addr (wired_hardcore_data$trap_invalid_masked),
727    "trap_invalid_masked", "", TP_ON_OFF);
728 
729           tp_special = "1"b;
730           call on_or_off ();
731           goto RETURN;
732 
733 %set NUM to NUM + 1;
734 declare tc_data$gv_integration fixed bin (35) external static;
735 declare tc_data$gv_integration_set bit (1) aligned external static;
736 
737 TP (NUM): call tp_init (addr (tc_data$gv_integration),
738    "gv_integration", "", TP_MICROSECONDS);
739 
740           call range ((tc_data$telast), FIVE_HOURS, "between telast and 5 hours");
741 
742           if function = SET
743                then tc_data$gv_integration_set = "1"b;
744           goto RETURN;
745 
746 
747 dcl  sst$meter_ast_locking fixed bin (35) external static;
748 %set NUM to NUM + 1;
749 TP (NUM): call tp_init (addr (sst$meter_ast_locking),
750                "meter_ast_locking", "", TP_ON_OFF);
751 
752           tp_special = "1"b;
753           call on_or_off ();
754           goto RETURN;
755 
756 
757 dcl  tc_data$realtime_io_priority_switch fixed bin (35) external static;
758 %set NUM to NUM + 1;
759 TP (NUM): call tp_init (addr (tc_data$realtime_io_priority_switch),
760                "realtime_io_priority", "io_prior", TP_ON_OFF);
761 
762           call on_or_off ();
763           goto RETURN;
764 
765 
766 dcl  tc_data$realtime_io_deadline fixed bin (35) external static;
767 %set NUM to NUM + 1;
768 TP (NUM): call tp_init (addr (tc_data$realtime_io_deadline),
769                "realtime_io_deadline", "io_deadline", TP_MICROSECONDS);
770 
771           call range (500, ONE_MINUTE, "between 500 us. and one minute");
772           goto RETURN;
773 
774 
775 dcl  tc_data$realtime_io_quantum fixed bin (35) external static;
776 %set NUM to NUM + 1;
777 TP (NUM): call tp_init (addr (tc_data$realtime_io_quantum),
778                "realtime_io_quantum", "io_quantum", TP_MICROSECONDS);
779 
780           call range (500, ONE_MINUTE, "between 500 us. and one minute");
781           goto RETURN;
782 
783 dcl  sst$checksum_filemap fixed bin (35) external static;
784 %set NUM to NUM + 1;
785 TP (NUM): call tp_init (addr (sst$checksum_filemap),
786                "checksum_filemap", "", TP_ON_OFF);
787 
788           tp_special = "1"b;
789           call on_or_off ();
790           goto RETURN;
791 
792 dcl  sys_info$default_256K_enable bit (1) aligned ext static;
793 %set NUM to NUM + 1;
794 TP (NUM): call tp_init (addr (sys_info$default_256K_enable),
795                "default_256K_enable", "", TP_ON_OFF);
796           tp_special = "1"b;
797           call on_or_off ();
798           go to RETURN;
799 
800 dcl  sst$dirlock_writebehind fixed bin (35) external static;
801 %set NUM to NUM + 1;
802 TP (NUM): call tp_init (addr (sst$dirlock_writebehind),
803                "dirlock_writebehind", "dirw", TP_ON_OFF);
804           call on_or_off ();
805           goto RETURN;
806 
807 %page; %include tuning_parameter_info;
808 %page; %include syserr_constants;
809 
810           end hc_tune;