[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c60dfb5a-2bf3-20bd-74b3-6b5e215f73f8@iogearbox.net>
Date: Sat, 27 Jun 2020 01:00:19 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Björn Töpel <bjorn.topel@...il.com>,
netdev@...r.kernel.org
Cc: Björn Töpel <bjorn.topel@...el.com>,
hch@....de, davem@...emloft.net, konrad.wilk@...cle.com,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, maximmi@...lanox.com,
magnus.karlsson@...el.com, jonathan.lemon@...il.com
Subject: Re: [PATCH net] xsk: remove cheap_dma optimization
On 6/26/20 3:43 PM, Björn Töpel wrote:
> From: Björn Töpel <bjorn.topel@...el.com>
>
> When the AF_XDP buffer allocation API was introduced it had an
> optimization, "cheap_dma". The idea was that when the umem was DMA
> mapped, the pool also checked whether the mapping required a
> synchronization (CPU to device, and vice versa). If not, it would be
> marked as "cheap_dma" and the synchronization would be elided.
>
> In [1] Christoph points out that the optimization above breaks the DMA
> API abstraction, and should be removed. Further, Christoph points out
> that optimizations like this should be done within the DMA mapping
> core, and not elsewhere.
>
> Unfortunately this has implications for the packet rate
> performance. The AF_XDP rxdrop scenario shows a 9% decrease in packets
> per second.
>
> [1] https://lore.kernel.org/netdev/20200626074725.GA21790@lst.de/
>
> Cc: Christoph Hellwig <hch@....de>
> Fixes: 2b43470add8c ("xsk: Introduce AF_XDP buffer allocation API")
> Signed-off-by: Björn Töpel <bjorn.topel@...el.com>
Given there is roughly a ~5 weeks window at max where this removal could
still be applied in the worst case, could we come up with a fix / proposal
first that moves this into the DMA mapping core? If there is something that
can be agreed upon by all parties, then we could avoid re-adding the 9%
slowdown. :/
Thanks,
Daniel
Powered by blists - more mailing lists