Scatter/Gather Prefetching via Shadow Page Table TLB Lookup

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing prefetching techniques for scatter/gather operations in computer systems perform numerous unnecessary translation-lookaside buffer (TLB) lookups, interfering with other memory accesses and increasing latency due to unpredictable access patterns.

Innovation Solution

A processor mechanism that issues a single scatter/gather prefetch instruction, performing a single TLB lookup to convert a virtual base address to a physical base address, and then adds offsets to prefetch cache lines, eliminating redundant TLB lookups by assuming most target memory locations fall within the same physical page.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional prefetching techniques are used for scatter/gather operations, then prefetching can improve memory access performance, but numerous unnecessary TLB lookups are performed that interfere with other memory accesses and increase latency

Engineering Contradiction:
Improveprefetching efficiencyVSAvoidTLB lookup latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent extracts the TLB lookup operation from the prefetching process by using a shadow page table that maintains virtual-to-physical address mappings independently of the main TLB. This allows prefetch operations to access the shadow page table directly without performing full TLB lookups, thereby removing the time-consuming TLB access step while preserving the necessary address translation functionality.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The shadow page table acts as an intermediary structure between the virtual address space and the physical address translation mechanism. It provides a simplified view of page mappings that enables prefetch operations to obtain physical addresses without going through the complete TLB lookup process, thus mediating between the need for address translation and the desire to minimize TLB access latency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If traditional prefetching techniques are used for scatter/gather operations, then prefetching can be performed, but many TLB lookups are unnecessary because target operands tend to be located on the same virtual memory page

Engineering Contradiction:
Improveprefetching throughputVSAvoidTLB access overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts only the essential page-level address translation information needed for prefetching by maintaining a shadow page table that tracks virtual-to-physical page mappings. This extracted information is sufficient for computing prefetch addresses when targets are on the same page, eliminating the need for repeated full TLB lookups and reducing access overhead while maintaining prefetching throughput.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The shadow page table maintains a simplified and partial view of the complete address translation hierarchy, focusing only on the page-level mappings necessary for scatter/gather prefetch operations. This partial information structure is sufficient for the specific prefetching use case and avoids the complexity of maintaining complete TLB state, thereby reducing overhead while preserving essential functionality.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If numerous TLB lookups are performed for scatter/gather prefetch operations, then virtual addresses can be translated to physical addresses, but other non-prefetch-related accesses to the TLB are interfered with

Engineering Contradiction:
Improveaddress translation accuracyVSAvoidoverall memory access throughput
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent segments the address translation functionality into two independent components: the shadow page table for prefetch operations and the main TLB for regular memory accesses. This segmentation allows prefetch operations to use the shadow page table without competing for TLB resources, ensuring address translation accuracy for prefetches while preventing interference with the throughput of non-prefetch memory accesses.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The shadow page table serves as a dedicated intermediary structure that handles address translation for prefetch operations separately from the main TLB. This intermediary mechanism ensures accurate virtual-to-physical address translation for scatter/gather operations while isolating prefetch traffic from the main memory access path, thereby maintaining both translation precision and overall system throughput.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9817762B2Facilitating efficient prefetching for scatter/gather operations
Publication Date: 2017.11.14 ORACLE INT CORP
  • US9817762B2 patent drawing
  • US9817762B2 patent drawing
  • US9817762B2 patent drawing

AI summary

The disclosed embodiments relate to a computing system that facilitates performing prefetching for scatter/gather operations. During operation, the system receives a scatter/gather prefetch instruction at a processor core, wherein the scatter/gather prefetch instruction specifies a virtual base address, and a plurality of offsets. Next, the system performs a lookup in a translation-lookaside buffer (TLB) using the virtual base address to obtain a physical base address that identifies a physical page for the base address. The system then sends the physical base address and the plurality of offsets to a cache. This enables the cache to perform prefetching operations for the scatter/gather instruction by adding the physical base address to the plurality of offsets to produce a plurality of physical addresses, and then prefetching cache lines for the plurality of physical addresses into the cache.