RDMA Device Virtual Page Pinning Coordination

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional RDMA methods break memory abstraction, require inefficient pinning and unpinning of virtual memory, and lack coordination between RDMA adapters and operating systems, leading to memory management issues and security risks.

Innovation Solution

An RDMA device collaborates with the operating system to pin and unpin virtual pages on an as-needed basis, scheduling data transfers and limiting the number of pinned pages to optimize memory usage and prevent corruption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If user-space applications explicitly pin memory for RDMA transfers, then data transfer reliability is improved, but memory management complexity and overhead increase

Engineering Contradiction:
Improvedata transfer reliabilityVSAvoidmemory management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The kernel acts as an intermediary between user-space applications and the RDMA adapter. The kernel's RDMA driver automatically pins virtual pages on behalf of applications when RDMA transfers are initiated, eliminating the need for applications to manually manage pinning. This mediator approach maintains transfer reliability while reducing application-side memory management complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system enables self-service by allowing the kernel and RDMA driver to automatically handle page pinning and unpinning based on transfer requirements. The driver monitors RDMA queue pairs and associated virtual pages, automatically pinning pages when needed for transfers and unpinning them after completion, without requiring application intervention.

Inventive Principle:
Principle #25Self-service

2Productivity

If applications pin large amounts of memory for RDMA operations, then transfer capacity is improved, but available memory for other applications decreases

Engineering Contradiction:
Improvetransfer capacityVSAvoidavailable memory
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The system implements dynamic memory pinning where the amount of pinned memory adjusts automatically based on actual RDMA transfer needs. The kernel driver pins virtual pages on-demand when RDMA transfers are initiated and unpins them after transfers complete, rather than requiring applications to pre-pin large fixed amounts of memory. This dynamic approach maximizes transfer capacity while minimizing impact on available memory for other applications.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system performs preliminary pinning actions only when necessary - the kernel driver pins virtual pages in advance of actual data transfers and unpins them after transfers complete. This on-demand pinning approach ensures memory is available for transfers when needed while returning memory to the general pool when not in use, optimizing both transfer capacity and overall system memory availability.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If RDMA adapters perform asynchronous data transfers, then transfer efficiency is improved, but coordination with operating system memory management becomes difficult

Engineering Contradiction:
Improvetransfer efficiencyVSAvoidcoordination complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The kernel RDMA driver establishes feedback mechanisms to coordinate asynchronously with the RDMA adapter. The driver monitors the state of RDMA queue pairs and associated virtual pages, receiving notifications when transfers complete. This feedback loop enables the driver to automatically unpin pages after transfers, maintaining synchronization between the asynchronous hardware operations and the operating system's memory management without requiring complex coordination protocols.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9043498B2Automatic pinning and unpinning of virtual pages for remote direct memory access
Publication Date: 2015.05.26 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9043498B2 patent drawing
  • US9043498B2 patent drawing
  • US9043498B2 patent drawing

AI summary

In one exemplary embodiment, a computer-implemented method includes receiving, at a remote direct memory access (RDMA) device, a plurality of RDMA requests referencing a plurality of virtual pages. Data transfers are scheduled for the plurality of virtual pages, wherein the scheduling occurs at the RDMA device. The number of the virtual pages that are currently pinned is limited for the RDMA requests based on a predetermined pinned page limit.