Page MenuHomeFreeBSD

dpaa2: Allocate DMA tag per Rx buffer
Needs ReviewPublic

Authored by dsl on Sun, Sep 6, 8:56 AM.

Details

Reviewers
bz
dch
Summary

Previously each channel allocated its own set of buffers using the
channel's DMA tag which causes a DMA lock contention under load.
Even a single saturated 1 Gbps link caused ~50,000 adaptive
mutex spin events (as per lockstat) per second. With the proposed
approach there's no more contention on the channel's DMA mutex and the
adaptive mutex spin events dropped to ~6,000/s.

Stress test where iperf3 pushed as much traffic as possible to the 4
ports revealed that throughput drops from expected 940 Mbps down to
600-800 on each link with the "bounce pages lock" generating ~110,000
adaptive mutex spin events per second, but this is to be addressed
later on.

Test Plan
  1. kldload dtraceall
  2. Run iperf3 server
  3. Run iperf3 client on a remote computer and push as much traffic as possible for ~30s
  4. lockstat sleep 30 > ./lockstat_recv.txt

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped