# US 2018/0321853 A1 · Speculatively performing memory move requests with respect to a barrier

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

- Number: US 2018/0321853 A1
- Document ID: US20180321853A1
- Status: Published application
- Kind: A1
- Application number: 16/039,960
- Filed: 2018-07-19
- Published: 2018-11-08
- Earliest claimed: 2016-08-22
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: GUY L. GUTHRIE; DEREK E. WILLIAMS
- Web page: https://patentgrep.com/patent/US20180321853A1

## CPC

- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 3/061: {Improving I/O performance}
- G06F 3/065: {Replication mechanisms}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0673: {Single storage device}
- G06F 9/3004: {to perform operations on memory}
- G06F 9/30076: {to perform miscellaneous control operations, e.g. NOP}
- G06F 9/30087: {Synchronisation or serialisation instructions}
- G06F 9/3834: {Maintaining memory consistency}
- G06F 9/522: {Barrier synchronisation}
- G06F 12/063: {for I/O modules, e.g. memory mapped I/O (I/O protocol G06F13/42)}
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0897: with two or more cache hierarchy levels (with multilevel cache hierarchies G06F12/0811)
- G06F 13/4068: {Electrical coupling}
- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 13/16: for access to memory bus (G06F13/28 takes precedence)
- G06F 2212/1008: Correctness of operation, e.g. memory ordering
- G06F 2212/1016: Performance improvement
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A lower level cache receives, from a processor core, a plurality of copy-type requests and a plurality of paste-type requests that together indicate a memory move to be performed, as well as a barrier request that requests ordering of memory access requests prior to and after the barrier request. The barrier request precedes a copy-type request and a paste-type request of the memory move in program order. Prior to completion of processing of the barrier request, the lower level cache allocates first and second state machines to service the copy-type and paste-type requests. The first state machine speculatively reads a data granule identified by a source real address of the copy-type request into a non-architected buffer. After processing of the barrier request is complete, the second state machine writes the data granule from the non-architected buffer to a storage location identified by a destination real address of the paste-type request.

## Claims

### Claim 1

A method of data processing in a data processing system implementing a weak memory model, wherein the data processing system includes an interconnect fabric and a processor core having a store-through upper level cache and a store-in lower level cache, the method comprising:
the lower level cache receiving, from the processor core, a plurality of copy-type requests and a plurality of paste-type requests that together indicate a memory move to be performed;
the lower level cache receiving, from the processor core, a barrier request that requests enforcement of ordering of memory access requests prior to the barrier request with respect to memory access requests after the barrier request, wherein the barrier request precedes a copy-type request and a paste-type request of the memory move in program order;
prior to completion of processing of the barrier request by the lower level cache, the lower level cache speculatively reading a data granule identified by a source real address of the copy-type request into a non-architected buffer; and
after processing of the barrier request is complete, the lower level cache writing the data granule from the non-architected buffer to a storage location identified by a destination real address of the paste-type request.

### Claim 2 (depends on 1)

The method of claim 1, and further comprising:
in response to the lower level cache receiving a request that invalidates the data granule in the non-architected buffer, the lower level cache non-speculatively re-reading the data granule identified by the source real address of the copy-type request into the non-architected buffer.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
the writing comprises the lower level cache performing the writing if a first state machine allocated to service the copy-type request is not released prior to completion of processing of the barrier request;
the method further comprises:
in response to release of the first state machine prior to completion of processing of the barrier request, abandoning the data granule in the non-architected buffer.

### Claim 4 (depends on 3)

The method of claim 3, and further comprising:
the lower level cache releasing the first state machine in response to determining that too many state machines are allocated to servicing speculative memory access requests.

### Claim 5 (depends on 1)

The method of claim 1, and further comprising:
tracking a state of the memory move utilizing at least one speculative flag and at least one non-speculative flag; and
in response to completion of processing of the barrier request, updating a value of the at least one non-speculative flag with a value of the at least one speculative flag.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
receiving the barrier request includes receiving the barrier request in a store queue of the lower level cache;
receiving the plurality of copy-type requests and the plurality of paste-type requests includes receiving the plurality of copy-type requests and the plurality of paste-type requests in the store queue of the lower level cache;
the method further includes processing the barrier request by:
until the barrier request is removed from the store queue, preventing any later memory access request placed in the store queue from being issued from the store queue for non-speculative servicing; and
ensuring that servicing of a final paste-type request of the memory move is complete prior to removing the barrier request from the store queue.

### Claim 7

A processing unit for a data processing system implementing a weak memory model, wherein the data processing system includes an interconnect fabric, the processing unit comprising:
a processor core having a store-through upper level cache and a store-in lower level cache, wherein the lower level cache includes a plurality of state machines including a first state machine and a second state machine, and wherein the lower level cache is configured to perform:
receiving, from the processor core, a plurality of copy-type requests and a plurality of paste-type requests that together indicate a memory move to be performed;
receiving, from the processor core, a barrier request that requests enforcement of ordering of memory access requests prior to the barrier request with respect to memory access requests after the barrier request, wherein the barrier request precedes a copy-type request and a paste-type request of the memory move in program order;
prior to completion of processing of the barrier request by the lower level cache, speculatively reading a data granule identified by a source real address of the copy-type request into a non-architected buffer; and
after processing of the barrier request is complete, writing the data granule from the non-architected buffer to a storage location identified by a destination real address of the paste-type request.

### Claim 8 (depends on 7)

The processing unit of claim 7, wherein the lower level cache is configured to, in response to the lower level cache receiving a request that invalidates the data granule in the non-architected buffer, non-speculatively re-read the data granule identified by the source real address of the copy-type request into the non-architected buffer.

### Claim 9 (depends on 7)

The processing unit of claim 7, wherein:
the writing comprises the performing the writing if a first state machine allocated to service the copy-type request is not released prior to completion of processing of the barrier request; and
the lower level cache is further configured to, in response to release of the first state machine prior to completion of processing of the barrier request, abandon the data granule in the non-architected buffer.

### Claim 10 (depends on 9)

The processing unit of claim 9, wherein the lower level cache is further configured to release the first state machine in response to determining that too many state machines are allocated to servicing speculative memory access requests.

### Claim 11 (depends on 7)

The processing unit of claim 7, wherein:
the processing unit is configured to track a state of the memory move utilizing at least one speculative flag and at least one non-speculative flag; and
the processing unit is configured to, in response to completion of processing of the barrier request, update a value of the at least one non-speculative flag with a value of the at least one speculative flag.

### Claim 12 (depends on 7)

The processing unit of claim 7, wherein:
receiving the barrier request includes receiving the barrier request in a store queue of the lower level cache;
receiving the plurality of copy-type requests and the plurality of paste-type requests includes receiving the plurality of copy-type requests and the plurality of paste-type requests in the store queue of the lower level cache;
the lower level cache is further configured to process the barrier request by:
until the barrier request is removed from the store queue, preventing any later memory access request placed in the store queue from being issued from the store queue for non-speculative servicing; and
ensuring that servicing of a final paste-type request of the memory move is complete prior to removing the barrier request from the store queue.

### Claim 13 (depends on 7)

A data processing system, comprising:
the processing unit of claim 7;
a memory controller having a system memory coupled thereto; and
the interconnect fabric communicatively coupling the processing unit and the memory controller.

### Claim 14

A design structure tangibly embodied in a computer-readable storage device for designing, manufacturing, or testing an integrated circuit, the design structure comprising:
a processing unit for a data processing system implementing a weak memory model, wherein the data processing system includes an interconnect fabric, the processing unit comprising:
a processor core having a store-through upper level cache and a store-in lower level cache, wherein the lower level cache includes a plurality of state machines including a first state machine and a second state machine, and wherein the lower level cache is configured to perform:
receiving, from the processor core, a plurality of copy-type requests and a plurality of paste-type requests that together indicate a memory move to be performed;
receiving, from the processor core, a barrier request that requests enforcement of ordering of memory access requests prior to the barrier request with respect to memory access requests after the barrier request, wherein the barrier request precedes a copy-type request and a paste-type request of the memory move in program order;
prior to completion of processing of the barrier request by the lower level cache, speculatively reading a data granule identified by a source real address of the copy-type request into a non-architected buffer; and
after processing of the barrier request is complete, writing the data granule from the non-architected buffer to a storage location identified by a destination real address of the paste-type request.

### Claim 15 (depends on 14)

The design structure of claim 14, wherein the lower level cache is configured to, in response to the lower level cache receiving a request that invalidates the data granule in the non-architected buffer, non-speculatively re-read the data granule identified by the source real address of the copy-type request into the non-architected buffer.

### Claim 16 (depends on 14)

The design structure of claim 14, wherein:
the writing comprises the performing the writing if a first state machine allocated to service the copy-type request is not released prior to completion of processing of the barrier request; and
the lower level cache is further configured to, in response to release of the first state machine prior to completion of processing of the barrier request, abandon the data granule in the non-architected buffer.

### Claim 17 (depends on 16)

The design structure of claim 16, wherein the lower level cache is further configured to release the first state machine in response to determining that too many state machines are allocated to servicing speculative memory access requests.

### Claim 18 (depends on 14)

The design structure of claim 14, wherein:
the processing unit is configured to track a state of the memory move utilizing at least one speculative flag and at least one non-speculative flag; and
the processing unit is configured to, in response to completion of processing of the barrier request, update a value of the at least one non-speculative flag with a value of the at least one speculative flag.

### Claim 19 (depends on 14)

The design structure of claim 14, wherein:
receiving the barrier request includes receiving the barrier request in a store queue of the lower level cache;
receiving the plurality of copy-type requests and the plurality of paste-type requests includes receiving the plurality of copy-type requests and the plurality of paste-type requests in the store queue of the lower level cache;
the lower level cache is further configured to process the barrier request by:
until the barrier request is removed from the store queue, preventing any later memory access request placed in the store queue from being issued from the store queue for non-speculative servicing; and
ensuring that servicing of a final paste-type request of the memory move is complete prior to removing the barrier request from the store queue.
