Programming Interface Information: The Monitor Records are intended Programming Interfaces that allow the customer to write programs to obtain services of z/VM.

#### MRSYTLCK

Prolog
Control Block Contents
Cross Reference

#### MRSYTLCK Prolog

     DSECT NAME - SYTLCK
     FUNCTION - Map a Monitor record.
     LOCATED BY -
            Through the Monitor Control Area
     REFERENCED CONTROL BLOCKS -
            MRRECHDR    Monitor Record Header
     NAME - MRSYTLCK
     DESCRIPTIVE NAME - Monitor Sample Record
            Domain 0  - System Domain
            Record 23 - Formal spin lock data
     DESCRIPTION - Data saved in each formal lock area for the formal
                   spin locks in the system.
       List of locks with data in this record:
       Lock ID    Lock Description
       --------   ----------------
       SRMSLOCK:  scheduler lock - SRMSLOCK is no longer the
                  Scheduler Lock data structure. It is now an
                  SXL-style lock with the SXLXL located at
                  SRMSCHLK. This record now reports statistics
                  aggregated from the per-processor SXLEN data
                  structures to provide comparable statistics.
                  The share request spin counts and times now
                  include HCPDSP's internal spin loop used when
                  the lock is not immediately available.
       HCPTRQLK:  TRQBK queue lock
       SRMALOCK:  adjunct list lock
       HCPPGDPL:  page allocation lock
       HCPPGDSL:  SPOOL allocation lock
       HCPPGDTL:  T-disk allocation lock
       HCPPGDAL:  CPVOL list lock
       RSAAVLLK:  <2G available list lock - DELETED
       RSACALLK:  global cleared available list lock
       SYSDATLK:  SYSDATE/SYSTODMD lock
       DCTLLOK:   directory control lock
       FSDVMLK:   free storage lock
       NSUIMGLK:  IMG SNTBK lock
       HCPPGDML:  exposure MLOADs & system total MLOAD lock
       NSUNLSLK:  NLS SNTBK lock
       RSANOQLK:  no-owned resource queue lock
       RCCSFQL:   save frame queue lock
       HCPRCCMA:  switch master processor lock
       RSASXQLK:  SXSPM queue lock
       HCPRCCSL:  symbolic-lock list lock
       RSA2GLCK:  >2G available list lock - DELETED
       HCPTMFLK:  HCPTIMER lock
       BUTDLKEY:  lock for HCPBUTDL
       RSA2GCLK:  >2G available contiguous list lock - DELETED
       RSAAVCLK:  <2G available contiguous list lock - DELETED
       SRMATDLK:  lock for updating SRMATOD and SRMATOD2
       HCPDSVTL:  Topology lock - HCPDSVTL is no longer defined
                  by SYNBK/SYNBX data structures. It is now an
                  SXL-style lock with the SXLXL located at
                  HCPDSVTL. This record now reports statistics
                  aggregated from the per-processor SXLEN data
                  structures to provide comparable statistics.
       RSAAGINL:  Global Aging List Lock
       SLMNDMLK:  NDMBK global recycle queue lock

       DSV_hhhh:  129 locks whose name is of the form DSV_hhhh,
                  where hhhh is a four-character EBCDIC hex
                  integer. These are the locks that protect
                  the 129 DSVBKs.

                  The hhhh value is the dispatch vector ID
                  which is the same value reported in
                  PRCDHF_CALDSVID and PRCDSV_RCCTOPDI. A lock
                  named DSV_FFFF is the lock that protects
                  the master-only DSVBK.

       HX1_rrrr:  3 locks per volume read from or written to
       HX2_rrrr:  by the paging subsystem, where rrrr is the
       HX3_rrrr:  four-character EBCDIC hex device number for
                  the volume. Each lock controls access to a
                  separate cache line in the exposure block
                  (HXPBK). The number of HXPBK locks may not
                  be consistent across all Monitor intervals
                  because volumes can be attached or detached,
                  and mapped minidisk pools may be created
                  and destroyed.

       AVZBnnnn:  Available list zone locks below and above 2G,
       AVZAnnnn:  where nnnn is the zone number. There is one
                  lock per zone and the number of zones created
                  is determined by several factors at startup.

     Each record consists of three sections:
     1) a header at the start of the record.
     2) an array of entries. One per spinlock listed above.
        These contain the spin counts and wait times for
        each of the locks listed above.
     3) an array of shared-exclusive lock extension entries.

     The header includes the information needed to locate and
     interpret the data in the two other sections. That is,
     for each array, the header has fields that contain the
     number of entries in the array, the size of an entry,
     and the displacement in bytes from the beginning of this
     record to the first entry in the array.

     The first array has entries for all spin locks: both
     exclusive-only and shared-exclusive. An entry in this
     array is described by SYTLCK_CALLKDATA.

     The second array has entries for shared-exclusive spin
     lock extension data. Only certain locks, those that may
     be acquired either exclusively or shared, have entries
     in the array described by SYTLCK_CALSXENT. The shared-
     exclusive spinlock manager has been redesigned to reduce
     cache contention. As a result, the data reported in this
     section is no longer pulled from a SYNBK/SYNBX control
     block pair, but from a set of SXLENs that contain per-
     processor lock statistics. The reported information is
     consistent with the meaning from the old lock manager.
     The Diagnose x'9C' usage is a bit different, and has been
     reduced because of target identification improvements.
     Therefore the Diagnose x'9C'-related statistics will
     differ and Diagnose x'9C's should be less frequent.

     The MRPRCSXL (D5R22) record contains additional details
     for shared-exclusive spinlocks beyond what is reported
     in this record, and is reported per processor for any
     processor that ever used the shared-exclusive spinlocks
     even if the processor is currently offline.

     NOTES:

#### MRSYTLCK Control Block Contents

    Offsets
    Dec Hex  Type       Len  Name (Dim)             Description

      0   0  Structure   40  SYTLCK                 Start of monitor record
      0   0  Character    0  SYTLCK_CALMRHDR        Record header. See MRRECHDR
                                                    for details.
      0   0  Character   20  MRHDR
      0   0  Unsigned     2  MRHDRLEN
      2   2  Unsigned     2  MRHDRZER
      4   4  Unsigned     1  MRHDRDM
      5   5  Unsigned     1  *
      6   6  Unsigned     2  MRHDRRC
      8   8  Character    8  MRHDRTOD
     16  10  Character    4  *
     20  14  Character    0  MRHDR_END
     20  14  Unsigned     4  SYTLCK_CALNMLKS        Number of spin locks in this
                                                    record. That is, the number of
                                                    SYTLCK_CALLKDATA entries
                                                    included after this header.
     24  18  Unsigned     2  SYTLCK_CALENTSZ        The size (in bytes) of each
                                                    SYTLCK_CALLKDATA entry
     26  1A  Unsigned     2  SYTLCK_CALENTDSP       The displacement (in bytes)
                                                    from the beginning of this
                                                    record to the first
                                                    SYTLCK_CALLKDATA entry. The
                                                    entries are consecutive in
                                                    storage starting with the first
                                                    at this displacement.
     28  1C  Unsigned     1  SYTLCK_CALVERSN        Record version number:
                                                    See SYTLCK_VERnnn constant
                                                    definitions in the prolog
                                                    above.
     29  1D  Bitstring    1  SYTLCK_CALFLAGS        Flag field.
             1... ....       SYTLCK_CALSXLKS        Shared-exclusive lock
                                                    manager uses SXL-style locks.
             .1.. ....       SYTLCK_CALSEMA         Assist use enabled.
             ..1. ....       *
             ...1 ....       *
             .... 1...       *
             .... .1..       *
             .... ..1.       *
             .... ...1       *
     30  1E  Unsigned     2  *                      Reserved for future use
     32  20  Unsigned     4  SYTLCK_CALNMSXE        Number of shared-exclusive
                                                    spin lock extensions in this
                                                    record. That is, the number of
                                                    SYTLCK_CALSXENT entries included
                                                    in this record.
     36  24  Unsigned     2  SYTLCK_CALSXENTSZ      The size (in bytes) of
                                                    each SYTLCK_CALSXENT entry.
     38  26  Unsigned     2  SYTLCK_CALSXEDSP       The displacement
                                                    (in bytes) from the beginning of
                                                    this record to the first
                                                    SYTLCK_CALSXENT entry. The
                                                    entries are consecutive in
                                                    storage starting with the
                                                    first at this displacement.
     40  28  Character    0  SYTLCK_CALENTS         Start of the two arrays of
                                                    lock data which contain the
                                                    general spin lock data
                                                    (SYTLCK_CALLKDATA) and the
                                                    shared-exclusive spin lock
                                                    extension (SYTLCK_CALSXENT)
                                                    entries, one for each formal
                                                    spin lock arranged one after
                                                    the other at the end of this
                                                    record. There is an ID field
                                                    in each entry that should be
                                                    used to determine which lock
                                                    the entry represents. See the
                                                    list of LOCKIDs in the prolog
                                                    above to determine which ID
                                                    represents which lock
    Mapping of an entry in the first array which contains basic spin
    counts and times for a number of formal spin locks. (See the list of
    locks in the prolog). There is a separate entry for each formal
    spin lock.

    Offsets
    Dec Hex  Type       Len  Name (Dim)             Description

      0   0  Structure   40  SYTLCK_CALLKDATA       Formal spin lock data entry
      0   0  Character    8  SYTLCK_CALLCKID        IDentifier for this lock
      8   8  Unsigned     4  SYTLCK_CALXSCNT        Total count of times this
                                                    lock has gone into the formal
                                                    spin routine when attempting to
                                                    get the lock in exclusive mode
     12   C  Character    8  SYTLCK_CALXTIME        Total elapsed wall-clock
                                                    spin time in TOD units on
                                                    this lock when attempting to
                                                    get it in exclusive mode,
                                                    starting at zero and counting
                                                    up
     20  14  Unsigned     4  SYTLCK_CALSSCNT        Total count of times this
                                                    lock has gone into the formal
                                                    spin routine when attempting to
                                                    get a share of the lock
     24  18  Character    8  SYTLCK_CALSTIME        Total elapsed wall-clock
                                                    spin time in TOD units on
                                                    this lock when attempting to
                                                    get it in shared mode, starting
                                                    at zero and counting up
     32  20  Unsigned     4  SYTLCK_CALCADSH        Total number of CAD
                                                    instructions executed when
                                                    attempting to obtain the lock
                                                    in shared mode.
     36  24  Unsigned     4  SYTLCK_CALCADEX        Total number of CAD
                                                    instructions executed when
                                                    attempting to obtain the lock
                                                    in exclusive mode.
    Mapping of an array entry for a shared-exclusive spin lock which
    contains SYNBX extension data for a select number of shared-exclusive
    spin locks.

    Offsets
    Dec Hex  Type       Len  Name (Dim)             Description

      0   0  Structure   72  SYTLCK_CALSXENT        Formal spin lock data entry
      0   0  Character    8  SYTLCK_CALXLKID        IDentifier for this lock
      8   8  Character   16  SYTLCK_SYNBXW4S        Waiting for share entry
     24  18  Character   16  SYTLCK_SYNBXHLS        Held for share entry
     40  28  Character   16  SYTLCK_SYNBXW4X        Waiting for exclusive entry
     56  38  Character   16  SYTLCK_SYNBXHLX        Held exclusive entry
    Mapping for each of the above elements. That is, for:
    SYTLCK_SYNBXW4S, SYTLCK_SYNBXHLS, SYTLCK_SYNBXW4X, and SYTLCK_SYNBXHLX.

    Offsets
    Dec Hex  Type       Len  Name (Dim)             Description

      0   0  Structure   16  SYTLCK_SYNBXENT
      0   0  Unsigned     4  SYTLCK_SYNBXATT        Count of attempts to
                                                    identify a diagnose x'9C' target
      4   4  Unsigned     4  SYTLCK_SYNBXFTG        Count of times a target
                                                    was found
      8   8  Unsigned     4  SYTLCK_SYNBXPTC        Count of potential
                                                    targets considered (for which
                                                    a SIGP SRS was performed)
     12   C  Unsigned     4  *                      Reserved for future use

#### MRSYTLCK Cross Reference

                          Hex           Hex
    Name                  Offset Length Value

    MRHDR                      0     20
    MRHDR_END                 14      0
    MRHDRDM                    4      1
    MRHDRLEN                   0      2
    MRHDRRC                    6      2
    MRHDRTOD                   8      8
    MRHDRZER                   2      2
    SYTLCK                     0     40
    SYTLCK_CALCADEX           24      4
    SYTLCK_CALCADSH           20      4
    SYTLCK_CALENTDSP          1A      2
    SYTLCK_CALENTS            28      0
    SYTLCK_CALENTSZ           18      2
    SYTLCK_CALFLAGS           1D      1
    SYTLCK_CALLCKID            0      8
    SYTLCK_CALLKDATA           0     40
    SYTLCK_CALMRHDR            0      0
    SYTLCK_CALNMLKS           14      4
    SYTLCK_CALNMSXE           20      4
    SYTLCK_CALSEMA            1D          40
    SYTLCK_CALSSCNT           14      4
    SYTLCK_CALSTIME           18      8
    SYTLCK_CALSXEDSP          26      2
    SYTLCK_CALSXENT            0     72
    SYTLCK_CALSXENTSZ         24      2
    SYTLCK_CALSXLKS           1D          80
    SYTLCK_CALVERSN           1C      1
    SYTLCK_CALXLKID            0      8
    SYTLCK_CALXSCNT            8      4
    SYTLCK_CALXTIME            C      8
    SYTLCK_SYNBXATT            0      4
    SYTLCK_SYNBXENT            0     16
    SYTLCK_SYNBXFTG            4      4
    SYTLCK_SYNBXHLS           24     16
    SYTLCK_SYNBXHLX           56     16
    SYTLCK_SYNBXPTC            8      4
    SYTLCK_SYNBXW4S            8     16
    SYTLCK_SYNBXW4X           40     16

    This information is
    based on z/VM V7R2.0.

    Last updated on 08 August 2020 at 15:25:44.

    Copyright IBM Corporation, 1990, 2020