Introduction
In traditional embedded systems, hardware accelerators typically operate in a separate physical memory space from the host CPU. This necessitates manual data copying between "host" and "device" memory, a process that is error-prone and inefficient. Shared Virtual Addressing (SVA) addresses this by allowing the CPU and accelerators to share virtual address pointers, facilitated by an IOMMU (Input-Output Memory Management Unit). However, SVA introduces a "translation tax" due to page table walks. This paper evaluates this overhead in RISC-V systems and demonstrates that a shared last-level cache (LLC) can effectively eliminate this penalty.
System Architecture and Methodology
The researchers developed a complete heterogeneous RISC-V SoC emulated on an FPGA. The hardware stack, illustrated in Figure 1, comprises the Cheshire SoC (a 64-bit CVA6 host) and the Snitch Cluster (an 8-core floating-point optimized accelerator).
The system integrates an open-source implementation of the RISC-V IOMMU v1.0 specification. To simulate realistic DRAM latencies (200 to 1000 cycles) on an FPGA, a programmable AXI delayer was employed. The software stack includes a patched Linux 6.9 kernel and an OpenMP-offloading runtime. Three configurations were evaluated: a physical addressing baseline, IOMMU-enabled SVA with DRAM-based translation, and IOMMU-enabled SVA with a shared LLC.
Performance Evaluation
The authors used a subset of the RajaPERF benchmark suite, including linear kernels like axpy, gesummv, and gemm, as well as non-linear kernels like mergesort.
The "Zero-Copy" Advantage
For smaller problem sizes, mapping memory for SVA is significantly faster than explicit data copying. In vector addition tests (axpy), zero-copy offloading achieved a 47% speedup over traditional copying, as it avoids the overhead of physical data movement.
The Impact of Translation Latency
Without caching, the IOMMU becomes a severe bottleneck. For memory-intensive kernels, the translation overhead can reach up to 81.3% at high DRAM latencies, as the DMA engine stalls during page table walks. This "latency wall" is particularly evident in kernels with high memory pressure.
Mitigation via Shared LLC
The study demonstrates that a shared LLC effectively serves as a translation accelerator. Since the host CPU typically populates page tables shortly before offloading, these entries are often resident in the LLC. By fetching page table entries from the LLC instead of DRAM, translation time is reduced by up to 15x.
As shown in Figure 5 for the gesummv kernel, adding the shared LLC reduces the IOMMU overhead from significant levels (up to 85.6%) down to negligible values (around 1.3%). Similar results were observed for gemm, where overhead dropped from 17.6% to just 0.7%.
Conclusion
While IOMMU-based SVA simplifies programming for heterogeneous SoCs, it can introduce substantial performance penalties in high-latency memory systems. However, integrating a shared LLC between the IOMMU and the memory controller effectively eliminates this "translation tax," enabling efficient zero-copy data sharing with minimal overhead. Future work will explore larger IOTLB configurations and scaling to multi-cluster systems.
Summary updated