1 /*  START OF:       scavenger_data.incl.pl1   November 1982       *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
  2 
  3 /* format: style3 */
  4 dcl       scavenger_data$     external;
  5 
  6 dcl       scavenger_datap     ptr;
  7 dcl       sc_metersp          ptr;
  8 dcl       sc_process_tablep   ptr;
  9 dcl       scavenger_blockp    ptr;
 10 dcl       record_blockp       ptr;
 11 dcl       scavenger_optionsp  ptr;
 12 
 13 dcl       sc_n_processes      fixed bin;
 14 dcl       scavenger_n_records fixed bin;
 15 dcl       scavenger_n_ovfl    fixed bin;
 16 
 17 
 18 dcl       1 scavenger_data    aligned based (scavenger_datap),
 19             2 lock            aligned,                      /* Lock on scavenger_data */
 20               3 lock_word     bit (36) aligned,
 21               3 wait_event    bit (36) aligned,
 22               3 notify_sw     bit (1) aligned,
 23             2 process_table_ptr
 24                               ptr,                          /* Pointer to scavenger process table */
 25             2 error_severity  fixed bin,                    /* Severity of unexpected error condition */
 26             2 meters          aligned like sc_meters,
 27             2 free            bit (1) aligned;              /* Available region */
 28 
 29 
 30 dcl       1 sc_meters         aligned based (sc_metersp),   /* Meters */
 31             2 n_scavenge      fixed bin (35),               /* Number of volume scavenges */
 32             2 pf              fixed bin (35),               /* Total page faults */
 33             2 vcpu            fixed bin (71),               /* Total virtual CPU time */
 34             2 clock_time      fixed bin (71),               /* Total clock time */
 35             2 n_vtoces        fixed bin (35),               /* Number VTOCEs examined */
 36             2 n_vtoces_damaged
 37                               fixed bin (35),               /* Number VTOCEs damaged by scavenge */
 38             2 n_vtoces_per_proc
 39                               fixed bin (35),               /* Number per-process VTOCEs freed */
 40             2 n_vtoces_per_boot
 41                               fixed bin (35),               /* Number per-bootload VTOCEs freed */
 42             2 n_vtoces_freed  fixed bin (35),               /* Total number VTOCEs freed */
 43             2 n_vtoces_fmd    fixed bin (35),               /* Number VTOCEs with fm_damaged reset */
 44             2 n_records       fixed bin (35),               /* Number non-null filemap entries examined */
 45             2 n_conflicts     fixed bin (35),               /* Number potential conflicts detected */
 46             2 n_fmd_conflicts fixed bin (35),               /* Number potential conflicts due to fm_damaged */
 47             2 n_real_conflicts
 48                               fixed bin (35),               /* Number real conflicts */
 49             2 n_lost_records  fixed bin (35);               /* Number lost records freed */
 50 
 51 
 52 dcl       1 sc_process_table  aligned based (sc_process_tablep),
 53             2 max_n_processes fixed bin,                    /* Number of table entries */
 54             2 n_processes     fixed bin,                    /* Number active entries */
 55             2 process         (sc_n_processes refer (sc_process_table.max_n_processes)) aligned,
 56               3 processid     bit (36) aligned,             /* Owner. 0=>empty */
 57               3 pvtep         ptr unal,                     /* PVTE of volume being scavenged */
 58               3 blockp        ptr unal,                     /* Block w/i scavenger_data */
 59               3 first_block_page
 60                               fixed bin,                    /* Index of first page of block */
 61               3 n_block_pages fixed bin;                    /* Number of pages in block */
 62 
 63 
 64 dcl       1 scavenger_block   aligned based (scavenger_blockp),
 65             2 n_records       fixed bin,                    /* Number of record addresses */
 66             2 n_ovfl          fixed bin,                    /* Number of overflow blocks */
 67             2 ovfl_free_ix    fixed bin,                    /* Index of first free overflow block */
 68             2 records         (scavenger_n_records refer (scavenger_block.n_records)) aligned like record_block,
 69             2 overflow        (scavenger_n_ovfl refer (scavenger_block.n_ovfl)) aligned like record_block;
 70 
 71 
 72 dcl       1 record_block      aligned based (record_blockp),/* One per record address */
 73             2 vtocx           fixed bin (15) uns unal,      /* Owning VTOCE index */
 74             2 pageno          fixed bin (8) uns unal,       /* Owning page number */
 75             2 state           fixed bin (2) uns unal,       /* State */
 76             2 lock            bit (1) unal,                 /* Lock bit on this block */
 77             2 ovflx           fixed bin (10) uns unal;      /* Index of first overflow block on chain */
 78 
 79 dcl       1 scavenger_data_pages
 80                               aligned based (scavenger_datap),
 81             2 page            (0:255) aligned,
 82               3 word          (1024) bit (36) aligned;
 83 
 84 dcl       1 scavenger_options aligned based (scavenger_optionsp),
 85             2 print_meters    bit (1) unaligned,            /* ON => meter each scavenge into the log */
 86             2 debug           bit (1) unaligned,            /* ON => do special debugging things */
 87             2 dump            bit (1) unaligned,            /* ON => dump bad VTOCEs into syserr log */
 88             2 trap            bit (1) unaligned,            /* ON => trap to BOS for debug */
 89             2 no_optimize     bit (1) unaligned,            /* ON => no VTOCE read-ahead */
 90             2 fault_under_ast bit (1) unaligned,            /* ON => fault under AST lock, benign */
 91             2 fault_under_volmap bit (1) unaligned,         /* ON => fault under volmap lock, benign */
 92             2 fault_under_pt bit (1) unaligned;             /* ON => fault inder PTL, NOT BENIGN */
 93 
 94 dcl       (
 95           STATE_UNSEEN        init (0),
 96           STATE_FREE          init (1),
 97           STATE_IN_USE        init (2),
 98           STATE_CONFLICT      init (3)
 99           )                   fixed bin int static options (constant);
100 
101 
102 
103 
104 /*  END OF:         scavenger_data.incl.pl1                   *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */