# US 10,310,973 B2 · Efficient memory virtualization in multi-threaded processing units

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

- Number: US 10,310,973 B2
- Document ID: US10310973B2
- Status: Granted
- Kind: B2
- Application number: 13/660,815
- Filed: 2012-10-25
- Published: 2014-05-01
- Granted: 2019-06-04
- Earliest claimed: 2012-10-25
- Assignees: NVIDIA Corporation
- Applicants: NVIDIA Corporation
- Inventors: Nick Barrow-Williams; Brian Fahs; Jerome F. Duluk, Jr.; James Leroy Deming; Timothy John Purcell; Lucien Dunning; Mark Hairgrove
- Web page: https://patentgrep.com/patent/US10310973B2

## CPC

- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- 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/684: TLB miss handling
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A technique for simultaneously executing multiple tasks, each having an independent virtual address space, involves assigning an address space identifier (ASID) to each task and constructing each virtual memory access request to include both a virtual address and the ASID. During virtual to physical address translation, the ASID selects a corresponding page table, which includes virtual to physical address mappings for the ASID and associated task. Entries for a translation look-aside buffer (TLB) include both the virtual address and ASID to complete each mapping to a physical address. Deep scheduling of tasks sharing a virtual address space may be implemented to improve cache affinity for both TLB and data caches.

## Claims

### Claim 1

A method for mapping a virtual address associated with a first virtual address space included in a set of different virtual address spaces to a physical address, the method comprising:
receiving a memory access request transmitted by a first thread program,
wherein the memory access request, when transmitted by the first thread program, includes both a virtual address and an address space identifier (ASID) associated with the first virtual address space;
determining that no entry included in a first translation look aside buffer (TLB) included in a plurality of TLBs matches both the ASID and the virtual address included in the memory access request, resulting in a TLB miss;
in response to the TLB miss, mapping the virtual address included in the memory access request to a physical address by;
mapping the ASID to a physical address reference that points to a page table residing in memory; and
mapping the virtual address to the physical address via the page table; and
associating the physical address with the memory access request, wherein the first TLB is associated with a first streaming multiprocessor included in a plurality of streaming multiprocessors.

### Claim 2 (depends on 1)

The method of claim 1, wherein mapping the virtual address included in the memory access request comprises:
transmitting the virtual address-to-physical address mapping to the first TLB.

### Claim 3 (depends on 1)

The method of claim 1, wherein mapping the ASID to a physical address reference that points to a page table residing in memory comprises performing a table look-up in an ASID table, wherein the ASID comprises an index into the ASID table, and wherein an indexed entry in the ASID table stores a physical address indicating where a corresponding page table is stored.

### Claim 4 (depends on 1)

The method of claim 1, wherein mapping the virtual address to the physical address comprises walking the page table.

### Claim 5 (depends on 1)

The method of claim 1, wherein the ASID is associated with a first execution context, and a different ASID is associated with a second execution context, and wherein the first TLB is configured to cache virtual address-to-physical address mappings for both the first execution context and the second execution context.

### Claim 6 (depends on 1)

The method of claim 1, wherein determining that no entry included in a first translation look aside buffer (TLB) included in a plurality of TLBs matches both the ASID and the virtual address included in the memory access request comprises performing an associative lookup within the first TLB.

### Claim 7 (depends on 6)

The method of claim 6, wherein the first TLB is configured to store a plurality of entries, wherein each entry comprises a tag and a corresponding physical address, and wherein the associative lookup comprises comparing both the ASID and the virtual address included in the memory access request to each tag within the plurality of entries.

### Claim 8

A parallel processor configured to map virtual addresses associated with a first virtual address space included in a set of different virtual address spaces to a physical address, the parallel processor comprising:
a memory management unit that:
receives a memory access request transmitted by a first thread program, wherein the memory access request, when transmitted by the first thread program, includes both a virtual address and an address space identifier (ASID) associated with the first virtual address space;
determines that no entry included in a first translation look aside buffer (TLB) included in a plurality of TLBs matches both the ASID and the virtual address included in the memory access request, resulting in a TLB miss;
in response to the TLB miss, maps the virtual address included in the memory access request to a physical address by:
mapping the ASID to a physical address reference that points to a page table residing in memory; and
mapping the virtual address to the physical address via the page table; and
associates the physical address with the memory access request,
wherein the first TLB is associated with a first streaming multiprocessor included in a plurality of streaming multiprocessors.

### Claim 9 (depends on 8)

The parallel processor of claim 8, wherein mapping the virtual address included in the memory access request comprises:
transmitting the virtual address-to-physical address mapping to the first TLB.

### Claim 10 (depends on 8)

The parallel processor of claim 8, wherein mapping the ASID to a physical address reference that points to a page table residing in memory comprises performing a table look-up in an ASID table, wherein the ASID comprises an index into the ASID table, and wherein an indexed entry in the ASID table stores a physical address indicating where a corresponding page table is stored.

### Claim 11 (depends on 8)

The parallel processor of claim 8, wherein mapping the virtual address to the physical address comprises walking the page table.

### Claim 12 (depends on 8)

The parallel processor of claim 8, wherein the ASID is associated with a first execution context, and a different ASID is associated with a second execution context, and wherein the first TLB is configured to cache virtual address-to-physical address mappings for both the first execution context and the second execution context.

### Claim 13 (depends on 8)

The parallel processor of claim 8, wherein determining that no entry included in a first translation look aside buffer (TLB) included in a plurality of TLBs matches both the ASID and the virtual address included in the memory access request comprises performing an associative lookup within the first TLB.

### Claim 14 (depends on 13)

The parallel processor of claim 13, wherein the first TLB is configured to store a plurality of entries, wherein each entry comprises a tag and a corresponding physical address, and wherein the associative lookup comprises comparing both the ASID and the virtual address included in the memory access request to each tag within the plurality of entries.

### Claim 15

A computing device, comprising:
a central processing unit configured to execute a process having a first processing context; and
a parallel processor couple to the central processing unit and including a memory management unit that:
receives a memory access request transmitted by a first thread program,
wherein the memory access request, when transmitted by the first thread program, includes both a virtual address and an address space identifier (ASID) associated with the first virtual address space;
determined that no entry included in a first translation look aside buffer (TLB) included in a plurality of TLBs matches both the ASID and the virtual address included in the memory access request, resulting in a TLB miss;
in response to the TLB miss, maps the virtual address included in the memory access request to a physical address by:
mapping the ASID to a physical address reference that points to a page table residing in memory; and
mapping the virtual address to the physical address via the page table; and
associates the physical address with the memory access request,
wherein the first TLB is associated with a first streaming multiprocessor included in a plurality of streaming multiprocessors.

### Claim 16 (depends on 15)

The computing device of claim 15, wherein to map the virtual address included in the memory access request to the physical address, the memory management unit:
transmits the virtual address-to-physical address mapping to the first TLB.

### Claim 17 (depends on 15)

The computing device of claim 15, wherein the first TLB is configured to store a plurality of entries, wherein each entry comprises a tag and a corresponding physical address, and wherein an associative lookup comprises comparing both the ASID and the virtual address included in the memory access request to each tag within the plurality of entries.

### Claim 18 (depends on 17)

The computing device of claim 17, wherein the ASID is associated with the first execution context and a different ASID is associated with a second execution context, and wherein the first TLB is configured to cache virtual address to physical address mappings for the first execution context and the second execution context.
