Thread (41 messages) 41 messages, 9 authors, 3d ago

Re: [RFC: DMA_PMD 19/22] net/mlx5e: Use DMA_PMD memory for tx header bounce buffers

flat view

From: Luigi Rizzo <hidden>
Date: 2026-10-14 18:28:43
Also in: driver-core, linux-doc, linux-iommu, linux-mm, lkml

On Wed, Oct 14, 2026 at 7:51 PM Dragos Tatulea [off-list ref] wrote:
quoted
On 03.10.26 23:22, Luigi Rizzo wrote:
quoted
Why are only headers considered for bouncing? Because they have the
highest mapping overhead?
I meant to say headers and small packets.
Headers have a high cost for the map/unmap (especially in strict iommu mode),
and also cause significant IOTLB thrashing, because they come from skb_head
that is not pre-mapped. The impact of IOTLB thrashing depends on
the hardware and load but they consume one IOTLB entry per packet with
almost non-existent recycling.

In the following version I have modified the slub and skb allocator to
feed skb head from DMA_PMD memory, which removes the need
for header bounce buffers. It is a compromise (the skb head includes
skb_shinfo, which we may not always want to expose to the device),
but gives an option to those who want it, and in that case drivers
that use pagepool can get all the benefits of DMA_PMD with zero
modifications.
quoted
Note that TSO/GSO packets will copy the header inline in the WQE
already. But not for small packets.
Yes additional bounce buffers are not needed on hardware that are
essentially using the WQE as a bounce buffer. I'll double check the patch
(mechanically generated).

Small packets should not be too problematic, as long as they come from
fragments allocated during the copy_from_user.

cheers
luigi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help