--******************************************************************************************************************** -- Created: 30-Mar-2010 17:33:36 by OpenVMS SDL EV3-3 -- Source: 04-NOV-1999 15:48:23 $1$DGA7274:[LIB_ADA.LIS]F11BCDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package F11BCDEF is -- module $F11BCDEF --+ -- F11BC - Files 11 Block Cache -- -- Header area which describes block cache used by F11BXQP. -- --- -- -- The next four constants are to do with minimum cache allowances for XQP activity -- per process. These minima control not ionly minimum cache size but also -- stalling for XQP activity. -- F11BC_K_MAPCACHE_MIN : constant := 1; -- Bitmap.sys buffers per process F11BC_K_HDRCACHE_MIN : constant := 4; -- Indexf.sys buffers per process F11BC_K_DIRCACHE_MIN : constant := 2; -- Dir/quota buffers per process F11BC_K_DINDXCACHE_MIN : constant := 1; -- Directory index `buffers' per process -- The next four constants are to control the minimum number of fluid buffers a -- process can hold in the XQP cache. (Fluid buffers == buffers that are not pinned in cache) -- F11BC_K_MAPCACHE_FLUIDMIN : constant := 1; -- Bitmap.sys buffers per process F11BC_K_HDRCACHE_FLUIDMIN : constant := 3; -- Indexf.sys buffers per process F11BC_K_DIRCACHE_FLUIDMIN : constant := 2; -- Dir/quota buffers per process F11BC_K_DINDXCACHE_FLUIDMIN : constant := 1; -- Directory index `buffers' per process F11BC_K_NUM_POOLS : constant := 4; -- Number of buffer pools. F11BC_S_F11BCDEF : constant := 240; -- Old size name - synonym type F11BC_TYPE is record BUFBASE : ADDRESS; -- Base address of buffer area. BUFSIZE : UNSIGNED_LONGWORD; -- Size of buffer area in bytes. SIZE : UNSIGNED_WORD; -- Standard size field. TYP : UNSIGNED_BYTE; -- Standard type field. SUBTYP : UNSIGNED_BYTE; -- Standard subtype field. FILL1 : INTEGER_32; -- Position of old size field (Now Reserved) QREALSIZE : UNSIGNED_QUADWORD; -- Structure size as a quadword. ----Component(s) below are defined as comments since they ----overlap other fields ---- ----REALSIZE : UNSIGNED_LONGWORD; -- Structure size as a longword. LBNHSHBAS : ADDRESS; -- Base of LBN hash table. LBNHSHCNT : UNSIGNED_LONGWORD; -- Count of entries in LBN hash tbl. BFRCNT : UNSIGNED_LONGWORD; -- Total buffer count. BFRDBAS : ADDRESS; -- Buffer descriptor base address. BFRLDBAS : ADDRESS; -- Buffer lock descriptor base addr. BLHSHBAS : ADDRESS; -- Base addr of buffer lock hash tbl. BLHSHCNT : UNSIGNED_LONGWORD; -- Num entries in buff lock hash tbl. FREEBFRL : ADDRESS; -- Address of first free buffer lock block. POOL_LRU : UNSIGNED_QUADWORD_ARRAY (1 .. 4); -- Per pool LRU listhead. POOL_WAITQ : UNSIGNED_QUADWORD_ARRAY (1 .. 4); -- Per pool cache wait listhead. WAITCNT : INTEGER_32_ARRAY (1 .. 4); -- Count of waiters per pool. POOLAVAIL : INTEGER_32_ARRAY (1 .. 4); -- Available buffers per pool. POOLCNT : INTEGER_32_ARRAY (1 .. 4); -- Count of buffers per pool. AMBIGQFL : ADDRESS; -- Ambiguity queue forward link. AMBIGQBL : ADDRESS; -- Ambiguity queue back link. -- -- Cache performance counters. -- PROCESS_HITS : UNSIGNED_LONGWORD; -- In-process buffer hits. VALID_HITS : UNSIGNED_LONGWORD; -- Valid buffer cache hits. INVALID_HITS : UNSIGNED_LONGWORD; -- Buffer found but invalid contents. MISSES : UNSIGNED_LONGWORD; -- Buffer not in cache at all. DISK_READS : UNSIGNED_LONGWORD; -- Buffer reads from disk. DISK_WRITES : UNSIGNED_LONGWORD; -- Buffer writes to disk. CACHE_SERIAL : UNSIGNED_LONGWORD; -- Cache serialization calls. CACHE_STALLS : UNSIGNED_LONGWORD; -- Cache serialization stalls. BUFFER_STALLS : UNSIGNED_LONGWORD; -- Stalls for lack of buffers. CACHENAME : STRING(1 .. 24); -- Name of this cache (display only). LOG_BUFFER : ADDRESS; -- Pointer to activity log buffer end record; for F11BC_TYPE use record BUFBASE at 0 range 0 .. 31; BUFSIZE at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; FILL1 at 12 range 0 .. 31; QREALSIZE at 16 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----REALSIZE at 16 range 0 .. 31; LBNHSHBAS at 24 range 0 .. 31; LBNHSHCNT at 28 range 0 .. 31; BFRCNT at 32 range 0 .. 31; BFRDBAS at 36 range 0 .. 31; BFRLDBAS at 40 range 0 .. 31; BLHSHBAS at 44 range 0 .. 31; BLHSHCNT at 48 range 0 .. 31; FREEBFRL at 52 range 0 .. 31; POOL_LRU at 56 range 0 .. 255; POOL_WAITQ at 88 range 0 .. 255; WAITCNT at 120 range 0 .. 127; POOLAVAIL at 136 range 0 .. 127; POOLCNT at 152 range 0 .. 127; AMBIGQFL at 168 range 0 .. 31; AMBIGQBL at 172 range 0 .. 31; PROCESS_HITS at 176 range 0 .. 31; VALID_HITS at 180 range 0 .. 31; INVALID_HITS at 184 range 0 .. 31; MISSES at 188 range 0 .. 31; DISK_READS at 192 range 0 .. 31; DISK_WRITES at 196 range 0 .. 31; CACHE_SERIAL at 200 range 0 .. 31; CACHE_STALLS at 204 range 0 .. 31; BUFFER_STALLS at 208 range 0 .. 31; CACHENAME at 212 range 0 .. 191; LOG_BUFFER at 236 range 0 .. 31; end record; for F11BC_TYPE'SIZE use 1920; F11BC_TYPE_INIT : constant F11BC_TYPE := (BUFBASE => ADDRESS_ZERO, BUFSIZE => 0, SIZE => 0, TYP => 0, SUBTYP => 0, FILL1 => 0, QREALSIZE => (0, 0), LBNHSHBAS => ADDRESS_ZERO, LBNHSHCNT => 0, BFRCNT => 0, BFRDBAS => ADDRESS_ZERO, BFRLDBAS => ADDRESS_ZERO, BLHSHBAS => ADDRESS_ZERO, BLHSHCNT => 0, FREEBFRL => ADDRESS_ZERO, POOL_LRU => (others => (0, 0)), POOL_WAITQ => (others => (0, 0)), WAITCNT => (others => 0), POOLAVAIL => (others => 0), POOLCNT => (others => 0), AMBIGQFL => ADDRESS_ZERO, AMBIGQBL => ADDRESS_ZERO, PROCESS_HITS => 0, VALID_HITS => 0, INVALID_HITS => 0, MISSES => 0, DISK_READS => 0, DISK_WRITES => 0, CACHE_SERIAL => 0, CACHE_STALLS => 0, BUFFER_STALLS => 0, CACHENAME => (others => ASCII.NUL), LOG_BUFFER => ADDRESS_ZERO); -- -- Buffer descriptors. -- BFRD_M_DIRTY : constant := 16#00000004#; BFRD_M_VALID : constant := 16#00000008#; BFRD_M_NOPURGE : constant := 16#00000010#; BFRD_M_ASYNCH_IN_PROG : constant := 16#00000020#; BFRD_M_PINNED : constant := 16#00000040#; BFRD_S_BFRDDEF : constant := 48; -- Old size name - synonym type BFRD_FLAGS_TYPE is -- Status flags. record POOL : UNSIGNED_2; -- Pool number of this buffer. DIRTY : BOOLEAN; -- Buffer has been modified. VALID : BOOLEAN; -- Buffer has been read from disk. NOPURGE : BOOLEAN; -- Do not purge from process cache ASYNCH_IN_PROG : BOOLEAN; -- This buffer has an outstanding deferred write PINNED : BOOLEAN; -- Buffer is pinned in cache FILLER_1 : BOOLEAN; end record; for BFRD_FLAGS_TYPE use record POOL at 0 range 0 .. 1; DIRTY at 0 range 2 .. 2; VALID at 0 range 3 .. 3; NOPURGE at 0 range 4 .. 4; ASYNCH_IN_PROG at 0 range 5 .. 5; PINNED at 0 range 6 .. 6; FILLER_1 at 0 range 7 .. 7; end record; for BFRD_FLAGS_TYPE'SIZE use 8; BFRD_FLAGS_TYPE_INIT : constant BFRD_FLAGS_TYPE := (POOL => 0, DIRTY => FALSE, VALID => FALSE, NOPURGE => FALSE, ASYNCH_IN_PROG => FALSE, PINNED => FALSE, FILLER_1 => FALSE); type BFRD_TYPE is record QFL : ADDRESS; -- Queue forward link. QBL : ADDRESS; -- Queue back link. LBN : UNSIGNED_LONGWORD; -- LBN of buffer. UCB : ADDRESS; -- UCB of buffer. LOCKBASIS : UNSIGNED_LONGWORD; -- Unique file identifier. SEQNUM : UNSIGNED_LONGWORD; -- Buffer validation sequence number. FLAGS : BFRD_FLAGS_TYPE; -- Status flags. BTYPE : UNSIGNED_BYTE; -- Buffer type. FILLER_1 : UNSIGNED_WORD; CURPID : UNSIGNED_LONGWORD; -- Index of current process. NXTBFRD : UNSIGNED_LONGWORD; -- Index of next BFRD (hash chain). BFRL : ADDRESS; -- Address of buffer lock descriptor. SAME_BFRL : UNSIGNED_LONGWORD; -- Index to next BFRD under same BFRL THREAD : UNSIGNED_LONGWORD; -- Thread number end record; for BFRD_TYPE use record QFL at 0 range 0 .. 31; QBL at 4 range 0 .. 31; LBN at 8 range 0 .. 31; UCB at 12 range 0 .. 31; LOCKBASIS at 16 range 0 .. 31; SEQNUM at 20 range 0 .. 31; FLAGS at 24 range 0 .. 7; BTYPE at 25 range 0 .. 7; FILLER_1 at 26 range 0 .. 15; CURPID at 28 range 0 .. 31; NXTBFRD at 32 range 0 .. 31; BFRL at 36 range 0 .. 31; SAME_BFRL at 40 range 0 .. 31; THREAD at 44 range 0 .. 31; end record; for BFRD_TYPE'SIZE use 384; BFRD_TYPE_INIT : constant BFRD_TYPE := (QFL => ADDRESS_ZERO, QBL => ADDRESS_ZERO, LBN => 0, UCB => ADDRESS_ZERO, LOCKBASIS => 0, SEQNUM => 0, FLAGS => BFRD_FLAGS_TYPE_INIT, BTYPE => 0, FILLER_1 => 0, CURPID => 0, NXTBFRD => 0, BFRL => ADDRESS_ZERO, SAME_BFRL => 0, THREAD => 0); -- -- Buffer lock descriptor blocks. -- BFRL_S_BFRLDEF : constant := 24; -- Old size name - synonym type BFRL_TYPE is record NXTBFRL : ADDRESS; -- Address of next BFRL in hash chain. BFRD : UNSIGNED_LONGWORD; -- Index to first BFRD under this lock REFCNT : UNSIGNED_LONGWORD; -- Number of buffers backed by this lock. LKID : UNSIGNED_LONGWORD; -- Lock ID of buffer lock. LCKBASIS : UNSIGNED_LONGWORD; -- Unique file identifier. PARLKID : UNSIGNED_LONGWORD; -- Unique volume set identifier. end record; for BFRL_TYPE use record NXTBFRL at 0 range 0 .. 31; BFRD at 4 range 0 .. 31; REFCNT at 8 range 0 .. 31; LKID at 12 range 0 .. 31; LCKBASIS at 16 range 0 .. 31; PARLKID at 20 range 0 .. 31; end record; for BFRL_TYPE'SIZE use 192; BFRL_TYPE_INIT : constant BFRL_TYPE := (NXTBFRL => ADDRESS_ZERO, BFRD => 0, REFCNT => 0, LKID => 0, LCKBASIS => 0, PARLKID => 0); end F11BCDEF;