Virtual Machine 1/0 The simulation effort required of CP may be trivial, as for a supervisor call (SVC) interrupt (which is generally reflected back to the virtual machine), or may be more complex, as in the case of a Start I/O (SIO) interrupt, which initiates extensive CP
processing.
When planning for the virtual machine environment, consideration should be given
to the number and type of privileged instructions to be executed by the virtual
machines. Any reduction in the number of privileged instructions issued by the vir­
tual machine's operating system reduces the amount of extra work CP must do to
support the machine.
To support I/O processing in a virtual machine, CP must translate all virtual
machine channel command word (CCW) sequences to refer to real storage and real
devices and, in the case of minidisks, real cylinders. When a virtual machine issues
an SIO, CP must:
1. Intercept the virtual machine SIO interrupt.
2. Allocate real storage space to hold the real CCW list to be created.
3. Translate the virtual data addresses to real data addresses.
4. Translate the virtual device addresses referred to in the virtual CCWs to real
device addresses.
5. Page into real storage and lock, for the duration of the I/O operation, all virtu­
al storage pages required to support the I/O operation.
6. Generate a new CCW sequence building a Channel Indirect Data Address list
if the real storage locations cross page boundaries.
7. If the real device is a 3330V, append an MSS cylinder fault prefix to the CCW
prefix to prevent the channel from doing channel command retry.
8. Schedule the I/O request.
9. Present the SIO condition code to the virtual machine. 10. Recognize an MSS cylinder fault, queue the I/O request, and reschedule the
request when the subsequent interruption is received (indicating staging is
complete).
11. Intercept, retranslate, and present the channel end and device end interrupts to
the appropriate virtual machine, where they must then be processed by the vir­
tual machine operating system.
CP's handling of SIOs for virtual machines can be one of the most significant
causes of reduced performance in virtual machines.
The number of SIO operations required by a virtual machine can be significantly
reduced in several ways: Use of large blocking factors (up to 4096 bytes) for user data sets to reduce
the total number of SIOs needed.
Performance Guidelines 25
Paging Considerations Use of preallocated data sets. Use of virtual machine operating system options (such as chained scheduling in OS) that reduce the number of SIO instructions.
Substitution of a faster resource (virtual storage) for I/O operations, by build­
ing small temporary data sets in virtual storage rather than using an I/O device.
Frequently, there can be a performance gain when CP paging is substituted for vir­
tual machine I/O operations. The performance of an operating system such as OS can be improved by specifying as resident as many frequently used OS functions
(transient subroutines, ISAM indexes, and so forth) as are possible. In this way,
paging I/O is substituted for virtual machine-initiated I/O. In this case, the only
work to be done by CP is to place into real storage the page that contains the
desired routine or data.
Three CP performance options are available to reduce the CP overhead associated
with virtual machine I/O instructions or other privileged instructions used by the
virtual machine's I/O Supervisor:
1. The virtual=real option removes the need for CP to perform storage reference
translation and paging before each I/O operation for a specific virtual
machine.
2. The virtual machine assist feature reduces the real supervisor state time used by VM/SP. For a detailed description of the feature, see "Virtual Machine Assist Feature" later in this section. For a list of processors on which the feature is
available, see the VAI/ SP Planning Guide and Reference.
3. VM/370 Extended Control-Program Support (ECPS) further reduces the real
supervisor state time used by VM/SP. For a detailed description of ECPS, see "VM/370 Extended Control-Program Support (ECPS)" later in this section.
For a list of processors on which ECPS is available, see the VM / SP Planning
Guide and Reference.
Assignment and use of these options is discussed in "VM/SP Performance Options". When virtual machines refer to virtual storage addresses that are not currently in
real storage, they cause a paging exception and the associated CP paging activity.
The addressing characteristics of programs executing in virtual storage have a sig­
nificant effect on the number of page exceptions experienced by that virtual
machine. Routines that have widely scattered storage reference tend to increase
the paging load of a particular virtual machine. When possible, modules of code
that are dependent upon each other should be located in the same page. Reference
tables, constants, and literals should also be located near the routines that use
them. Exception or error routines that are infrequently used should not be placed
within main routines, but located elsewhere.
When an available page of virtual storage contains only reenterable code, paging
activity can be reduced, since the page, although referred to, is never changed, and
26 VM/SP System Programmer's Guide
Previous Page Next Page