The DMA Streaming Framework: Kernel-Level Buffer Orchestration for High-Performance AI Data Paths
Organizations: Graziano Labs Corp. Palo Alto, CA, USA
Abstract
AI transport libraries move bytes efficiently, but they commonly assume that buffers are already correctly allocated, placed, shared, registered, and safe under completion and teardown pressure. This paper presents dmaplane, a Linux kernel module that makes this missing layer explicit as buffer orchestration. dmaplane exposes a stable kernel UAPI via /dev/dmaplane and composes ring-based command channels, DMA buffer lifecycle management, dma-buf export for cross-device sharing, a kernel-space RDMA engine, NUMA-aware allocation and verification, credit-based flow control, low-overhead observability, and GPU memory integration via PCIe BAR pinning. We evaluate orchestration sensitivity with measurements of NUMA cross-node penalties at DRAM scale, completion-safe flow control under sustained RDMA load, and GPU BAR mapping tiers versus cudaMemcpy. We also demonstrate end-to-end disaggregated inference by transferring KV-cache chunks between two machines using RDMA WRITE WITH IMMEDIATE and reconstructing tensor views on the receiver. RDMA measurements use Soft-RoCE; we distinguish measured results from provider-independent properties by construction.
Figures & tables
| Capability | dmaplane | nvidia-peermem | NCCL | Mooncake | TransferEngine |
|---|---|---|---|---|---|
| Buffer allocation (coherent, page-backed) | Yes | No | internal | No | No |
| NUMA-aware placement | Yes | No | topology detection | mentioned | mentioned |
| dma-buf export or import | Yes | importer only | No | No | No |
| MR registration (kernel-space) | Yes | Yes (GPU BAR only) | internal | via libibverbs | via libibverbs |
| Credit-based flow control | Yes | No | per-channel credits | implicit in batching | per-connection |
| GPU BAR pinning and mapping | Yes | Yes | via CUDA | via CUDA | via CUDA |
| Phase | Time |
|---|---|
| Tokenization | 1.2 ms |
| Prefill forward pass | 45.3 ms |
| KV-cache consolidation | 0.8 ms |
| KV-cache transfer | 52.1 ms |
| KV-cache reconstruction | 0.003 ms |
| ————————— | ——– |
| Metric | Value |
|---|---|
| Sustained throughput (10 s, max_credits=64) | 1,037 MB/s average |
| Per-second window range | 1,047 to 1,087 MB/s |
| Window spread | 3.8% |
| CQ overflows | 0 |
| Credit stalls | 0 |
| Stress configuration (max_credits=4, high=3, low=1) |
| Buffer size | Node 0 to 0 | Node 0 to 1 | Node 1 to 0 | Node 1 to 1 | Cross-node penalty |
|---|---|---|---|---|---|
| 1 MB | 13,284 | 13,218 | 12,976 | 13,051 | < 1% (fits in cache) |
| 64 MB | 6,778 | 5,577 | 5,013 | 6,095 | 18% symmetric |
| Access method | Host to GPU (MB/s) | GPU to host (MB/s) | Section |
|---|---|---|---|
| UC BAR (ioremap) | 44 | 6 | Accompanying artifact |
| WC BAR (ioremap_wc, 4 MB) | 10,097 | 107 | Accompanying artifact |
| cudaMemcpy (16 MB) | 12,552 | 13,124 | Accompanying artifact |
| GPU RDMA loopback (rxe, 64 KB) | n/a | ~20 | Accompanying artifact |
| GPU RDMA cross-machine (1 Gigabit) | n/a | 11.6 | Accompanying artifact |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Subsystem | Test entry point | Pass condition |
|---|---|---|
| Device and ioctl dispatch | not specified | Module loads, /dev/dmaplane present, ioctls return expected codes. |
| Rings and workers | userspace stress harness | No kernel warnings, no lockdep issues, no data corruption, clean unload. |
| DMA buffers and mmap | not specified | Create buffer, mmap, write and verify, munmap, destroy succeeds. |
| dma-buf export | not specified | Export returns dma-buf fd, attach and detach paths do not leak, release callback fires. |
| RDMA setup and SEND and RECV | ioctl benchmarks | QP setup succeeds, SEND and RECV completes, CQs polled without errors. |
| MR registration | ioctl MR tests | MR registration returns lkey and rkey when requested, deregistration releases mappings. |