Pre-allocating cache resources for a range of tracks in anticipation of access requests to the range of tracks
Abstract
Provided are a computer program product, system, and method for managing access requests from a host to tracks in storage. A cursor is set to point to a track in a range of tracks established for sequential accesses. Cache resources are accessed for the cache for tracks in the range of tracks in advance of processing access requests to the range of tracks. Indication is received of a subset of tracks in the range of tracks for subsequent access transactions and a determination is made whether the cursor points to a track in the subset of tracks. The cursor is set to point to a track in the subset of tracks and cache resources are accessed for tracks in the subset of tracks for anticipation of access transactions to tracks in the subset of tracks.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A computer program product for managing access requests from a host to tracks in storage cached in a cache, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that is executable to perform operations, the operations comprising:
setting a cursor to point to a track in a range of tracks established for sequential accesses;
accessing cache resources for the cache for tracks in the range of tracks in advance of processing access requests to the range of tracks;
receiving indication of a subset of tracks in the range of tracks for subsequent access transactions to the subset of tracks;
determining whether the cursor points to a track in the subset of tracks;
setting the cursor to point to a track in the subset of tracks; and
accessing cache resources for tracks in the subset of tracks in anticipation of access transactions to tracks in the subset of tracks.
2. The computer program product of claim 1 , wherein the subset of tracks is indicated in an access request including at least one transaction to access tracks in the subset of tracks.
3. The computer program product of claim 1 , the operations further comprise:
releasing cache resources held for tracks preceding the cursor in the range of tracks after setting the cursor set to point to a track in the subset of tracks; and
accessing cache resources for consecutive tracks from the cursor for which cache resources are not held.
4. The computer program product of claim 1 , wherein the access transactions comprise write transactions, wherein the operations further comprise:
processing a write transaction to a target track in response to determining that the cursor points to a track in the subset of tracks; and
in response to completing the write transaction:
setting the cursor to point to a next track in the range of tracks following the target track pointed to by the cursor that was not written;
releasing cache resources held for the target track; and
accessing cache resources for a track following the cursor in the range of tracks for which cache resources are not held and that has not been written since the range of tracks was established.
5. The computer program product of claim 4 , wherein the operations further comprise:
providing a track access list indicating for each track in the range of tracks whether cache resources are held for the track and whether the track was written since the range of tracks was established;
wherein the setting the cursor to point to the next track comprises:
determining from the track access list whether there are one or more consecutive tracks following the target track to which the cursor points that are indicated in the track access list as having been written;
setting the cursor to point to a next track immediately following the cursor in response to determining that there are not one or more consecutive tracks following the cursor that have been written; and
setting the cursor to point to a track following a last of the determined one or more consecutive tracks in response to determining that there are one or more consecutive tracks following the cursor having been written.
6. The computer program product of claim 5 , wherein the cursor is not adjusted when the cursor does not point to the target track.
7. The computer program product of claim 1 , wherein the accessing cache resources for a track includes accessing at least one of metadata for the track, reserving a segment in a cache for the track to be subject to an access request, and reserving a segment in a non-volatile storage to provide a duplicate copy of the track subject to the access request.
8. The computer program product of claim 1 , wherein the access transactions comprise write transactions, wherein the operations further comprise:
receiving a write transaction on a first channel from the host;
failing the write transaction in response to determining that the cursor does not point to a track in the subset of tracks;
receiving the write transaction on a second channel connected to the host in response to the failing the write transaction; and
processing the write transaction to a target track in response to receiving the write transaction on the second channel.
9. The computer program product of claim 8 , wherein the operations further comprise:
processing the write transaction received on the first channel in response to determining that the cursor points to a track in the subset of tracks; and
moving the cursor to point to a next track in the range of tracks, consecutive with respect to a current position of the cursor, that has not yet been written in response to completing the write transaction on the first or second channel.
10. The computer program product of claim 9 , wherein the operations performed in response to completing the write transaction on the first or second channel further comprise:
releasing the cache resources held for the target track; and
accessing cache resources for a track within the range of tracks following a last track in the range of tracks for which cache resources were accessed.
11. The computer program product of claim 8 , wherein the first channel provides faster processing of the write transactions than the second channel.
12. A computer program product for managing write requests from a host to tracks in storage cached in a cache, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that is executable to perform operations, the operations comprising:
setting a cursor to point to a track in a range of tracks established for write transactions to sequential tracks;
accessing cache resources for the cache for tracks in the range of tracks in advance of processing access requests to the range of tracks;
receiving a write transaction on a first channel from the host indicating a subset of tracks in the range of tracks;
failing the write transaction in response to determining that the cursor does not point to a track in the subset of tracks;
receiving the write transaction on a second channel connected to the host in response to the failing the write transaction; and
processing the write transaction to a target track in response to receiving the write transaction on the second channel.
13. The computer program product of claim 12 , wherein the operations further comprise:
processing the write transaction received on the first channel in response to determining that the cursor points to a track in the subset of tracks; and
moving the cursor to point to a next track in the range of tracks, consecutive with respect to a current position of the cursor, that has not yet been written in response to completing the write transaction on the first or second channel.
14. The computer program product of claim 12 , wherein the operations performed in response to completing the write transaction on the first or second channel further comprise:
releasing the cache resources held for the target track; and
accessing cache resources for a track within the range of tracks following a last track in the range of tracks for which cache resources were accessed.
15. A system for managing access requests from a host to tracks in storage; comprising:
a processor;
a cache; and
a computer readable storage medium having computer readable program code embodied therein that is executable by the processor to perform operations, the operations comprising:
setting a cursor to point to a track in a range of tracks established for sequential accesses;
accessing cache resources for the cache for tracks in the range of tracks in advance of processing access requests to the range of tracks;
receiving indication of a subset of tracks in the range of tracks for subsequent access transactions to the subset of tracks;
determining whether the cursor points to a track in the subset of tracks;
setting the cursor to point to a track in the subset of tracks; and
accessing cache resources for tracks in the subset of tracks in anticipation of access transactions to tracks in the subset of tracks.
16. The system of claim 15 , wherein the operations further comprise:
releasing cache resources held for tracks preceding the cursor in the range of tracks after setting the cursor set to point to a track in the subset of tracks; and
accessing cache resources for consecutive tracks from the cursor for which cache resources are not held.
17. The system of claim 15 , wherein the access transactions comprise write transactions, wherein the operations further comprise:
processing a write transaction to a target track in response to determining that the cursor points to a track in the subset of tracks; and
in response to completing the write transaction:
setting the cursor to point to a next track in the range of tracks following the target track pointed to by the cursor that was not written;
releasing cache resources held for the target track; and
accessing cache resources for a track following the cursor in the range of tracks for which cache resources are not held and that has not been written since the range of tracks was established.
18. The system of claim 17 , wherein the operations further comprise:
providing a track access list indicating for each track in the range of tracks whether cache resources are held for the track and whether the track was written since the range of tracks was established;
wherein the setting the cursor to point to the next track comprises:
determining from the track access list whether there are one or more consecutive tracks following the target track to which the cursor points that are indicated in the track access list as having been written;
setting the cursor to point to a next track immediately following the cursor in response to determining that there are not one or more consecutive tracks following the cursor that have been written; and
setting the cursor to point to a track following a last of the determined one or more consecutive tracks in response to determining that there are one or more consecutive tracks following the cursor having been written.
19. A system for managing write requests from a host to tracks in storage, comprising:
a processor;
a cache; and
a computer readable storage medium having computer readable program code embodied therein that is executable by the processor to perform operations, the operations comprising:
setting a cursor to point to a track in a range of tracks established for write transactions to sequential tracks;
accessing cache resources for the cache for tracks in the range of tracks in advance of processing access requests to the range of tracks;
receiving a write transaction on a first channel from the host indicating a subset of tracks in the range of tracks;
failing the write transaction in response to determining that the cursor does not point to a track in the subset of tracks;
receiving the write transaction on a second channel connected to the host in response to the failing the write transaction; and
processing the write transaction to a target track in response to receiving the write transaction on the second channel.
20. The system of claim 19 , wherein the operations further comprise:
processing the write transaction received on the first channel in response to determining that the cursor points to a track in the subset of tracks; and
moving the cursor to point to a next track in the range of tracks, consecutive with respect to a current position of the cursor, that has not yet been written in response to completing the write transaction on the first or second channel.
21. The system of claim 19 , wherein the operations performed in response to completing the write transaction on the first or second channel further comprise:
releasing the cache resources held for the target track; and
accessing cache resources for a track within the range of tracks following a last track in the range of tracks for which cache resources were accessed.
22. A method for managing access requests from a host to tracks in storage; comprising:
setting a cursor to point to a track in a range of tracks established for sequential accesses;
accessing cache resources for a cache for tracks in the range of tracks in advance of processing access requests to the range of tracks;
receiving indication of a subset of tracks in the range of tracks for subsequent access transactions to the subset of tracks;
determining whether the cursor points to a track in the subset of tracks;
setting the cursor to point to a track in the subset of tracks; and
accessing cache resources for tracks in the subset of tracks in anticipation of access transactions to tracks in the subset of tracks.
23. The method of claim 22 , further comprising:
releasing cache resources held for tracks preceding the cursor in the range of tracks after setting the cursor set to point to a track in the subset of tracks; and
accessing cache resources for consecutive tracks from the cursor for which cache resources are not held.
24. The method of claim 22 , wherein the access transactions comprise write transactions, further comprising:
processing a write transaction to a target track in response to determining that the cursor points to a track in the subset of tracks; and
in response to completing the write transaction:
setting the cursor to point to a next track in the range of tracks following the target track pointed to by the cursor that was not written;
releasing cache resources held for the target track; and
accessing cache resources for a track following the cursor in the range of tracks for which cache resources are not held and that has not been written since the range of tracks was established.
25. The method of claim 24 , further comprising:
providing a track access list indicating for each track in the range of tracks whether cache resources are held for the track and whether the track was written since the range of tracks was established;
wherein the setting the cursor to point to the next track comprises:
determining from the track access list whether there are one or more consecutive tracks following the target track to which the cursor points that are indicated in the track access list as having been written;
setting the cursor to point to a next track immediately following the cursor in response to determining that there are not one or more consecutive tracks following the cursor that have been written; and
setting the cursor to point to a track following a last of the determined one or more consecutive tracks in response to determining that there are one or more consecutive tracks following the cursor having been written.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.