Cache management of track removal in a cache for storage
AssigneeInternational Business Machines Corporation
InventorsMichael T. Benhase, Lokesh M. Gupta
Life of this patent
Estimating the term…
Abstract
In one embodiment, a cache manager releases a list lock during a scan when a track has been identified as a track for cache removal processing such as demoting the track, for example. By releasing the list lock, other processors have access to the list while the identified track is processed for cache removal. In one aspect, the position of the previous entry in the list may be stored in a cursor or pointer so that the pointer value points to the prior entry in the list. Once the cache removal processing of the identified track is completed, the list lock may be reacquired and the scan may be resumed at the list entry identified by the pointer. Other features and aspects may be realized, depending upon the particular application.
Claims14
A computer program product for managing a cache, the computer program product comprising a non-transitory computer readable storage medium having computer readable program code embodied therein for execution by a processor to perform managing operations, the managing operations comprising:
- maintaining in a cache, tracks in the storage subject to Input/Output (I/O) requests;
- scanning a list of tracks in cache to identify candidates for cache removal processing which includes one of demoting an identified track from the cache, and destaging an identified track to storage;
- locking the list to prevent access to the list by other processors while the list of tracks is being scanned;
- identifying a track of the list of tracks to be cache removal processed;
- in response to an identification of a track of the list of tracks to be cache removal processed:
- interrupting the scanning of the list of tracks;
- storing a pointer to a position in the list of tracks as a function of the position in the list at which the scanning was interrupted;
- releasing the locking of the list to allow access to the list by other processors while the identified track is being cache removal processed;
- and
- in response to releasing the locking of the list, cache removal processing the identified track by one of demoting the identified track from the cache, and destaging the identified track to storage;
- initiating a timer upon initiation of scanning to time a predetermined period of time;
- and
- upon expiration of the predetermined period of time:
- interrupting the scanning of the list of tracks;
- storing a pointer to a position in the list of tracks as a function of the position in the list at which the scanning was interrupted;
- and
- releasing the locking of the list to allow access to the list by other processors.
A computing system, comprising:
- a storage for storing tracks of data;
- and
- a storage controller including a plurality of processors, a cache for storing tracks of data, and a cache manager including a computer readable storage medium having computer readable program code embodied therein executed by a processor to perform managing operations, the managing operations comprising:
- maintaining in the cache, tracks subject to Input/Output (I/O) requests;
- scanning a list of tracks in cache to identify candidates for cache removal processing which includes one of demoting an identified track from the cache, and destaging an identified track to storage;
- locking the list to prevent access to the list by other processors while the list of tracks is being scanned;
- identifying a track of the list of tracks to be cache removal processed;
- in response to an identification of a track of the list of tracks to be cache removal processed:
- interrupting the scanning of the list of tracks;
- storing a pointer to a position in the list of tracks as a function of the position in the list at which the scanning was interrupted;
- releasing the locking of the list to allow access to the list by other processors while the identified track is being cache removal processed;
- and
- in response to releasing the locking of the list, cache removal processing the identified track by one of demoting the identified track from the cache, and destaging the identified track to storage;
- initiating a timer upon initiation of scanning to time a predetermined period of time;
- and
- upon expiration of the predetermined period of time:
- interrupting the scanning of the list of tracks;
- storing a pointer to a position in the list of tracks as a function of the position in the list at which the scanning was interrupted;
- and
- releasing the locking of the list to allow access to the list by other processors.
Dependencies are inferred from the claim text.