# US 2014/0208040 A1 · Creating a Program Product or System for Executing an Instruction for Pre-Fetching Data and Releasing Cache Lines

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

- Number: US 2014/0208040 A1
- Document ID: US20140208040A1
- Status: Published application
- Kind: A1
- Application number: 14/221,869
- Filed: 2014-03-21
- Published: 2014-07-24
- Earliest claimed: 2012-01-06
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Dan F. Greiner; Timothy J. Slegel
- Web page: https://patentgrep.com/patent/US20140208040A1

## CPC

- G06F 12/0862: with prefetch
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 9/383: {Operand prefetching (cache prefetching G06F12/0862)}
- G06F 9/3832: {Value prediction for operands; operand history buffers}
- G06F 2212/6028: Prefetching based on hints or prefetch instructions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and Program Products are created to execute a prefetch data machine instruction having an M field performs a function on a cache line of data specifying an address of an operand. The operation comprises either prefetching a cache line of data from memory to a cache or reducing the access ownership of store and fetch or fetch only of the cache line in the cache or a combination thereof. The address of the operand is either based on a register value or the program counter value pointing to the prefetch data machine instruction.

## Claims

### Claim 1

A method for creating a computer program product for executing a prefetch data machine instruction, the method comprising:
obtaining instructions, by a processor, for executing the prefetch data machine instruction; and
storing the obtained instructions, by a processor, on a computer program product storage medium readable by a processing circuit, the stored instructions configured to cause the processing circuit to perform a method comprising:
executing, by the processor, the prefetch data machine instruction, the prefetch data machine instruction configured to either prefetch data to the cache or change access ownership of a cache line in the cache, the executing comprising:
determining whether to perform a data prefetch cache action or a cache line ownership operation, the data prefetch cache action for prefetching a cache line of data from memory to the cache, the cache line ownership operation for changing cache access ownership of a line of data in the cache;
determining an address of an operand in memory; and
based on determining to perform the cache line ownership operation, performing a determined cache action on a cache line in the cache, the cache line associated with the determined address of the operand, the cache action comprising:
based on the determined cache action being a release store access ownership action, changing access ownership of the cache line to a fetch access ownership, the store access ownership indicating that the processor intends to store to the cache line, the fetch access ownership indicating that the processor intends to fetch data from the cache line; and
based on the determined cache action being a release fetch access ownership action, releasing access ownership, the released access ownership indicating that the processor does not intend to access to the cache line.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the store access ownership indicates the cache line is not available to other processors, and wherein the fetch access ownership indicates the cache line may be shared by other processors.

### Claim 3 (depends on 1)

The method according to claim 1, the executing further comprising:
based on the determined cache action being a modified access ownership action, changing access ownership of the cache line to indicate the cache line has been modified; and
based on the determined cache action being an owned access ownership action, changing access ownership of the cache line to indicate the cache line is owned.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the prefetch data machine instruction further comprises an option field and operand information, wherein the function of the prefetch data machine instruction further comprises:
interpreting the option field to determine whether to perform the data prefetch cache action or the cache line ownership operation;
determining from said operand information, the address of the operand; and
based on the determined cache action being a data prefetch action, prefetching said operand into said cache line of said cache.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the cache action comprises:
based on the option field being a first value, performing no cache action;
based on the option field being a second value, prefetching to the cache, data specified by the operand address for fetch access ownership wherein the cache line access ownership is set as fetch access ownership; and
based on the option field being a third value, prefetching to the cache, data specified by the operand address for store access ownership wherein the cache line access ownership is set as store access ownership.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the cache action comprises:
based on the option field being a fourth value and store access ownership being available, prefetching to the cache, data specified by the operand address for store access ownership wherein the cache line access ownership is set as store access ownership; and
based on the option field being the fourth value and store access ownership being not-available, prefetching to the cache, data specified by the operand address for store access ownership wherein the cache line access ownership is set as fetch access ownership.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the prefetch data machine instruction further comprises a signed immediate field, wherein the address of the operand in memory is related to a memory address of the prefetch instruction being executed, comprising adding a halfword aligned sign extended value of the signed immediate field of the instruction to a program address of the prefetch data instruction being executed to determine the address of the operand in memory.

### Claim 8 (depends on 1)

The method according to claim 1, wherein access ownership is MOESI protocol, wherein said cache line is resident in a cache of a processor executing the instruction, said cache action comprising any one of:
changing cache ownership from modified to any one of owned, exclusive, shared or invalid,
changing cache ownership from owned to any one of modified, exclusive, shared or invalid,
changing cache ownership from exclusive to any one of modified, owned, shared or invalid, or
changing cache ownership from shared to any one of modified, owned, exclusive or invalid.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising interpreting the prefetch data machine instruction to identify a predetermined software routine for emulating operation of the prefetch data machine instruction; and
wherein the executing the prefetch data machine instruction comprises executing the predetermined software routine to execute the prefetch data machine instruction.

### Claim 10

A method for creating a computer system for executing a prefetch data machine instruction, the method comprising:
obtaining configuration information, by a processor, for executing the prefetch data machine instruction; and
based on the obtained configuration information, configuring the computer system to perform a method comprising:
executing, by the processor, the prefetch data machine instruction, the prefetch data machine instruction configured to either prefetch data to the cache or change access ownership of a cache line in the cache, the executing comprising:
determining whether to perform a data prefetch cache action or a cache line ownership operation, the data prefetch cache action for prefetching a cache line of data from memory to the cache, the cache line ownership operation for changing cache access ownership of a line of data in the cache:
determining an address of an operand in memory; and
based on determining to perform the cache line ownership operation, performing a determined cache action on a cache line in the cache, the cache line associated with the determined address of the operand, the cache action comprising:
based on the determined cache action being a release store access ownership action, changing access ownership of the cache line to a fetch access ownership, the store access ownership indicating that the processor intends to store to the cache line, the fetch access ownership indicating that the processor intends to fetch data from the cache line; and
based on the determined cache action being a release fetch access ownership action, releasing access ownership, the released access ownership indicating that the processor does not intend to access to the cache line.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the store access ownership indicates the cache line is not available to other processors, and wherein the fetch access ownership indicates the cache line may be shared by other processors.

### Claim 12 (depends on 10)

The method according to claim 10, the executing further comprising:
based on the determined cache action being a modified access ownership action, changing access ownership of the cache line to indicate the cache line has been modified; and
based on the determined cache action being an owned access ownership action, changing access ownership of the cache line to indicate the cache line is owned.

### Claim 13 (depends on 11)

The method according to claim 11, wherein the prefetch data machine instruction further comprises an option field and operand information, wherein the function of the prefetch data machine instruction further comprises:
interpreting the option field to determine whether to perform the data prefetch cache action or the cache line ownership operation;
determining from said operand information, the address of the operand; and
based on the determined cache action being a data prefetch action, prefetching said operand into said cache line of said cache.

### Claim 14 (depends on 13)

The method according to claim 13, wherein the cache action comprises:
based on the option field being a first value, performing no cache action;
based on the option field being a second value, prefetching to the cache, data specified by the operand address for fetch access ownership wherein the cache line access ownership is set as fetch access ownership; and
based on the option field being a third value, prefetching to the cache, data specified by the operand address for store access ownership wherein the cache line access ownership is set as store access ownership.

### Claim 15 (depends on 13)

The method according to claim 13, wherein the cache action comprises:
based on the option field being a fourth value and store access ownership being available, prefetching to the cache, data specified by the operand address for store access ownership wherein the cache line access ownership is set as store access ownership; and
based on the option field being the fourth value and store access ownership being not-available, prefetching to the cache, data specified by the operand address for store access ownership wherein the cache line access ownership is set as fetch access ownership.

### Claim 16 (depends on 10)

The method according to claim 10, wherein the prefetch data machine instruction further comprises a signed immediate field, wherein the address of the operand in memory is related to a memory address of the prefetch instruction being executed, comprising adding a halfword aligned sign extended value of the signed immediate field of the instruction to a program address of the prefetch data instruction being executed to determine the address of the operand in memory.

### Claim 17 (depends on 10)

The method according to claim 10, wherein access ownership is MOESI protocol, wherein said cache line is resident in a cache of a processor executing the instruction, said cache action comprising any one of:
changing cache ownership from modified to any one of owned, exclusive, shared or invalid,
changing cache ownership from owned to any one of modified, exclusive, shared or invalid,
changing cache ownership from exclusive to any one of modified, owned, shared or invalid, or
changing cache ownership from shared to any one of modified, owned, exclusive or invalid.

### Claim 18 (depends on 10)

The method according to claim 10, further comprising interpreting the prefetch data machine instruction to identify a predetermined software routine for emulating operation of the prefetch data machine instruction; and
wherein the executing the prefetch data machine instruction comprises executing the predetermined software routine to execute the prefetch data machine instruction.
