# US 2003/0084259 A1 · MFENCE and LFENCE micro-architectural implementation method and system

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

- Number: US 2003/0084259 A1
- Document ID: US20030084259A1
- Status: Published application
- Kind: A1
- Application number: 10/194,531
- Filed: 2002-07-12
- Published: 2003-05-01
- Earliest claimed: 1999-12-30
- Assignees: Intel Corporation
- Inventors: Salvador Palanca; Stephen A. Fischer; Subramaniam Maiyuran; Shekoufeh Qawami
- Web page: https://patentgrep.com/patent/US20030084259A1

## CPC

- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 9/30087: {Synchronisation or serialisation instructions}
- G06F 9/3012: {Organisation of register space, e.g. banked or distributed register file}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/3808: {for instruction reuse, e.g. trace cache, branch target cache}
- G06F 9/3812: {with instruction modification, e.g. store into instruction stream}
- G06F 9/3834: {Maintaining memory consistency}
- G06F 9/3854: {Instruction completion, e.g. retiring, committing or graduating}
- G06F 9/3856: {Reordering of instructions, e.g. using queues or age tags}
- G06F 9/3858: {Result writeback, i.e. updating the architectural state or memory}
- G06F 9/3867: {using instruction pipelines}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2009/45591: {Monitoring or debugging support}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for fencing memory accesses. Memory loads can be fenced, or all memory access can be fenced. The system receives a fencing instruction that separates memory access instructions into older accesses and newer accesses. A buffer within the memory ordering unit is allocated to the instruction. The access instructions newer than the fencing instruction are stalled. The older access instructions are gradually retired. When all older memory accesses are retired, the fencing instruction is dispatched from the buffer.

## Claims

### Claim 1

A process comprising:
receiving a load fencing instruction that separates memory load instructions into older loads and newer loads;
allocating a load buffer in a memory ordering unit to the load fencing instruction;
stalling dispatches of newer loads from a memory subsystem;
retiring older loads from the memory subsystem;
dispatching the load fencing instruction from the load buffer to a cache controller when all older loads from the memory subsystem are retired.

### Claim 2 (depends on 1)

The process of claim 1 wherein the cache controller is the closest cache controller to a processor.

### Claim 3 (depends on 2)

The process of claim 2 further comprising:
retiring the load fencing instruction from the cache controller.

### Claim 4 (depends on 3)

The process of claim 3 wherein the retirement of all older loads from the memory subsystem is via the cache controller.

### Claim 5 (depends on 3)

The process of claim 3 wherein the retirement of all older loads from the memory subsystem-is via the memory ordering unit.

### Claim 6 (depends on 5)

The process of claim 5 wherein the retirement of all older loads from the memory subsystem is indicated when a reorder buffer retirement pointer and a load buffer tail pointer point to the load buffer.

### Claim 7

A computer architecture comprising:
a computer readable memory;
a cache controller;
a memory ordering unit with at least one load buffer wherein the memory unit receives a load fencing instruction that separates memory load instructions that access the computer readable memory into older memory loads and newer memory loads, allocates the load buffer the load fencing instruction, stalls dispatches of newer memory loads, and dispatches the load fencing instruction from the load buffer to a cache controller when all older memory loads are retired.

### Claim 8 (depends on 7)

The architecture of claim 7 wherein the cache controller is the closest cache controller to a processor.

### Claim 9 (depends on 8)

The architecture of claim 8 wherein the cache controller retires the load fencing instruction.

### Claim 10 (depends on 9)

The architecture of claim 9 wherein the cache controller retires of all older memory loads.

### Claim 11 (depends on 9)

The architecture of claim 9 wherein the memory ordering unit retires of all older memory loads.

### Claim 12 (depends on 11)

The architecture of claim 11 wherein the retirement of all older memory loads is indicated when a reorder buffer retirement pointer and a load buffer tail pointer point to the load buffer.

### Claim 13

Computer executable program code, stored on a computer readable medium, for operating a computer system by functionally configuring it to have a computer readable memory, a cache controller, a memory ordering unit with at least one load buffer, comprising program code means for:
receiving a load fencing instruction that separates memory load instructions into older loads and newer loads;
allocating a load buffer in a memory ordering unit to the load fencing instruction;
stalling dispatches of newer loads from a memory subsystem;
retiring older loads from the memory subsystem;
dispatching the load fencing instruction from the load buffer to a cache controller when all older loads from the memory subsystem are retired;
retiring the load fencing instruction.

### Claim 14

A process comprising:
receiving a memory fencing instruction that separates memory access instructions into older access instructions and newer access instructions;
allocating a store buffer in a memory ordering unit to the memory fencing instruction;
stalling dispatches of newer access instructions;
retiring older access instructions;
dispatching the memory fencing instruction to a cache controller when all older access instructions are retired;
retiring the memory fencing instruction from the cache controller.

### Claim 15

A process comprising:
receiving a memory fencing instruction that decodes into a load fencing micro-operation and a memory-fencing micro-operation;
separating load instructions into older memory loads and newer memory loads;
separating memory access instructions into older access instructions and newer access instructions;
allocating a load buffer in a memory ordering unit to the load fencing micro-operation;
stalling dispatches of newer memory loads;
retiring older memory loads from the memory ordering unit;
dispatching the load fencing micro-operation from the load buffer to a cache controller when all older loads are retired;
allocating a store buffer in a memory ordering unit to the memory fencing micro-operation;
stalling dispatches of newer access instructions;
retiring older access instructions;
dispatching the memory fencing instruction to the cache controller when all older access instructions are retired;
retiring the memory fencing instruction from the cache controller.

### Claim 16

A computer architecture comprising:
a computer readable memory;
a cache controller;
a memory ordering unit with at least one store buffer wherein the memory unit receives a memory fencing instruction that separates memory access instructions into older access instructions and newer access instructions, allocates a store buffer in a memory ordering unit to the memory fencing instruction, stalls dispatches of newer access instructions, retires older access instructions, dispatches the memory fencing instruction to the cache controller when all older access instructions, retires the memory fencing instruction from the cache controller.

### Claim 17

A computer architecture comprising:
a computer readable memory;
a cache controller;
a memory ordering unit with at least one store buffer wherein the memory unit receives a memory fencing instruction that decodes into a load fencing micro-operation and a memory-fencing micro-operation, separates load instructions into older memory loads and newer memory loads, separates memory access instructions into older access instructions and newer access instructions, allocates a load buffer in a memory ordering unit to the load fencing micro-operation, allocates a store buffer in a memory ordering unit to the memory fencing instruction, stalls dispatches of newer memory loads, retires older memory loads from the memory ordering unit, dispatches the load fencing micro-operation from the load buffer to a cache controller when all older loads are retired, stalls dispatches of newer access instructions, retires older access instructions, dispatches the memory fencing instruction to the cache controller when all older access instructions are retired, retires the memory fencing instruction from the cache controller.

### Claim 18

Computer executable program code, stored on a computer readable medium, for operating a computer system by functionally configuring it to have a computer readable memory, a cache controller, a memory ordering unit with at least one load buffer, comprising program code means for:
receiving a memory fencing instruction that separates memory access instructions into older access instructions and newer access instructions;
allocating a store buffer in a memory ordering unit to the memory fencing instruction;
stalling dispatches of newer access instructions;
retiring older access instructions;
dispatching the memory fencing instruction to a cache controller when all older access instructions are retired;
retiring the memory fencing instruction from the cache controller.

### Claim 19

Computer executable program code, stored on a computer readable medium, for operating a computer system by functionally configuring it to have a computer readable memory, a cache controller, a memory ordering unit with at least one load buffer, comprising program code means for:
receiving a memory fencing instruction that decodes into a load fencing micro-operation and a memory-fencing micro-operation;
separating load instructions into older memory loads and newer memory loads;
separating memory access instructions into older access instructions and newer access instructions;
allocating a load buffer in a memory ordering unit to the load fencing micro-operation;
stalling dispatches of newer memory loads;
retiring older memory loads from the memory ordering unit;
dispatching the load fencing micro-operation from the load buffer to a cache controller when all older loads are retired;
allocating a store buffer in a memory ordering unit to the memory fencing micro-operation;
stalling dispatches of newer access instructions;
retiring older access instructions;
dispatching the memory fencing instruction to the cache controller when all older access instructions are retired;
retiring the memory fencing instruction from the cache controller.
