# US 2024/0202130 A1 · Systems and methods for managing dirty data

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

- Number: US 2024/0202130 A1
- Document ID: US20240202130A1
- Status: Published application
- Kind: A1
- Application number: 18/068,475
- Filed: 2022-12-19
- Published: 2024-06-20
- Earliest claimed: 2022-12-19
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Kevin Neal MAGILL; Eric Francis ROBINSON; Jason Lawrence PANAVICH; Michael Bryan MITCHELL; Michael Peter WILSON
- Web page: https://patentgrep.com/patent/US20240202130A1

## CPC

- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 12/0837: with software control, e.g. non-cacheable data
- G06F 12/0864: using pseudo-associative means, e.g. set-associative or hashing
- G06F 12/123: with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present disclosure include techniques for managing dirty data. An agent receives a request for data. If the data is dirty data, the agent may use a replacement policy to determine if the data should be passed clean or dirty to the requestor. The replacement policy may correspond to how long the dirty data being stored in a cache line is to be maintained. In one embodiment, the replacement policy is a circuit, such as an SRAM and a logic circuit, for example.

## Claims

### Claim 1

A processor comprising:
a memory cache comprising dirty data; and
a cache replacement policy circuit,
wherein the processor receives a request for the dirty data from a requestor, and
wherein the processor responds to the request based on the cache replacement policy circuit applied to the dirty data, wherein the dirty data is sent in response to the request as clean data based on a first cache replacement policy result and the dirty data is sent in response to the request as dirty data based on a second cache replacement policy result.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the cache replacement policy circuit is configurable.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the first cache replacement policy result corresponds to the dirty data being stored in a cache line to be maintained for a first period of time, and wherein the second cache replacement policy result corresponds to the dirty data being stored in a cache line to be maintained for a second period of time less than the first period of time.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the memory cache is a set-associative cache.

### Claim 5 (depends on 4)

The processor of claim 4, wherein a plurality of cache lines are retrieved with a cache line storing the dirty data, and wherein the first cache replacement policy result indicates that the cache line storing the dirty data ranks, among the plurality of cache lines, below a threshold and the second cache replacement policy result indicates that the cache line storing the dirty data ranks, among the plurality of cache lines, above the threshold.

### Claim 6 (depends on 5)

The processor of claim 5, wherein the threshold is configurable.

### Claim 7 (depends on 5)

The processor of claim 5, wherein the plurality of cache lines are ranked based on a recent use.

### Claim 8 (depends on 7)

The processor of claim 7, wherein the plurality of cache lines are ranked using a least recently used algorithm.

### Claim 9 (depends on 8)

The processor of claim 8, wherein the least recently used algorithm is in a binary tree.

### Claim 10 (depends on 1)

The processor of claim 1, wherein the cache replacement policy circuit comprises a random access memory comprising replacement bits and a logic circuit.

### Claim 11 (depends on 1)

The processor of claim 1, wherein the cache replacement policy circuit executes a re-reference interval prediction replacement policy.

### Claim 12 (depends on 1)

The processor of claim 1, wherein, prior to responding to the request based on the cache replacement policy circuit, the processor sends or retains the dirty data based on the memory cache storing the requested data in an exclusive or shared state.

### Claim 13 (depends on 1)

The processor of claim 1, wherein the processor retains the dirty data based on the memory cache storing the requested data in an exclusive state and responds to the request based on the cache replacement policy circuit when the memory cache stores the requested data in a shared state.

### Claim 14 (depends on 1)

The processor of claim 1, wherein the first and second cache replacement policy results are based on a first threshold when the dirty data is stored in an exclusive state and the first and second cache replacement policy results are based on a second threshold when the dirty data is stored in a shared state.

### Claim 15 (depends on 14)

The processor of claim 14, wherein the first and second thresholds are configurable.

### Claim 16 (depends on 1)

The processor of claim 1, further comprising modifying information used in the cache replacement policy circuit when the dirty data is sent in response to the request as clean data.

### Claim 17

A method of managing data in a processor comprising:
receiving, in the processor, a request for data from a requestor, the data being stored in a dirty data state in a memory cache;
accessing the memory cache to retrieve the dirty data; and
generating a response to the request based on a cache replacement policy applied to the dirty data, where the dirty data is sent in response to the request as clean data based on a first cache replacement policy result and the dirty data is sent in response to the request as dirty data based on a second cache replacement policy result.

### Claim 18 (depends on 17)

The method of claim 17, wherein the first cache replacement policy result corresponds to the dirty data being stored in a cache line to be maintained for a first period of time, and wherein the second cache replacement policy result corresponds to the dirty data being stored in a cache line to be maintained for a second period of time less than the first period of time.

### Claim 19 (depends on 17)

The method of claim 17, wherein the memory cache is a set-associative cache.

### Claim 20 (depends on 19)

The method of claim 19, wherein a plurality of cache lines are retrieved with a cache line storing the dirty data, and wherein the first cache replacement policy result indicates that the cache line storing the dirty data ranks, among the plurality of cache lines, below a threshold and the second cache replacement policy result indicates that the cache line storing the dirty data ranks, among the plurality of cache lines, above the threshold.
