The PGSER macro and its fast path version (see PGSER — Fast path page services) perform the same paging services that the PGANY, PGFIX, PGFIXA, PGFREE, PGFREEA, PGLOAD, PGOUT, and PGRLSE macros perform for addresses below 16 megabytes. The PGSER macro performs these services for addresses either above or below 16 megabytes.
The syntax of the fast path version of PGSER is presented separately following the standard description.
The requirements for the caller invoking PGSER with BRANCH=N are:
Environmental factor | Requirement |
---|---|
Minimum authorization: |
|
Dispatchable unit mode: | Task |
Cross memory mode: | PASN=HASN=SASN |
AMODE: | 31- or 64-bit |
ASC mode: | Primary |
Interrupt status: | Enabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | Must be in the primary address space |
The requirements for the caller invoking PGSER with BRANCH=Y are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Supervisor state and key 0 |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | Any PASN, any HASN, any SASN |
AMODE: | 31-bit |
ASC mode: | Primary |
Interrupt status: | Enabled for I/O and external interrupts |
Locks: | No spin locks held |
Control parameters: | Must be in the primary address space or be in an address/data space that is addressable through a public entry on the caller's dispatchable unit access list (DU-AL) |
IBM recommends that page fixes of more than 100 pages be divided into several smaller fix requests. Large page fix requests can cause an excessive spin loop to occur.
Before issuing PGSER with BRANCH=Y, the caller must ensure that GPR 13 points to a standard 18-word save area. Before issuing PGSER with BRANCH=N, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.
None.
The standard form of the PGSER macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede PGSER. |
PGSER | |
␢ | One or more blanks must follow PGSER. |
R | |
L | |
,FIX | |
,FREE | |
,LOAD | |
,OUT | |
,PROTECT | |
,UNPROTECT | |
,RELEASE | |
,ANYWHER | |
,LA=list addr | list addr: RX-type address or register (1), (5) - (12) for branch entry; or register (1), (2) - (12) for SVC entry. |
Note: This parameter is valid only with L. | |
,A=start addr | start addr: RX-type address or register (1), (5) - (12) for branch entry; or register (1), (2) - (12) for SVC entry. |
Note: This parameter is valid only with R. | |
,EA=end addr | Default: EA=start addr |
end addr: RX-type address or register (2), (5) - (12) for branch entry; or register (15), (2) - (12) for SVC entry. | |
Note: This parameter is valid only with R. | |
,TCB=tcb addr | Default: TCB=0 |
tcb addr: RX-type address or register (4), (5) - (12). | |
Note: This parameter can be specified only if FIX, FREE, LOAD, or OUT and BRANCH=Y are specified. | |
,ECB=ecb addr | Default: If FREE or LOAD is specified, ECB=0. |
ecb addr: RX-type address or register (0), (5) - (12) for branch entry; or register (0), (2) - (12) for SVC entry. | |
Note: This parameter is required if FIX is specified; is optional if FREE or LOAD is specified; and is not valid for OUT, RELEASE, or ANYWHER. For synchronous page fix the ECB address must be 0. | |
,RELEASE=Y | Default: RELEASE=N |
,RELEASE=N | Note: This parameter may be specified only if FIX, FREE, or LOAD is specified. |
,LONG=Y | Default: LONG=Y |
,LONG=N | Note: This parameter may be specified only if FIX is specified. |
,BACKOUT=Y | Default: BACKOUT=Y |
,BACKOUT=N | Note: This parameter may be specified only if FIX is specified. |
,KEEPREL=Y | Default: KEEPREL=N |
,KEEPREL=N | Note: This parameter may be specified only if OUT is specified. |
,ANYWHER=Y | Default: ANYWHER=N |
,ANYWHER=N | Note: This parameter may be specified only if FREE is specified. |
,BRANCH=Y | Default: BRANCH=N |
,BRANCH=N | |
,RELATED=value | value: Any valid macro keyword specification. |
The parameters are explained as follows:
FIX specifies that the virtual storage areas are to reside in central (also called real) storage and are ineligible for page-out while the address space is swapped in. This parameter does not prevent pages from being paged out when the entire address space is swapped out of central storage. FIX will ignore a request to fix storage in a system area that has the fixed attribute (for example, the LSQA and SQA). A FIX request for a page in the LSQA or SQA will not cause the page to be backed by central storage below 16 megabytes. Requests for disabled reference (DREF) storage are not valid for the FIX parameter.
FREE specifies that the virtual storage areas that were previously fixed via the FIX option are eligible for page-out. A fixed page is not considered pageable until the number of FREE and FIX requests for the page are equal. Requests for disabled reference (DREF) storage are not valid for the FREE parameter.
LOAD specifies that a page-in operation is to be initiated for the virtual storage area specified, in anticipation of future needs. Requests for disabled reference (DREF) storage are not valid for the LOAD parameter.
OUT specifies that a page-out operation is to be initiated for the virtual storage area specified. Requests for disabled reference (DREF) storage are not valid for the OUT parameter.
PROTECT specifies that a range of virtual storage be made read-only. R, L, LA, A, BRANCH, EA, and RELATED are valid keywords with the PROTECT option.
UNPROTECT specifies that a range of virtual storage be made modifiable. R, L, LA, A, BRANCH, EA, and RELATED are valid keywords with the UNPROTECT option. The caller must have either key 0 or a PSW key that matches the key of the storage.
RELEASE specifies the release of all physical paging resources, including both processor storage and auxiliary storage. Functionally, RELEASE is equivalent to a FREEMAIN macro followed by a GETMAIN macro. That is, the virtual space is maintained, but the data is discarded. When a released page is next referred to, its contents are binary zeros. RELEASE is the only PGSER function that is valid for disabled reference (DREF) storage.
Note: PGRLSE, PGSER RELEASE, PGSER FREE with RELEASE=Y, and PGFREE RELEASE=Y may ignore some or all of the pages in the input range and will not notify the caller if this was done.
ANYWHER applies to virtual storage areas that did not specify LOC=(BELOW,ANY) or LOC=(ANY,ANY) or LOC=ANY on a GETMAIN request, that have been previously fixed, and probably will not need to be fixed again. ANYWHER specifies that the virtual storage area specified can be placed either above or below 16 megabytes central on future page-ins.
For OUT and LOAD requests, the PGSER routine associates the request with a particular TCB so that the request can be purged if the task terminates before the request is complete. For SVC entry (BRANCH=N), the PGSER routine uses the current TCB.
Note: The TCB resides in storage below 16 megabytes.
For a FREE request, ECB specifies the address of the ECB that was used in a previous FIX request. If this parameter is specified, any pages in the previous FIX request that are not yet fixed, will not be fixed. If L is specified, the PSL chain must contain the addresses of the virtual pages in the same order in both the FREE and the previous FIX request. Also, the ECB for the FIX request will not be posted if it was not yet posted at the time of the FREE request.
If the ECB parameter is not specified on a FREE request, only the fix counts for the valid pages in storage at the time of the FREE request are decreased. This will not affect the paging activity and the posting of the ECB associated with the original FIX request.
If an ECB is supplied on a FIX or LOAD request, the caller must check the return code because the ECB will not be posted if the return code is zero. If an ECB is not supplied, it is not necessary to check the return code because control returns to the caller only if the request was successfully completed; if unsuccessful, page services abnormally terminates the caller.
For all callers that supply an ECB, page services verifies that the ECB address is in an area allocated through the GETMAIN macro and if the caller is not in key 0, page services also verifies that the ECB is in the caller's protect key. You must ensure that the page containing the ECB is not freed and that the key is not altered; otherwise, page services does not post the ECB.
Note: PGRLSE, PGSER RELEASE, PGSER FREE with RELEASE=Y, and PGFREE RELEASE=Y may ignore some or all of the pages in the input range and will not notify the caller if this was done.
If BRANCH=Y is specified, it is a branch entry and users of this option must provide the address of an 18-word save area in GPR 13. Cross memory callers and callers in AR mode must use BRANCH=Y.
If BRANCH=N is specified, it is an SVC entry.
PGSER might abnormally terminate with one of the following abend codes: X'18A', X'28A'. See z/OS MVS System Codes for explanations and programmer responses.
When the PGSER macro returns control to your program, GPR 15 contains one of the following hexadecimal return codes.
Option | Code | Meaning and Action |
---|---|---|
FIX | 0 | Meaning: The operation completed normally
and the ECB will not be posted. Action: None. If the ECB parameter was specified, do not wait on the ECB after receiving this return code because it will not be posted. |
FIX | 8 | Meaning: The operation is proceeding. The
ECB (if available) will be posted with X‘00’ when the requested pages
are fixed. Action: None. However, if the ECB parameter was specified, issuing the WAIT macro for this ECB will allow your program to synchronize with the completion of the page fix operation. |
FREE | 0 | Meaning: The operation completed normally. Action: None. |
LOAD | 0 | Meaning: The operation completed normally
and the ECB will not be posted. If no ECB is supplied, the operation
is completed or proceeding. Action: None. If the ECB parameter was specified, do not issue the WAIT macro for the ECB after receiving this return code because it will not be posted. |
LOAD | 8 | Meaning: The operation is proceeding. The
ECB will be posted with X‘00’ when all page-ins are complete. Action: None. However, if the ECB parameter was specified, issuing the WAIT macro for this ECB will allow your program to synchronize with the completion of the page load operation. |
OUT | 0 | Meaning: The operation completed normally. Action: None. |
OUT | C | Meaning: The operation completed normally.
At least one page in the requested range was not paged out. Action: None. |
RELEASE | 0 | Meaning: The operation completed normally. Note: PGRLSE, PGSER RELEASE, PGSER FREE with RELEASE=Y, and PGFREE RELEASE=Y may ignore some or all of the pages in the input range and will not notify the caller if this was done. Any
pages in the input range that match any of the following conditions
will be skipped, and processing continues with the next page in the
range:
Action: None. |
ANYWHER | 0 | Meaning: The operation completed normally. Action: None. |
PGSER R,FIX,A=(1),ECB=0,EA=LOADWORD,TCB=0,BRANCH=Y
IHAPVT
PGSER L,FREE,LA=(2),ECB=(8),RELEASE=Y,ANYWHER=Y,BRANCH=Y
IHAPVT
PGSER L,LOAD,LA=(1),ECB=0
IHAPVT
PGSER R,OUT,A=(1),EA=(5),TCB=(8),BRANCH=Y
IHAPVT
PGSER L,OUT,LA=LOADWORD
IHAPVT
PGSER R,PROTECT,A=(4),EA=ENDIT
IHAPVT