Skip to main content
QUICK REVIEW

[Paper Review] Memory Sharing with CXL: Hardware and Software Design Approaches

Sunita Jain, Nagaradhesh Yeleswarapu|arXiv (Cornell University)|Apr 4, 2024
Parallel Computing and Optimization TechniquesComputer Science3 citations
TL;DR

This paper presents hardware and software co-design approaches for enabling efficient memory sharing over CXL 2.0 and CXL 3.0, leveraging hardware coherency via Back Invalidation (BI) in CXL 3.0 and hybrid software-hardware mechanisms for scalable, low-overhead shared memory access across multiple hosts. The key contribution is a practical framework for rack-scale memory pooling with performance and security guarantees using dual-headed CXL devices and FPGA-based hardware atomics.

ABSTRACT

Compute Express Link (CXL) is a rapidly emerging coherent interconnect standard that provides opportunities for memory pooling and sharing. Memory sharing is a well-established software feature that improves memory utilization by avoiding unnecessary data movement. In this paper, we discuss multiple approaches to enable memory sharing with different generations of CXL protocol (i.e., CXL 2.0 and CXL 3.0) considering the challenges with each of the architectures from the device hardware and software viewpoint.

Motivation & Objective

  • Address the challenge of inefficient memory utilization in tightly coupled server architectures by enabling memory pooling and sharing across CXL-enabled devices.
  • Overcome the limitations of CXL 2.0, which lacks hardware coherency support for memory sharing, by proposing software-based coherency mechanisms.
  • Design a hardware-assisted shared memory system using CXL 3.0’s Back Invalidation (BI) and FPGA-based atomics for low-latency, scalable access across multiple hosts.
  • Minimize performance overhead in large-scale shared memory systems by introducing a hybrid approach that combines precise snoop filtering for critical regions with software coherency for the remainder.
  • Ensure security in multi-host memory sharing by proposing memory zeroization and isolation mechanisms to prevent data leakage between applications.

Proposed method

  • Propose a hybrid memory sharing model using precise snoop filters for critical memory regions (e.g., for atomics, semaphores) and software-managed coherency for non-critical regions to reduce hardware complexity.
  • Implement a dual-headed CXL Type-3 device architecture with two CXL ports connecting to separate hosts, enabling peer-to-peer communication and shared memory access.
  • Design an FPGA-based hardware prototype with dedicated MMIO regions for hardware atomics (e.g., Test & Set, Compare & Swap) to enforce exclusive write access and maintain cache coherency.
  • Integrate address remapping logic per CXL controller to map host physical addresses to device HDM (Host-Managed Device Memory) addresses, enabling consistent virtual-to-physical translation.
  • Use a device driver abstraction layer to manage metadata (virtual-to-physical mappings, access permissions, granularity) and mediate between applications and hardware atomics.
  • Employ a lock-based access control mechanism where write requests are ordered and serialized via hardware atomics, with flags set and cleared to signal access availability.
Figure 1. Memory sharing with CXL 3.0 (Type-3 HDM-DB/FAM)
Figure 1. Memory sharing with CXL 3.0 (Type-3 HDM-DB/FAM)

Experimental results

Research questions

  • RQ1How can memory sharing be efficiently enabled in CXL 2.0 systems that lack native hardware coherency support?
  • RQ2What is the optimal trade-off between hardware precision and performance overhead in snoop filtering for large-scale shared memory regions?
  • RQ3How can hardware-assisted atomics and Back Invalidation (BI) in CXL 3.0 be leveraged to reduce software coherency burden while maintaining low-latency access?
  • RQ4What are the performance and security implications of sharing large memory regions across multiple hosts in a rack-scale CXL fabric?
  • RQ5How can secure memory reassignment be achieved in multi-host shared memory systems to prevent data leakage from terminated applications?

Key findings

  • CXL 2.0 requires software-only coherency for memory sharing, which introduces high overhead and complexity, especially in large-scale deployments.
  • CXL 3.0’s Back Invalidation (BI) support enables hardware-managed coherency for HDM (Host-Managed Device Memory), significantly reducing software burden and improving scalability.
  • A hybrid snoop filter approach—using precise tracking for critical regions (e.g., 64B cache lines) and coarse-grained (e.g., 4KB) filtering for non-critical regions—reduces metadata overhead while minimizing unnecessary BI snoops.
  • The FPGA-based hardware prototype with dual-headed CXL devices enables low-latency, ordered write access via hardware atomics (Test & Set, Compare & Swap), ensuring data consistency with minimal CPU intervention.
  • Memory zeroization and isolation mechanisms are essential to prevent data leakage when reassigning shared memory regions to new applications, especially in multi-tenant environments.
  • The proposed system achieves near-DRAM access latency (50–100 ns) for remote CXL-Memory, making it suitable for use as a slow-tier in datacenter memory hierarchies.
Figure 2. Dual-headed topology for memory sharing
Figure 2. Dual-headed topology for memory sharing

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.