1 /*  START OF:       stock_seg.incl.pl1              *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
  2 
  3      dcl     stock_segp             ptr;
  4      dcl     record_stockp          ptr;
  5      dcl     vtoce_stockp           ptr;
  6      dcl     stock_seg$             ext;
  7 
  8      dcl     n_in_record_stock      fixed bin;
  9      dcl     n_volmap_pages         fixed bin;
 10      dcl     n_in_vtoce_stock       fixed bin;
 11 
 12 
 13      dcl     1 stock_seg            aligned based (stock_segp),
 14 
 15                2 meters             aligned like rsmeters,
 16 
 17                2 record_stock_entries fixed bin,            /* Number of entries in a record stock */
 18                2 vtoce_stock_entries fixed bin,             /* Number of entries in a VTOCE stock */
 19                2 record_stock_size  fixed bin,              /* Size of a record stock in words */
 20                2 vtoce_stock_size   fixed bin,              /* Size of a VTOCE stock in words */
 21                2 n_stock_entries    fixed bin,              /* Number of stocks of each type */
 22                2 record_stock_arrayp ptr,                   /* Record stock region */
 23                2 vtoce_stock_arrayp ptr;                    /* VTOCE stock region */
 24 
 25 
 26      dcl     1 record_stock         aligned based (record_stockp),
 27 
 28                2 pvtep              ptr unal,               /* PVTE for this stock */
 29 
 30                2 n_in_stock         fixed bin (18) uns unal,/* Max number of addresses in stock */
 31                2 n_volmap_pages     fixed bin (18) uns unal,/* Number of pages in Volume Map */
 32 
 33                2 n_free_in_stock    fixed bin (18) uns unal,/* Number addresses currently free */
 34                2 n_os_in_stock      fixed bin (18) uns unal,/* Number addresses currently out-of-service */
 35 
 36                2 low_threshold      fixed bin (18) uns unal,/* Low threshold for withdrawing from volmap */
 37                2 high_threshold     fixed bin (18) uns unal,/* High threshold for depositing to volmap */
 38 
 39                2 target             fixed bin (18) uns unal,/* Target for stock */
 40                2 stock_offset       bit (18) unal,          /* Offset of stock in this structure */
 41 
 42                2 n_words_in_stock   fixed bin (18) uns unal,/* Number of words = Number of entries / 2 */
 43                2 search_index       fixed bin (18) uns unal,/* Roving pointer */
 44 
 45                2 old_volmap_page    (3) aligned,            /* N_OLD_VOLMAP_PAGES (cif) */
 46                  3 last             fixed bin (18) uns unal,/* Roving pointer */
 47                  3 pad              bit (18) unal,
 48 
 49                2 volmap_page        (n_volmap_pages refer (record_stock.n_volmap_pages)) aligned,
 50                  3 n_free           fixed bin (18) uns unal,/* Number free records in this volmap page */
 51                  3 baseadd          fixed bin (17) unal,    /* First record address described by this page */
 52 
 53                2 stock              (n_in_record_stock refer (record_stock.n_in_stock)) bit (18) unal; /* Stock array of addresses */
 54                                                             /* bit 0 ON => out-of-service */
 55 
 56 
 57      dcl     1 vtoce_stock          aligned based (vtoce_stockp),
 58                2 pvtep              ptr unal,               /* PVTE for this stock */
 59                2 n_in_stock         fixed bin (18) uns unal,/* Max number indices in stock */
 60                2 n_free_in_stock    fixed bin (18) uns unal,/* Number indices currently free */
 61                2 target             fixed bin (18) uns unal,/* Target when withdrawing/depositing */
 62                2 search_index       fixed bin (18) uns unal,/* Roving pointer */
 63                2 stock              (n_in_vtoce_stock refer (vtoce_stock.n_in_stock)) fixed bin (17) unal; /* Stock array of VTOCE indices */
 64 
 65 
 66      dcl     1 rsmeters             aligned based,
 67 
 68                2 async_read_calls   fixed bin (35),         /* Number of asynchronous read attempts */
 69                2 async_page_reads   fixed bin (35),         /* Number of times page read was required */
 70                2 async_post_io_calls fixed bin (35),        /* Number of times read or write posted */
 71                2 deposit_calls      fixed bin (35),         /* Number of times deposit called */
 72                2 async_post_io_time fixed bin (71),         /* CPU time posting I/Os (interrupt side) */
 73                2 deposit_time       fixed bin (71),         /* CPU time in deposit (call side) */
 74                2 low_thresh_detected fixed bin (35),        /* Number of times stock below low threshold */
 75                2 high_thresh_detected fixed bin (35),       /* Number of times stock above high threshold */
 76                2 low_thresh_fails   fixed bin (35),         /* Number of times no records in volmap */
 77                2 withdraw_stock_steps fixed bin (35),       /* Number steps thru stock in withdraw */
 78                2 withdraw_stock_losses fixed bin (35),      /* Number lockless losses */
 79                2 n_withdraw_attempt fixed bin (35),         /* Number attempts to withdraw a page */
 80                2 n_withdraw_range   fixed bin (35),         /* Number attempts to withdraw within range */
 81                2 n_pages_withdraw_stock fixed bin (35),     /* Number pages withdrawn from stock */
 82                2 n_pages_withdraw_async fixed bin (35),     /* Number pages withdrawn from volmap */
 83                2 n_v_withdraw_attempts fixed bin (35),      /* Number attempts to withdraw from volmap */
 84                2 withdraw_volmap_steps fixed bin (35),      /* Number steps thru volmap in withdraw */
 85                2 deposit_stock_steps fixed bin (35),        /* Number steps thru stock in deposit */
 86                2 deposit_stock_losses fixed bin (35),       /* Number lockless losses */
 87                2 n_deposit_attempt  fixed bin (35),         /* Number attempts to deposit a page */
 88                2 n_pages_deposit_stock fixed bin (35),      /* Number pages deposited to stock */
 89                2 n_pages_deposit_volmap fixed bin (35),     /* Number pages deposited to volmap */
 90                2 n_v_deposit_attempts fixed bin (35),       /* Number attempts to deposit to volmap */
 91                2 reset_os_calls     fixed bin (35),         /* Number calls to reset_os */
 92                2 reset_os_losses    fixed bin (35),         /* Number lockless losses */
 93                2 withdraw_calls     fixed bin (35),         /* Number calls to withdraw */
 94                2 withdraw_time      fixed bin (71),         /* CPU time in withdraw (page-fault) */
 95                2 pc_deposit_time    fixed bin (71),         /* CPU time in pc_deposit */
 96                2 pc_deposit_calls   fixed bin (35),         /* Number calls to pc_deposit */
 97                2 pc_deposit_pages   fixed bin (35),         /* Number pages deposited by pc_deposit */
 98                2 get_free_vtoce_calls fixed bin (35),       /* Number calls to get_free_vtoce */
 99                2 return_free_vtoce_call fixed bin (35),     /* Number calls to return_free_vtoce */
100                2 deposit_vstock_calls fixed bin (35),       /* Number attempts to deposit to vtoce stock */
101                2 deposit_vstock_fails fixed bin (35),       /* Number times deposit failed */
102                2 withdraw_vstock_calls fixed bin (35),      /* Number attempts to withdraw from vtoce stock */
103                2 withdraw_vstock_fails fixed bin (35),      /* Number times withdraw failed */
104                2 deposit_vtoc_map fixed bin (35),           /* Number times vtoce deposited to map */
105                2 withdraw_check_scav fixed bin (35),        /* Number times withdraw checked an address for scavenge */
106                2 withdraw_conflict fixed bin (35),          /* Number times conflict found */
107                2 pad (11)           fixed bin (35);
108 
109 
110      dcl     N_OLD_VOLMAP_PAGES     fixed bin init (3) int static options (constant);
111      dcl     DEFAULT_N_IN_RECORD_STOCK fixed bin init (104) int static options (constant);
112      dcl     DEFAULT_N_IN_VTOCE_STOCK fixed bin init (10) int static options (constant);
113 
114 
115 /*  END OF:         stock_seg.incl.pl1              *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */