1 /* BEGIN INCLUDE FILE ... tcm.incl.pl1 ... used to generate tc_data cds */
  2 
  3 /****^  HISTORY COMMENTS:
  4   1) change(2018-05-31,Anthony), approve(2018-05-31,MCR10050),
  5      audit(2019-05-11,Swenson), install(2019-05-11,MR12.6g-0017):
  6      Promote loop_lock_time to fixed bin (71).
  7                                                    END HISTORY COMMENTS */
  8 
  9 /* NOTE -- This include file has TWO counterparts in ALM: tc_meters.incl.alm and */
 10 /* wcte.incl.alm. They cannot be produced with cif, and must be kept up to date manually. */
 11 /* Modified 830914 to replace tty_polling_time with opc_polling_time... -E. A. Ranzenbach */
 12 /* Modified 1984.05.21 by M. Pandolf to add tc_suspend_lock */
 13 /* Modified 1984.11.26 by Keith Loepere for uid_array. */
 14 /* Modified 1984.12.06 by Keith Loepere for page create delaying. */
 15 
 16 dcl  tcmp ptr;
 17 
 18 dcl 1 tcm aligned based (tcmp),
 19     2 tc_suspend_lock like lock,                            /* when locked, tc is suspended */
 20     2 cid2 fixed bin (18),
 21     2 cid3 fixed bin (18),
 22     2 cid4 fixed bin (18),
 23     2 depth_count fixed bin (18),                           /* depth last process run */
 24     2 loadings fixed bin (18),                              /* number of process loadings */
 25 
 26     2 blocks fixed bin (18),                                /* number of calls to block */
 27     2 wakeups fixed bin (18),                               /* number of calls to wakeup */
 28     2 waits fixed bin (18),                                 /* number of calls to wait */
 29     2 notifies fixed bin (18),                              /* number of calls to notify */
 30     2 schedulings fixed bin (18),
 31     2 interactions fixed bin (18),                          /* number of interactive schedulings */
 32     2 avequeue fixed bin (35, 18),                          /* recent time average of number in queue */
 33     2 te_wait fixed bin (18),                               /* times te called from wait */
 34 
 35     2 te_block fixed bin (18),                              /* times te updated from block */
 36     2 te_i_stop fixed bin (18),                             /* times te updated from i_stop */
 37     2 te_pre_empt fixed bin (18),                           /* times te updated from pre_empt */
 38     2 p_interactions fixed bin,                             /* times interaction bit turned off because of high priority */
 39     2 idle fixed bin (71),                                  /* total idle time */
 40     2 mp_idle fixed bin (71),                               /* multi-programming idle */
 41 
 42     2 nmp_idle fixed bin (71),                              /* non-multi-programming idle time */
 43     2 zero_idle fixed bin (71),                             /* zero idle time */
 44     2 last_time fixed bin (71),                             /* last time a process was run */
 45     2 loop_locks fixed bin (18),                            /* times looped on the APT lock */
 46     2 obs_loop_lock_time fixed bin (18),                    /* obsolete; promoted to (71) */
 47     2 ave_eligible fixed bin (35, 18),                      /* average length of eligible queue */
 48     2 sort_to_elhead fixed bin (18),                        /* 0=> no one,1 => int've only, 2 => everybody */
 49     2 processor_time fixed bin (71),                        /* total processor time on system */
 50     2 response_time fixed bin (71),                         /* estimate of response time */
 51     2 eligible_time fixed bin (71),                         /* estimate of eligible time */
 52     2 response_count fixed bin,                             /* count of response meters */
 53     2 eligible_count fixed bin,                             /* count of eligible meters */
 54     2 quit_counts (0:5) fixed bin,                          /* array of buckets indexed by state */
 55     2 loading_idle fixed bin (71),                          /* loading_idle time */
 56     2 delta_vcpu fixed bin (71),                            /* delta virtual CPU time for the system */
 57     2 post_purge_switch fixed bin,                          /* ON if post purging is to be done */
 58     2 time_out_severity fixed bin,                          /* syserr first arg for notify time outs */
 59     2 notify_check fixed bin,                               /* obsolete */
 60     2 quit_priority fixed bin,                              /* factor for scheduler quit response */
 61     2 iobm_polling_time fixed bin (71),                     /* time to poll iobm */
 62     2 end_of_time fixed bin (71),                           /* very large time */
 63     2 gp_at_notify fixed bin (18),                          /* 0 => just do get_idle_processor */
 64     2 gp_at_ptlnotify fixed bin (18),                       /* 0 => just do get_idle_processor */
 65     2 int_q_enabled fixed bin (18),                         /* 0 => no intv q in percent mode */
 66     2 fnp_buffer_threshold fixed bin (18),                  /* if fewer free buffs then stingy alloc strategy */
 67                                                             /* set this to >= half n_ttylines/fnp for safety */
 68 
 69 /* 100 octal */
 70 
 71     2 depths (8) fixed bin (18),                            /* histogram of run depths */
 72     2 tdepths (8) fixed bin (71),                           /* histogram of times run per depth */
 73     2 pfdepth (8) fixed bin (18),                           /* histogram of page faults per depth */
 74 
 75     2 ptl_not_waits fixed bin (18),                         /* times ptl_wait noticed ptl was unlocked */
 76     2 gw_gp_window_count fixed bin (18),                    /* times window noticed */
 77     2 metering_lock fixed bin (18),                         /* 0=locked, else unlocked */
 78     2 ptl_waits fixed bin (18),                             /* num calls to ptl_wait */
 79     2 gp_start_count fixed bin (18),                        /*  to detect gw_gp window lossage */
 80     2 gp_done_count fixed bin (18),
 81     2 nto_check_time fixed bin (71),                        /* next time at which nto code will be called */
 82     2 nto_delta fixed bin (35),                             /* microsec between nto checks */
 83     2 nto_count fixed bin (18),                             /* number of times nto detected */
 84     2 tcpu_scheduling fixed bin (18),                       /* obsolete                                       */
 85     2 nto_event bit (36),                                   /* last event which NTO'd */
 86     2 page_notifies fixed bin (18),
 87     2 notify_nobody_count fixed bin (18),
 88     2 notify_nobody_event bit (36),
 89     2 system_type fixed bin,                                /* used to be tcm.inter */
 90 
 91     2 stat (0:15) fixed bin (18),                           /* num apte's in each state */
 92 
 93 /* 200 octal */
 94 
 95     2 wait (8),
 96       3 time fixed bin (18),                                /* histogram of page fault waiting times versus did */
 97       3 count fixed bin (18),
 98 
 99     2 ready (8),
100       3 time fixed bin (18),                                /* histogram of times in ready queue */
101       3 count fixed bin (18),
102 
103     2 total_pf_time fixed bin (71),                         /* total time spent from start to end of
104                                                                all page faults */
105     2 total_pf_count fixed bin (18),                        /* total number of page faults metered */
106     2 auto_tune_ws fixed bin (18),                          /* 0=> dont, atherwise compensate for quantum len */
107     2 ocore_delta fixed bin (18),                           /* number of pages reserved for int users */
108     2 ws_sum fixed bin (18),                                /* total of eligible's ws_sizes */
109     2 nonidle_force_count fixed bin (18),                   /* count of eligibilities forced */
110     2 itt_list_lock bit (36) aligned,                       /* Lock on ITT free list */
111     2 cpu_pf_time fixed bin (71),                           /* total cpu time spent handling page faults */
112     2 cpu_pf_count fixed bin (18),                          /* total count of cpu time meterings */
113     2 special_offsets unaligned,
114       3 apt_offset bit (18),
115       3 pad bit (18),
116     2 getwork_time fixed bin (71),                          /* total time spent in getwork */
117     2 getwork_count fixed bin (18),                         /* total times through getwork */
118     2 short_pf_count fixed bin (18),                        /* number of short page faults */
119     2 interrupt_time fixed bin (71),                        /* total time spent in interrupt */
120     2 interrupt_count fixed bin (71),                       /* total number of metered interrupts */
121     2 ocore fixed bin (35, 18),                             /* fraction of core for int've users */
122     2 pre_empt_flag bit (36) aligned,                       /* controls whether preempting at done time */
123     2 cumulative_memory_usage fixed binary (71),            /* total number of memory usage units */
124     2 processor_time_at_define_wc fixed bin (71),           /* value of processor_time when WC's last defined */
125     2 boost_priority fixed bin,                             /* number of times priority process given high priority */
126     2 lost_priority fixed bin,                              /* number of times priority process lost eligibility */
127     2 total_clock_lag fixed bin (71),                       /* sum of all simulated clock delays */
128     2 clock_simulations fixed bin,                          /* number of times alarm clock interrupt was simulated */
129     2 max_clock_lag fixed bin,                              /* largest simulated alarm clock delay */
130 
131 /* 300 octal */
132 
133     2 pdscopyl fixed bin (18),                              /* amount of pds to copy for new process */
134     2 max_hproc_segno fixed bin,                            /* largest allowed hardcore segment number */
135     2 prds_length fixed bin (18),                           /* length of PRDS */
136     2 pds_length fixed bin (18),                            /* length of PDS */
137     2 lock fixed bin (18),                                  /* process id generator lock */
138     2 id bit (36) aligned,                                  /* next uid to be added to uid_array */
139     2 system_shutdown fixed bin (18),
140     2 working_set_factor fixed bin (35, 18),                /* working set factor */
141 
142     2 ncpu fixed bin (18),                                  /* number of processors currently being used */
143     2 last_eligible bit (18),                               /* last process to gain eligibility */
144     2 apt_lock fixed bin (35),                              /* + write; 0 hidden; -1 unlocked; -(N+1) Nreaders */
145     2 apt_size fixed bin (18),                              /* number of APT entries */
146     2 realtime_q aligned like based_sentinel,               /* processes with realtime deadlines */
147     2 aht_size fixed bin (18),                              /* APT hash table size */
148     2 itt_size fixed bin (18),                              /* number of ITT entries */
149 
150     2 dst_size fixed bin (18),                              /* number of allowed DST entries */
151     2 itt_free_list bit (18),                               /* pointer to ITT free list */
152     2 used_itt fixed bin (18),                              /* number of used ITT entries */
153     2 initializer_id bit (36) aligned,                      /* process id of initializer */
154     2 n_eligible fixed bin (18),                            /* number of processes eligible */
155     2 max_eligible fixed bin (30),                          /* maximum allowed number of eligible processes */
156     2 wait_enable fixed bin (18),                           /* turned on when waiting mechanism works */
157     2 apt_entry_size fixed bin (18),                        /* size of an APT entry */
158 
159     2 interactive_q aligned like based_sentinel,            /* head of interactive queue */
160     2 dst_ptr ptr,                                          /* pointer to device signal table */
161     2 old_user ptr,                                         /* last process to run (apt ptr ) */
162     2 initialize_time fixed bin (71),                       /* time of initialization */
163 
164     2 init_event fixed bin (18),                            /* wait event during initialization */
165     2 oldt fixed bin (18),                                  /* timer reading from previous process */
166     2 newt fixed bin (18),                                  /* timer setting for new process */
167     2 tefirst fixed bin (30),                               /* first eligible time */
168     2 telast fixed bin (30),                                /* last eligible time */
169     2 timax fixed bin (35),                                 /* time in queue for lowest level */
170     2 empty_q bit (18),                                     /* thread of empty APT entries */
171     2 working_set_addend fixed bin (18),                    /* additive working set parameter */
172     2 ready_q_head bit (0) aligned,                         /* for added segdef */
173     2 eligible_q_head aligned like based_sentinel,          /* head of eligible queue */
174     2 ready_q_tail bit (0) aligned,                         /* for added segdef */
175     2 eligible_q_tail aligned like based_sentinel,          /* tail of eligible queue */
176     2 idle_tail aligned like based_sentinel,                /* tail of idle list */
177     2 min_eligible fixed bin (30),
178     2 alarm_timer_list bit (18) aligned,                    /* rel pointer to apt entry for next alarm timer */
179     2 guaranteed_elig_inc fixed bin (35),                   /* amount of guaranteed eligibility time in microsecs. */
180     2 priority_sched_inc fixed bin (35),                    /* amount of block time before process is given priority */
181     2 next_alarm_time fixed bin (71),                       /* clock time for next alarm timer */
182     2 priority_sched_time fixed bin (71),                   /* time for priority process to be given priority */
183     2 opc_polling_time fixed bin (71),                      /* time to poll console DIM */
184     2 disk_polling_time fixed bin (71),                     /* time to poll disk DIM */
185     2 tape_polling_time fixed bin (71),                     /* time to poll tape DIM */
186     2 imp_polling_time fixed bin (71),                      /* time to poll imp */
187     2 imp_polling_lock fixed bin (18),                      /* do not poll if lock set */
188     2 max_channels fixed bin (18),                          /* num special channels per process */
189 
190 /* 400 octal */
191 
192     2 system_virtual_time fixed bin (71),                   /* non-idle virtual time */
193     2 credit_bank fixed bin (71),                           /* credits not yet passed out */
194     2 min_wct_index bit (18) aligned,                       /* offset of initializer work class table entry */
195     2 max_wct_index bit (18) aligned,                       /* offset of highest wcte currently defined */
196     2 delta_vt fixed bin (71),                              /* temp used by pxss.compute_virtual_clocks */
197     2 gross_idle_time fixed bin (71),                       /* idle time_used_clock */
198     2 credits_per_scatter fixed bin (35),                   /* total number of credits awarded at once */
199     2 best_credit_value fixed bin (18),                     /* temp for pxss.find_next_eligible */
200     2 define_wc_time fixed bin (71),                        /* clock time when workclasses last degined */
201     2 max_batch_elig fixed bin (35),
202     2 num_batch_elig fixed bin (35),
203     2 deadline_mode fixed bin (35),                         /* 0=> ti sorts, else deadline sorts */
204     2 credits_scattered fixed bin (35),
205     2 max_max_eligible fixed bin (30),                      /* Maximum of maxe */
206     2 max_stopped_stack_0 fixed bin (35),                   /* Maximum stack_0's suspended by stopped procs   */
207     2 stopped_stack_0 fixed bin (35),                       /* Number stack_0's suspended by stopped procs    */
208     2 mos_polling_interval fixed bin (35),                  /* for heals */
209     2 mos_polling_time fixed bin (71),                      /* for heals */
210     2 vcpu_response_bounds (VCPU_RESPONSE_BOUNDS) fixed bin (35),
211     2 vcpu_response_bounds_size fixed bin (35),
212     2 meter_response_time_calls fixed bin (35),
213     2 meter_response_time_invalid fixed bin (35),
214     2 meter_response_time_overhead fixed bin (71),
215     2 init_wait_time fixed bin (71),                        /* used by wait/notify during initialization      */
216     2 init_wait_timeout fixed bin (71),                     /* notify-timeout interval during initialization  */
217     2 init_timeout_severity fixed bin,                      /* notify-timeout severity during initialization  */
218     2 init_timeout_recurse fixed bin,                       /* count of NTO recursion during initialization   */
219     2 max_timer_register fixed bin (71),                    /* max cpu burst = # cpus x pre_empt_sample_time  */
220     2 pre_empt_sample_time fixed bin (35),                  /* tuning parameter - max time between samples    */
221     2 governing_credit_bank fixed bin (35),                 /* used for limiting eligibility on governed work classes*/
222     2 process_initial_quantum fixed bin (35),               /* eligibility quantum first eligibility          */
223     2 default_procs_required bit (8) aligned,               /* default mask of CPUs required */
224     2 work_class_idle fixed bin (71),                       /* idle time due to work class restrictions */
225 
226 /* Tuning Parameters for Stack Truncation */
227 
228     2 stk_truncate bit (1) aligned,
229     2 stk_truncate_always bit (1) aligned,
230     2 stk_trunc_avg_f1 fixed bin (35, 18),
231     2 stk_trunc_avg_f2 fixed bin (35, 18),
232     2 lock_error_severity fixed bin,                        /* syserr severity */
233 
234     2 gv_integration fixed bin (35),                        /* Integration interval for governing */
235     2 gv_integration_set bit (1) aligned,                   /* ON => gv_integration set by ctp */
236     2 pauses fixed bin (35),                                /* Calls to pause (reschedule) */
237     2 volmap_polling_time fixed bin (71),
238     2 next_ring0_timer fixed bin (71),                      /* next time that ring 0 timer goes off */
239     2 realtime_io_priority_switch fixed bin,                /* 0 => give I/O interrupt wakeups realtime priotiry */
240     2 realtime_io_deadline fixed bin (35),                  /* Delta to clock for I/O realtime deadline */
241     2 realtime_io_quantum fixed bin (35),                   /* Quantum for I/O realtime burst */
242     2 realtime_priorities fixed bin (35),                   /* Count for metering */
243     2 relinquishes fixed bin (35),                          /* Calls to relinquish_priority */
244     2 abort_ips_mask bit (36) aligned,                      /* IPS mask for tc_util$check_abort */
245 
246 /* 500 octal */
247 
248     2 uid_array (0:15) bit (36) aligned,                    /* array from which a uid is chosen (randomly) */
249     2 loop_lock_time fixed bin (71),                        /* time looping on the APT lock */
250     2 pad5 (174) fixed bin (35),                            /* room for expansion compatibly                  */
251 
252 /* 1000 octal */
253 
254     2 pad7 (64) fixed bin (35),
255 
256 /* 1100 octal */
257 
258     2 pad6 (8) fixed bin (35),
259     2 work_class_table aligned,                             /* array of per workclass information */
260       3 wcte (0:16) aligned like wct_entry,
261 
262 /* 3000 octal */
263 
264     2 apt fixed bin;
265 
266 dcl  wctep ptr;
267 
268 dcl 1 wct_entry aligned based (wctep),                      /* Work class entry */
269     2 thread unaligned,                                     /* Ready list */
270       3 fp bit (18),                                        /* Head of ready list */
271       3 bp bit (18),                                        /* Tail of ready list */
272     2 flags unaligned,
273       3 mnbz bit (1),                                       /* Sentinel bit must not be zero. */
274       3 defined bit (1),
275       3 io_priority bit (1),
276       3 governed bit (1),
277       3 interactive_q bit (1),
278       3 pad bit (31),
279     2 credits fixed bin (35),                               /* Current worthiness of group */
280     2 minf fixed bin (35),                                  /* min fraction of cpu */
281     2 pin_weight fixed bin (35),                            /* number of cycles to pin pages */
282     2 eligibilities fixed bin (35),                         /* Count of eligibilities awarded */
283     2 cpu_sum fixed bin (71),                               /* CPU used by members */
284     2 resp1 fixed bin (71),
285     2 resp2 fixed bin (71),
286     2 quantum1 fixed bin (35),
287     2 quantum2 fixed bin (35),
288     2 rmeter1 fixed bin (71),
289     2 rmeter2 fixed bin (71),
290     2 rcount1 fixed bin (35),
291     2 rcount2 fixed bin (35),
292     2 realtime fixed bin (35),
293     2 purging fixed bin (35),
294     2 maxel fixed bin (35),
295     2 nel fixed bin (35),
296     2 number_thinks fixed bin (35),                         /* number times process entered "think" state     */
297     2 number_queues fixed bin (35),                         /* number times process entered "queued" state    */
298     2 total_think_time fixed bin (71),
299     2 total_queue_time fixed bin (71),
300 
301 /*  The next three arrays  correspond to the array vcpu_response_bounds                                       */
302 
303     2 number_processing (VCPU_RESPONSE_BOUNDS+1) fixed bin (35), /* number times entered "processing" state   */
304     2 total_processing_time (VCPU_RESPONSE_BOUNDS+1) fixed bin (71),
305     2 total_vcpu_time (VCPU_RESPONSE_BOUNDS+1) fixed bin (71),
306     2 maxf fixed bin (35),                                  /* maximum fraction of cpu time                   */
307     2 governing_credits fixed bin (35),                     /* for limiting cpu resources                     */
308     2 pad1 (4) fixed bin (35);
309 
310 
311 dcl 1 based_sentinel aligned based,                         /* format of pxss-style sentinel */
312     2 fp bit (18) unal,
313     2 bp bit (18) unal,
314     2 sentinel bit (36) aligned;
315 
316 dcl VCPU_RESPONSE_BOUNDS fixed bin init (3) int static options (constant);
317 
318 /* END INCLUDE FILE tcm.incl.pl1 */