# US 2015/0178202 A1 · Method and apparatus for cache line write back operation

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

- Number: US 2015/0178202 A1
- Document ID: US20150178202A1
- Status: Published application
- Kind: A1
- Application number: 14/137,432
- Filed: 2013-12-20
- Published: 2015-06-25
- Earliest claimed: 2013-12-20
- Assignees: Intel Corporation
- Inventors: Rajesh M. Sankaran; Neil M. Schaper; Joseph Nuzman; Larisa Novakovsky; Yen-Cheng Liu; Gilbert Neiger; Raj K. Ramanujan
- Web page: https://patentgrep.com/patent/US20150178202A1

## CPC

- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0815: Cache consistency protocols
- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/222: Non-volatile memory
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An apparatus and method are described for performing a cache line write back operation. For example, one embodiment of a method comprises: initiating a cache line write back operation directed to a particular linear address; determining if a dirty cache line identified by the linear address exists at any cache of a cache hierarchy comprised of a plurality of cache levels; writing back the dirty cache line to memory if the dirty cache line exists in one of the caches; and responsively maintaining or placing the dirty cache line in an exclusive state in at least a first cache of the hierarchy.

## Claims

### Claim 1

A method comprising:
initiating a cache line write back operation directed to a particular linear address;
determining if a dirty cache line identified by the linear address exists at any cache of a cache hierarchy comprised of a plurality of cache levels;
writing back the dirty cache line to memory if the dirty cache line exists in one of the caches; and
responsively maintaining or placing the dirty cache line in an exclusive state in at least a first cache of the hierarchy.

### Claim 2 (depends on 1)

The method as in claim 1 further comprising:
invalidating the cache line in at least a second cache of the cache hierarchy while maintaining or placing the dirty cache line in an exclusive state in the first cache.

### Claim 3 (depends on 1)

The method as in claim 1 wherein the cache hierarchy comprises a level 1 (L1) cache and a level 2 (L2) cache each associated with a core, and a lower level cache (LLC) shared by each of a plurality of the cores.

### Claim 4 (depends on 3)

The method as in claim 3 wherein the cache line is maintained or placed in the exclusive state within the LLC but is invalidated in the L1 and/or L2 caches.

### Claim 5 (depends on 1)

The method as in claim 1 wherein the cache hierarchy comprises a level 1 (L1) cache and a level 2 (L2) cache, wherein the cache line is maintained or placed in the exclusive state within the L1 or L2 cache.

### Claim 6 (depends on 1)

The method as in claim 1 wherein the memory comprises a persistent memory device or a volatile memory device, the method further comprising ensuring that the dirty cache line is successfully written to persistent storage.

### Claim 7 (depends on 6)

The method as in claim 6 wherein the write back operations cause one or more memory controllers to store the dirty cache line in the at least one persistent memory device, and wherein ensuring that the dirty cache line is successfully written to persistent storage further comprises:
sending a request message to the one or more memory controllers instructing the memory controllers to confirm that the write back operations are successfully committed to the at least one persistent memory device;
ensuring at the one or more memory controllers that at least all pending write back operations received at the time of the request message will be committed to the persistent memory device; and
sending a response message from the one or more memory controllers indicating that the store operations are successfully committed to the persistent memory device.

### Claim 8 (depends on 7)

The method as in claim 7 wherein the one or more memory controllers manage a two-level (2L) hierarchical memory arrangement in which a first level of volatile memory functions as a memory-side cache and a second-level memory includes a non-volatile memory, wherein the writing back of the dirty cache line is tracked to ensure that the data being written is forwarded to the second level of memory before sending the response message.

### Claim 9 (depends on 7)

The method as in claim 7 further comprising:
initially ensuring that the write back operations have been accepted to memory prior to ensuring that the write back operations have been committed to the persistent memory device.

### Claim 10 (depends on 6)

The method as in claim 6 further comprising:
executing a persistent commit instruction to cause the request message to be sent to the one or more memory controllers, the persistent commit instruction being retired only after receiving the response message.

### Claim 11 (depends on 10)

The method as in claim 10 wherein the persistent commit instruction and cache line write back operation are weakly ordered, the method further comprising:
issuing a fence operation to perform memory/store fencing associated with issuance of the persistent commit and cache line write back instructions.

### Claim 12 (depends on 11)

The method as in claim 11 wherein the fence operation ensures that the weakly-ordered instructions have retired and the request messages issued to the one or more memory controllers.

### Claim 13 (depends on 12)

The method as in claim 12 wherein the fence operation further guarantees that a response message has been received for each of the request messages issued to the various memory controllers, thereby confirming that the write back operations have become persistent.

### Claim 14

A processor comprising:
cache line write back logic to initiate a cache line write back operation directed to a particular linear address;
cache management logic to determine, responsive to the cache line write back operation, if a dirty cache line identified by the linear address exists at any cache of a cache hierarchy comprised of a plurality of cache levels;
the cache management logic to write back the dirty cache line to memory if the dirty cache line exists in one of the caches and to responsively maintain place the dirty cache line in an exclusive state in at least a first cache of the hierarchy responsive to the cache line write back operation.

### Claim 15 (depends on 14)

The processor as in claim 14 wherein the cache management logic is configured to invalidate the cache line in at least a second cache of the cache hierarchy while maintaining or placing the dirty cache line in an exclusive state in the first cache responsive to the cache line write back operation.

### Claim 16 (depends on 14)

The processor as in claim 14 wherein the cache hierarchy comprises a level 1 (L1) cache and a level 2 (L2) cache each associated with a core, and a lower level cache (LLC) shared by each of a plurality of the cores.

### Claim 17 (depends on 16)

The processor as in claim 16 wherein the cache line is maintained or placed in the exclusive state within the LLC but is invalidated in the L1 and/or L2 caches responsive to the cache line write back operation.

### Claim 18 (depends on 14)

The method as in claim 14 wherein the cache hierarchy comprises a level 1 (L1) cache and a level 2 (L2) cache, wherein the cache line is maintained or placed in the exclusive state within the L1 or L2 cache.

### Claim 19 (depends on 14)

The processor as in claim 14 wherein the memory comprises a persistent memory device, the processor further comprising power fail logic to ensure that the dirty cache line is successfully written to persistent storage.

### Claim 20 (depends on 17)

The processor as in claim 17 further comprising:
one or more memory controllers to ensure that the dirty cache line is stored in the at least one persistent memory device responsive to the cache line write back operation, wherein to ensure that the dirty cache line is successfully written to persistent storage, the memory controller is configured to send a request message to the one or more memory controllers instructing the memory controllers to confirm that the write back operations are successfully committed to the at least one persistent memory device; ensure at the one or more memory controllers that at least all pending write back operations received at the time of the request message will be committed to the persistent memory device; and send a response message from the one or more memory controllers indicating that the store operations are successfully committed to the persistent memory device.

### Claim 21 (depends on 20)

The processor as in claim 20 wherein the one or more memory controllers are to initially ensure that the cache line write back operations have been accepted to memory prior to ensuring that the write back operations have been committed to the persistent memory device.

### Claim 22 (depends on 20)

The processor as in claim 20 further comprising:
persistent commit logic to execute a persistent commit instruction to cause the request message to be sent to the one or more memory controllers, the persistent commit instruction to be retired only after receiving the response message.

### Claim 23 (depends on 22)

The processor as in claim 22 wherein the persistent commit instruction and cache line write back operation are weakly ordered, the processor further comprising:
instruction fence logic to issue a memory fence instruction to perform memory/store fencing associated with issuance of the persistent commit instruction and cache line write back operation.

### Claim 24 (depends on 23)

The processor as in claim 23 wherein the memory fence operation ensures that the weakly-ordered instructions have retired and the request messages issued to the one or more memory controllers.

### Claim 25 (depends on 24)

The processor as in claim 24 wherein the fence operation further guarantees that a response message has been received for each of the request messages issued to the various memory controllers, thereby confirming that the write back operations have become persistent.
