# US 2022/0292015 A1 · Cache Victim Selection Based on Completer Determined Cost in a Data Processing System

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

- Number: US 2022/0292015 A1
- Document ID: US20220292015A1
- Status: Published application
- Kind: A1
- Application number: 17/199,864
- Filed: 2021-03-12
- Published: 2022-09-15
- Earliest claimed: 2021-03-12
- Assignees: Arm Limited
- Applicants: Arm Limited
- Inventors: Alexander Klimov
- Web page: https://patentgrep.com/patent/US20220292015A1

## CPC

- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 21/62: Protecting access to data via a platform, e.g. using keys or access control rules
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- G06F 21/79: in semiconductor storage media, e.g. directly-addressable memories
- G06F 2212/1052: Security improvement
- G06F 2212/214: Solid state disk
- G06F 2212/60: Details of cache memory
- G06F 2212/7211: Wear leveling
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data processing apparatus includes a requester, a completer and a cache. Data is transferred between the requester and the cache and between the cache and the completer. The cache implements a cache eviction policy. The completer determines an eviction cost associated with evicting the data from the cache and notifies the cache of the eviction cost. The cache eviction policy implemented by the cache is based, at least in part, on the cost of evicting the data from the cache. The eviction cost may be determined, for example, based on properties or usage of a memory system of the completer.

## Claims

### Claim 1

A data processing apparatus comprising:
a cache configured to implement a cache eviction policy for data stored in the cache;
a requester configured to request data from the cache; and
a completer configured to;
transfer data to the cache in response to a request from the cache;
determine a cost of evicting the data from the cache; and
notify the cache of the cost of evicting the data from the cache,
where the cache eviction policy for data in the cache is based, at least in part, on the cost of evicting the data from the cache.

### Claim 2 (depends on 1)

The data processing apparatus of claim 1, where the completer is configured to notify the cache of the cost of evicting the data from the cache in response to a request from the cache.

### Claim 3 (depends on 1)

The data processing apparatus of claim 1, where the completer is configured to notify the cache of the cost of evicting the data from the cache in response to a read request for the data.

### Claim 4 (depends on 1)

The data processing apparatus of claim 1, where the completer is a memory protection engine configured to:
implement a memory protection policy based, at least in part, on a use of nonces for confidentiality or data integrity protection;
update a counter of the memory protection engine in response to a request, from the cache, to access encrypted data stored in a memory, the counter associated with a location of the data in the memory;
generate a nonce based on a value of the counter;
re-encrypt data stored in the memory when counter reaches a designated value;
where the memory protection engine is configured to determine the cost of evicting the data from the cache based, at least in part, on a current value of the counter, a higher cost associated with a counter closer to its designated value.

### Claim 5 (depends on 1)

The data processing apparatus of claim 1, where the completer is further configured to:
count accesses to a memory region; and
determine the cost of evicting data associated with the memory region from the cache based on a number of accesses to the memory region, where the cost is higher for a memory region that has been subject to more accesses so as to promote wear leveling.

### Claim 6 (depends on 5)

The data processing apparatus of claim 5, where the memory region is a region of flash memory.

### Claim 7 (depends on 1)

The data processing apparatus of claim 1, where the completer is configured to access a memory system that includes a plurality of memories having different properties, and where the completer is further configured to determine the cost of evicting the data from the cache based, at least in part, on a property of a memory, of the plurality of memories, where the evicted data is to be stored.

### Claim 8 (depends on 7)

The data processing apparatus of claim 7, where the cost of evicting the data from the cache is based, at least in part, on an access time of the memory where the evicted data is to be stored and where the cost is higher for a memory with a longer access time.

### Claim 9 (depends on 7)

The data processing apparatus of claim 7, where the cost of evicting the data from the cache is based, at least in part, on an energy usage of the memory where the evicted data is to be stored and where the cost is higher for a memory with greater energy usage.

### Claim 10 (depends on 7)

The data processing apparatus of claim 7, where the cost of evicting the data from the cache is based, at least in part, on a durability of the memory where the evicted data is to be stored and where the cost is higher for a less durable memory.

### Claim 11

A method comprising:
requesting, by a requester of a data processing apparatus from a cache of the data processing apparatus, first data;
requesting, by the cache from a completer of a data processing apparatus, the first data;
transferring, by the completer, the first data from a memory system to the cache in response to the request from the cache;
determining, by the completer, a cost of evicting the first data from the cache;
notifying, by the completer, the cache of the cost of evicting the first data from the cache;
selecting, by the cache, second data to be evicted from the cache based, at least in part, on a cost of evicting the second data from the cache; and
evicting, by the cache, the second data from the cache.

### Claim 12 (depends on 11)

The method of claim 11, where said notifying is performed in response to the completer receiving a request for the cost of evicting from the cache.

### Claim 13 (depends on 11)

The method of claim 11, where said notifying is performed in response to the completer receiving the request for the first data from the cache.

### Claim 14 (depends on 11)

The method of claim 11, where the completer is a memory protection engine, the method further comprising:
updating a counter of the memory protection engine in response to the request from the cache, the counter associated with a location of the first data in the memory system;
generating a nonce based on a value of the counter;
transferring the first data from the memory protection engine to the cache in accordance with a memory protection protocol using the generated nonce, where in the memory system is encrypted; and
re-encrypting data stored in the memory system when counter reaches a designated value;
where said determining the cost of evicting the first data from the cache is based, at least in part, on a current value of the counter, a higher cost associated with a counter closer to its designated value.

### Claim 15 (depends on 11)

The method of claim 11, further comprising:
counting accesses to a memory region; and
determining, based at least in part on a number of accesses to the memory region, the cost of evicting data associated with the memory region from the cache, where the cost is higher for a memory region that has been subject to more accesses so as to promote wear leveling.

### Claim 16 (depends on 15)

The method of claim 15, where the memory region is a region of flash memory.

### Claim 17 (depends on 11)

The method of claim 11, where the memory system comprises a plurality of memories having different properties, and where said determining the cost of evicting the data from the cache is based, at least in part, on a property of a memory, of the plurality of memories, where the evicted data is to be stored.

### Claim 18 (depends on 17)

The method of claim 17, where the cost of evicting the second data from the cache is based, at least in part, on an access time of the memory where the second data is to be stored and where the cost is higher for a memory with a longer access time.

### Claim 19 (depends on 17)

The method of claim 17, where the cost of evicting the second data from the cache is based, at least in part, on an energy usage of the memory where the second data is to be stored and where the cost is higher for a memory with a greater energy usage.

### Claim 20 (depends on 17)

The method of claim 17, where the cost of evicting the second data from the cache is based, at least in part, on a durability of the memory where the evicted data is to be stored and where the cost is higher for less durable memory.
