Home / Learn / Chiplets and Memory / What Is a DMA Engine?

On this pageThe problem it solvesHow a transfer worksDescriptors and ringsScatter-gatherWhere DMA engines are foundMemory protectionZero-copyKernel bypass and remote DMAWhy it matters for AIDesign considerationsLimitsCommon questionsRelated guides

What Is a DMA Engine?

A DMA engine moves data between memory and devices without the processor copying it. DMA stands for direct memory access. The processor tells the engine where the data is, where it should go and how much there is. The engine then performs the transfer on its own and signals when it is finished. This frees the processor for other work and moves data much faster than software copying could. DMA is fundamental to networking, storage and AI systems.

The problem it solves

Without DMA, moving data between a device and memory would require the processor to read each piece from one place and write it to the other, one small unit at a time. This is sometimes called programmed input and output.

For a slow device, that is acceptable. For a network interface handling tens of gigabits per second, or a storage drive delivering gigabytes per second, it would consume the processor entirely. The processor would spend all its time shuffling data and none of it running programs.

DMA hands the job to dedicated hardware.

How a transfer works

  • Set-up. Software, usually a device driver, gives the engine the source address, the destination address, the length and any options.
  • Start. Software triggers the transfer.
  • Transfer. The engine reads from the source and writes to the destination directly, using the system’s memory bus. The processor is not involved in moving the data.
  • Completion. The engine signals that it has finished, typically with an interrupt or by updating a status that software checks.

The processor’s involvement is limited to setting up and acknowledging.

Descriptors and rings

Setting up each transfer individually would itself be slow at high data rates. Modern DMA engines work from lists.

A descriptor is a small record describing one buffer: its address, length and flags. Software prepares many descriptors in advance and places them in a circular list called a ring. The engine works through the ring continuously, filling or emptying buffers as data arrives or departs.

Software and hardware each keep a pointer into the ring. Software adds fresh buffers at one end. The engine consumes them at the other. The two can run at full speed with very little coordination.

Scatter-gather

Data that belongs together is not always in one continuous block of memory. A network packet might have its header in one place and its payload in another.

A scatter-gather DMA engine can take a list of separate buffers and treat them as one logical transfer. On output, it gathers the pieces. On input, it scatters incoming data across several buffers. This avoids having to copy everything into one contiguous region first.

Where DMA engines are found

LocationWhat it does
Network interfacesMoves packets between the wire and memory
Storage controllersMoves blocks between drives and memory
AcceleratorsMoves data between host memory and accelerator memory
Systems-on-chipMoves data between peripherals and memory, or between memory regions
DPUs and smart network cardsMoves data among network, storage, host and on-board processing
Video and audio hardwareStreams data continuously

Some are small engines serving a single low-speed peripheral. Others are high-performance engines with many independent channels, handling hundreds of gigabits per second.

Memory protection

A device that can write anywhere in memory is a risk. A fault or a malicious device could overwrite the operating system or read secrets.

Systems guard against this with an IOMMU, a unit that sits between devices and memory. It translates the addresses a device uses and blocks any access outside the regions that device has been granted. This is what allows a device to be safely assigned to a virtual machine: it can reach that machine’s memory and nothing else.

Zero-copy

In a conventional path, data is copied several times. A packet arrives in a buffer owned by the operating system, is copied to the application’s buffer, perhaps copied again by a library and then copied to a device.

Each copy consumes processor time, memory bandwidth and energy. At high data rates, copying becomes the dominant cost.

Zero-copy techniques arrange for the DMA engine to place data directly where it is finally needed. The application’s own buffer is given to the engine, and the data lands there with no intermediate step.

Kernel bypass and remote DMA

Kernel bypass. Applications can be given direct access to a device’s rings and buffers, without passing through the operating system for every packet. This removes a great deal of overhead for high-speed networking and storage.

Remote direct memory access. RDMA extends the idea across a network. A network adapter in one machine writes data directly into the memory of an application on another machine, with no processor involvement in the transfer at either end.

Peer-to-peer DMA. One device transfers data directly to another, for example from a storage drive or network card straight into an accelerator’s memory, without the data passing through host memory at all.

Why it matters for AI

AI systems move enormous volumes of data: datasets from storage, tensors between host and accelerator, and results between machines. How that movement is done has a large effect on performance.

  • Feeding accelerators. Data must reach accelerator memory as fast as the accelerator can consume it.
  • Avoiding the processor. Routing data through host memory and the CPU adds copies and delay. Direct paths from storage or network into accelerator memory remove them.
  • Distributed training. Accelerators in different servers exchange data through RDMA.
  • Model state. Moving cached state between memory tiers quickly depends on efficient transfer.

Much of the engineering aimed at relieving data movement bottlenecks in AI comes down to making DMA paths shorter and more direct.

Design considerations

For a chip designer including a DMA engine, the main questions are:

  • Throughput. How much data per second, and how many transfers in parallel.
  • Number of channels. Independent streams that can run at once.
  • Descriptor format and ring management.
  • Scatter-gather support.
  • Address width and translation. Compatibility with the system’s memory protection.
  • Bus interface. Which on-chip bus protocols it connects to.
  • Error handling. What happens on a bus error or an invalid descriptor.
  • Interrupt behavior. Batching notifications to avoid overwhelming the processor.
  • Virtualization. Support for presenting separate virtual functions to different guests.
  • Software. Drivers and their maturity.

DMA engines are commonly licensed as IP, often together with the interface controller they serve.

Limits

  • Set-up cost. For very small transfers, preparing descriptors can cost more than the transfer.
  • Memory pinning. Memory used for DMA must stay at a fixed physical location, which constrains the operating system.
  • Security. Incorrect configuration can expose memory. Protection through an IOMMU is essential.
  • Complexity. High-performance engines and their drivers are intricate and hard to debug.
  • Bus contention. DMA transfers share the memory system with the processor.

Common questions

What does DMA stand for?

Direct memory access. It refers to hardware transferring data to or from memory without the processor handling each piece.

Why is DMA faster than having the processor copy data?

Dedicated hardware moves data in large blocks directly over the memory bus, without executing instructions for each unit and without occupying the processor.

Is DMA the same as RDMA?

No. DMA moves data between a device and memory within one machine. RDMA applies the same principle across a network, letting one machine’s adapter write directly into another machine’s memory.

Related guides