# US 2017/0286300 A1 · Apparatus and method for low-overhead synchronous page table updates

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

- Number: US 2017/0286300 A1
- Document ID: US20170286300A1
- Status: Published application
- Kind: A1
- Application number: 15/088,985
- Filed: 2016-04-01
- Published: 2017-10-05
- Earliest claimed: 2016-04-01
- Assignees: Intel Corporation
- Inventors: KSHITIJ A. DOSHI; CHRISTOPHER J. HUGHES
- Web page: https://patentgrep.com/patent/US20170286300A1

## CPC

- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/1027: using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
- G06F 2212/621: Coherency control relating to peripheral accessing, e.g. from DMA or I/O device
- G06F 2212/65: Details of virtual memory and virtual address translation
- G06F 2212/68: Details of translation look-aside buffer [TLB]
- G06F 2212/682: Multiprocessor TLB consistency
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An apparatus and method are described for low overhead synchronous page table updates. For example, one embodiment of a processor comprises: a set of one or more cores to execute instructions and process data; a translation lookaside buffer (TLB) comprising a plurality of entries to cache virtual-to-physical address translations usable by the set of one or more cores when executing the instructions; locking circuitry to allow a thread to lock a first page table entry (PTE) in the TLB to ensure that only one thread can modify the first PTE at a time, wherein the TLB is to modify the first PTE upon the thread acquiring the lock; a PTE invalidation circuit to execute a PTE invalidate instruction on a first core to invalidate the first PTE in other TLBs of other cores, the PTE invalidation circuit, responsive to execution of the PTE invalidate instruction, to responsively determine a number of other TLBs of other cores which need to be notified of the PTE invalidation, transmit PTE invalidate messages to the other TLBs, and wait for responses; and the locking circuitry to release the lock on the first PTE responsive to receiving responses from all of the other TLBs.

## Claims

### Claim 1

A processor comprising:
a plurality of cores to execute instructions and process data;
one or more translation lookaside buffers (TLBs) comprising a plurality of entries to cache virtual-to-physical address translations usable by at least one of the plurality of cores when executing the instructions; and
a page table entry (PTE) invalidation circuit to execute a PTE invalidate instruction on a first core to invalidate a first PTE in TLBs of other cores, the PTE invalidation circuit, responsive to execution of the PTE invalidate instruction, to responsively determine a number of other TLBs of other cores which need to be notified of the PTE invalidation, transmit PTE invalidate messages to the other TLBs, and wait for responses.

### Claim 2 (depends on 1)

The processor as in claim 1 further comprising:
locking circuitry to allow a thread to lock the first PTE in the first TLB to ensure that only one thread can modify the first PTE at a time, wherein the first TLB is to modify the first PTE upon the thread acquiring the lock; and
the locking circuitry to release the lock on the first PTE responsive to receiving responses from all of the other TLBs.

### Claim 3 (depends on 2)

The processor as in claim 2 wherein the locking circuitry is to implement a mutex operation to acquire the lock on the first PTE.

### Claim 4 (depends on 2)

The processor as in claim 2 wherein each TLB comprises PTE invalidate request handling circuitry to receive invalidation requests transmitted from other TLBs, the invalidate request handling circuitry to responsively cause the TLBs to invalidate one or more PTEs identified in the invalidation requests and transmit a response indicating the invalidation.

### Claim 5 (depends on 4)

The processor as in claim 4 further comprising:
an invalidation PTE state machine circuit to be programmed with a count value initially set to the number of other TLBs which need to be notified, the invalidation PTE state machine circuit to decrement the count value upon receiving each response from each of the other TLBs, the locking circuitry to release the lock when the count value has been decremented to a threshold value.

### Claim 6 (depends on 5)

The processor as in claim 5 wherein a mask value is to be used to uniquely identify each of the other TLBs to be notified.

### Claim 7 (depends on 1)

The processor as in claim 1 further comprising:
fence instruction logic of each of the other cores to insert a fence operation in an instruction stream to cause any instructions in a pipeline of the other cores to wait until the fence operation is retired before accessing the TLBs of each of the other cores.

### Claim 8 (depends on 7)

The processor as in claim 7 wherein the responses are to be sent from the TLBs of the other cores only after the fence operation has retired.

### Claim 9

A method comprising:
caching a plurality of virtual-to-physical address translations in a translation lookaside buffer (TLB) usable by the set of one or more cores when executing the instructions;
locking a first page table entry (PTE) in the TLB to ensure that only one thread can modify the first PTE at a time, wherein the TLB is to modify the first PTE upon acquiring the lock;
executing a PTE invalidate instruction on a first core to invalidate the first PTE in other TLBs of other cores, the PTE invalidation circuit, responsive to execution of the PTE invalidate instruction, to responsively determine a number of other TLBs of other cores which need to be notified of the PTE invalidation, transmit PTE invalidate messages to the other TLBs, and wait for responses; and
releasing the lock on the first PTE responsive to receiving responses from all of the other TLBs.

### Claim 10 (depends on 9)

The method as in claim 9 wherein the locking circuitry is to implement a mutex operation to acquire the lock on the first PTE.

### Claim 11 (depends on 9)

The method as in claim 9 wherein each TLB comprises PTE invalidate request handling circuitry to receive invalidation requests transmitted from other TLBs, the invalidate request handling circuitry to responsively cause the TLBs to invalidate one or more PTEs identified in the invalidation requests and transmit a response indicating the invalidation.

### Claim 12 (depends on 11)

The method as in claim 11 further comprising:
an invalidation PTE state machine circuit to be programmed with a count value initially set to the number of other TLBs which need to be notified, the invalidation PTE state machine circuit to decrement the count value upon receiving each response from each of the other TLBs, the locking circuitry to release the lock when the count value has been decremented to a threshold value.

### Claim 13 (depends on 12)

The method as in claim 12 wherein a mask value is to be used to uniquely identify each of the other TLBs to be notified.

### Claim 14 (depends on 9)

The method as in claim 9 further comprising:
fence instruction logic of each of the other cores to insert a fence operation in an instruction stream to cause any instructions in a pipeline of the other cores to wait until the fence operation is retired before accessing the TLBs of each of the other cores.

### Claim 15 (depends on 14)

The method as in claim 14 wherein the responses are to be sent from the TLBs of the other cores only after the fence operation has retired.

### Claim 16

A system comprising:
a memory to store instructions and data;
a processor to execute the instructions and process the data;
a graphics processor to perform graphics operations in response to graphics instructions;
a network interface to receive and transmit data over a network;
an interface for receiving user input from a mouse or cursor control device, the plurality of cores executing the instructions and processing the data responsive to the user input;
the processor comprising:
a plurality of cores to execute instructions and process data;
a translation lookaside buffer (TLB) comprising a plurality of entries to cache virtual-to-physical address translations usable by at least one of the plurality of cores when executing the instructions;
locking circuitry to allow a thread to lock a first page table entry (PTE) in the TLB to ensure that only one thread can modify the first PTE at a time, wherein the TLB is to modify the first PTE upon the thread acquiring the lock;
a PTE invalidation circuit to execute a PTE invalidate instruction on a first core to invalidate the first PTE in other TLBs of other cores, the PTE invalidation circuit, responsive to execution of the PTE invalidate instruction, to responsively determine a number of other TLBs of other cores which need to be notified of the PTE invalidation, transmit PTE invalidate messages to the other TLBs, and wait for responses; and
the locking circuitry to release the lock on the first PTE responsive to receiving responses from all of the other TLBs.

### Claim 17 (depends on 16)

The system as in claim 16 wherein the locking circuitry is to implement a mutex operation to acquire the lock on the first PTE.

### Claim 18 (depends on 16)

The system as in claim 16 wherein each TLB comprises PTE invalidate request handling circuitry to receive invalidation requests transmitted from other TLBs, the invalidate request handling circuitry to responsively cause the TLBs to invalidate one or more PTEs identified in the invalidation requests and transmit a response indicating the invalidation.

### Claim 19 (depends on 18)

The system as in claim 18 further comprising:
an invalidation PTE state machine circuit to be programmed with a count value initially set to the number of other TLBs which need to be notified, the invalidation PTE state machine circuit to decrement the count value upon receiving each response from each of the other TLBs, the locking circuitry to release the lock when the count value has been decremented to a threshold value.

### Claim 20 (depends on 19)

The system as in claim 19 wherein a mask value is to be used to uniquely identify each of the other TLBs to be notified.

### Claim 21 (depends on 16)

The system as in claim 16 further comprising:
fence instruction logic of each of the other cores to insert a fence operation in an instruction stream to cause any instructions in a pipeline of the other cores to wait until the fence operation is retired before accessing the TLBs of each of the other cores.

### Claim 22 (depends on 21)

The system as in claim 21 wherein the responses are to be sent from the TLBs of the other cores only after the fence operation has retired.
