# US 2021/0286729 A1 · Using a mirroring cache list to demote modified tracks from cache

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0286729 A1
- Document ID: US20210286729A1
- Status: Published application
- Kind: A1
- Application number: 16/818,608
- Filed: 2020-03-13
- Published: 2021-09-16
- Earliest claimed: 2020-03-13
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Lokesh Mohan Gupta; Kevin J. Ash; Kyler A. Anderson; Matthew J. Kalos
- Web page: https://patentgrep.com/patent/US20210286729A1

## CPC

- G06F 11/2064: {while ensuring consistency}
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 11/2056: {by mirroring}
- G06F 11/2071: {using a plurality of controllers}
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/0895: of parts of caches, e.g. directory or tag array
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 2201/885: Monitoring specific for caches
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided are a computer program product, system, and method for using mirroring cache list to demote modified tracks from cache A modified track for a primary storage stored in the cache to mirror to a secondary storage is indicated in a mirroring cache list. The mirroring cache list is processed to select modified tracks in the cache to transfer to the secondary storage that have not yet been transferred. The selected modified tracks in the cache are transferred to the secondary storage. The mirroring cache list is processed to determine modified tracks in the cache to demote from the cache.

## Claims

### Claim 1

A computer program product for managing modified tracks for a primary storage in a cache to mirror to a secondary storage, wherein the computer program product comprises a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause operations, the operations comprising:
indicating a modified track for the primary storage stored in the cache in a mirroring cache list;
processing the mirroring cache list to select modified tracks in the cache to transfer to the secondary storage that have not yet been transferred;
transferring the selected modified tracks in the cache to the secondary storage; and
processing the mirroring cache list to determine modified tracks in the cache to demote from the cache.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the operations further comprise:
removing indication of a modified track from the mirroring cache list in response to demoting the modified track from the cache, wherein a track indicated in the mirroring cache list transferred to the secondary storage remains in the mirroring cache list until demoted from the mirroring cache list.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the processing the mirroring cache list to select modified tracks in the cache to demote comprises:
selecting a modified track in the mirroring cache list to demote;
determining whether the selected modified track to demote needs is to be transferred to the secondary storage;
in response to determining that the selected modified track to demote is to be transferred to the secondary storage, transferring the selected modified track to demote to the secondary storage and demoting the selected modified track to demote from the cache; and
demoting the selected modified track to demote from the cache in response to determining that the selected modified track does is not to be transferred to the secondary storage.

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein the processing the mirroring cache list to select modified tracks in the cache to demote comprises:
selecting a modified track in the mirroring cache list to demote;
determining whether the selected modified track to demote in the mirroring cache list is to be transferred to the secondary storage;
in response to determining that the selected modified track to demote is to be transferred to the secondary storage, indicating the selected modified track to demote in a transfer list and demoting the selected modified track to demote from the cache;
demoting the selected modified track to demote from the cache in response to determining that the modified track is not to the secondary storage; and
processing the transfer list to transfer modified tracks indicated in the transfer list to the secondary storage.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein the processing the mirroring cache list to determine modified tracks in the cache to demote comprises:
selecting a modified track in the mirroring cache list to demote;
determining whether the selected modified track to demote in the mirroring cache list is to be transferred to the secondary storage;
determining whether a percentage of free cache space is below a threshold in response to determining that the selected modified track to demote has not been transferred to the secondary storage;
in response to determining that the percentage of free cache space is below the threshold, indicating the selected modified track to demote in a transfer list and demoting the selected modified track from the cache;
in response to determining that the percentage of free cache space is not below the threshold, transferring the selected modified track to demote to the secondary storage and demoting the selected modified track to demote from the cache;
demoting the selected modified track to demote from the cache in response to determining that the selected modified track to demote is not to be transferred to the secondary storage; and
processing the transfer list to transfer modified tracks indicated in the transfer list to the secondary storage.

### Claim 6 (depends on 1)

The computer program product of claim 1, wherein the operations further comprise:
indicating tracks to demote from cache that are not to be mirrored to the secondary storage in a demote cache list;
selecting one of the demote cache list or the mirroring cache list having a modified track with an oldest timestamp; and
demoting modified tracks from the selected one of the demote cache list or the mirroring cache list.

### Claim 7 (depends on 6)

The computer program product of claim 6, wherein the operations further comprise:
determining whether a time difference of an oldest modified track in the mirroring cache list and an oldest modified track in the demote cache list is below a time threshold; and
determining whether a percentage of cache used by the mirroring cache list is below a space threshold, wherein the demote cache list is selected in response to determining one of that the time difference is less than the time threshold and the percentage of cache used is less than the space threshold, and wherein the mirroring cache list is selected in response to determining that neither the time difference is less than the time threshold nor the percentage of cache used is less than the space threshold.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein the mirroring cache list comprises a first mirroring cache list to indicate a first type of modified track and the demote cache list comprises a first demote cache list to indicate the first type of modified track not to mirror, wherein the operations further comprises:
maintaining a second mirroring cache list to indicate a second type of modified track and a second demote cache list to indicate the second type of modified track not to mirror;
determining whether to demote modified tracks of the first type or the second type;
selecting one of the first demote cache list or the first mirroring cache list having a modified track with an oldest timestamp in response to determining to demote modified tracks of the first type;
selecting one of the second demote cache list or the second mirroring cache list having a modified track with an oldest timestamp in response to determining to demote modified tracks of the second type; and
demoting modified tracks from the selected one of the first demote cache list, the first mirroring cache list, the second demote cache list, and the second mirroring cache list.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the first type of modified track comprises a sequential track write as part of a sequential write process and wherein the second type of modified track comprises a random track written as part of a random write process.

### Claim 10

A system for managing modified tracks for a primary storage to mirror to a secondary storage, comprising:
a processor;
a cache accessible to the processor; and
a computer readable storage medium having program instructions embodied therewith, the program instructions that when executed by the processor cause operations, the operations comprising:
indicating a modified track for the primary storage stored in the cache in a mirroring cache list;
processing the mirroring cache list to select modified tracks in the cache to transfer to the secondary storage that have not yet been transferred;
transferring the selected modified tracks in the cache to the secondary storage; and
processing the mirroring cache list to determine modified tracks in the cache to demote from the cache.

### Claim 11 (depends on 10)

The system of claim 10, wherein the operations further comprise:
removing indication of a modified track from the mirroring cache list in response to demoting the modified track from the cache, wherein a track indicated in the mirroring cache list transferred to the secondary storage remains in the mirroring cache list until demoted from the mirroring cache list.

### Claim 12 (depends on 10)

The system of claim 10, wherein the processing the mirroring cache list to select modified tracks in the cache to demote comprises:
selecting a modified track in the mirroring cache list to demote;
determining whether the selected modified track to demote needs is to be transferred to the secondary storage;
in response to determining that the selected modified track to demote is to be transferred to the secondary storage, transferring the selected modified track to demote to the secondary storage and demoting the selected modified track to demote from the cache; and
demoting the selected modified track to demote from the cache in response to determining that the selected modified track does is not to be transferred to the secondary storage.

### Claim 13 (depends on 10)

The system of claim 10, wherein the processing the mirroring cache list to determine modified tracks in the cache to demote comprises:
selecting a modified track in the mirroring cache list to demote;
determining whether the selected modified track to demote in the mirroring cache list is to be transferred to the secondary storage;
determining whether a percentage of free cache space is below a threshold in response to determining that the selected modified track to demote has not been transferred to the secondary storage;
in response to determining that the percentage of free cache space is below the threshold, indicating the selected modified track to demote in a transfer list and demoting the selected modified track from the cache;
in response to determining that the percentage of free cache space is not below the threshold, transferring the selected modified track to demote to the secondary storage and demoting the selected modified track to demote from the cache;
demoting the selected modified track to demote from the cache in response to determining that the selected modified track to demote is not to be transferred to the secondary storage; and
processing the transfer list to transfer modified tracks indicated in the transfer list to the secondary storage.

### Claim 14 (depends on 10)

The system of claim 10, wherein the operations further comprise:
indicating tracks to demote from cache that are not to be mirrored to the secondary storage in a demote cache list;
selecting one of the demote cache list or the mirroring cache list having a modified track with an oldest timestamp; and
demoting modified tracks from the selected one of the demote cache list or the mirroring cache list.

### Claim 15 (depends on 10)

The system of claim 10, wherein the mirroring cache list comprises a first mirroring cache list to indicate a first type of modified track and the demote cache list comprises a first demote cache list to indicate the first type of modified track not to mirror, wherein the operations further comprises:
maintaining a second mirroring cache list to indicate a second type of modified track and a second demote cache list to indicate the second type of modified track not to mirror;
determining whether to demote modified tracks of the first type or the second type;
selecting one of the first demote cache list or the first mirroring cache list having a modified track with an oldest timestamp in response to determining to demote modified tracks of the first type;
selecting one of the second demote cache list or the second mirroring cache list having a modified track with an oldest timestamp in response to determining to demote modified tracks of the second type; and
demoting modified tracks from the selected one of the first demote cache list, the first mirroring cache list, the second demote cache list, and the second mirroring cache list.

### Claim 16

A method for managing modified tracks for a primary storage in a cache to mirror to a secondary storage, comprising:
indicating a modified track for the primary storage stored in the cache in a mirroring cache list;
processing the mirroring cache list to select modified tracks in the cache to transfer to the secondary storage that have not yet been transferred;
transferring the selected modified tracks in the cache to the secondary storage; and
processing the mirroring cache list to determine modified tracks in the cache to demote from the cache.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
removing indication of a modified track from the mirroring cache list in response to demoting the modified track from the cache, wherein a track indicated in the mirroring cache list transferred to the secondary storage remains in the mirroring cache list until demoted from the mirroring cache list.

### Claim 18 (depends on 16)

The method of claim 16, wherein the processing the mirroring cache list to select modified tracks in the cache to demote comprises:
selecting a modified track in the mirroring cache list to demote;
determining whether the selected modified track to demote needs is to be transferred to the secondary storage;
in response to determining that the selected modified track to demote is to be transferred to the secondary storage, transferring the selected modified track to demote to the secondary storage and demoting the selected modified track to demote from the cache; and
demoting the selected modified track to demote from the cache in response to determining that the selected modified track does is not to be transferred to the secondary storage.

### Claim 19 (depends on 16)

The method of claim 16, wherein the processing the mirroring cache list to determine modified tracks in the cache to demote comprises:
selecting a modified track in the mirroring cache list to demote;
determining whether the selected modified track to demote in the mirroring cache list is to be transferred to the secondary storage;
determining whether a percentage of free cache space is below a threshold in response to determining that the selected modified track to demote has not been transferred to the secondary storage;
in response to determining that the percentage of free cache space is below the threshold, indicating the selected modified track to demote in a transfer list and demoting the selected modified track from the cache;
in response to determining that the percentage of free cache space is not below the threshold, transferring the selected modified track to demote to the secondary storage and demoting the selected modified track to demote from the cache;
demoting the selected modified track to demote from the cache in response to determining that the selected modified track to demote is not to be transferred to the secondary storage; and
processing the transfer list to transfer modified tracks indicated in the transfer list to the secondary storage.

### Claim 20 (depends on 16)

The method of claim 16, further comprising:
indicating tracks to demote from cache that are not to be mirrored to the secondary storage in a demote cache list;
selecting one of the demote cache list or the mirroring cache list having a modified track with an oldest timestamp; and
demoting modified tracks from the selected one of the demote cache list or the mirroring cache list.
