Re: [PATCH net] xsk: remove cheap_dma optimization

2020-07-01 Thread Björn Töpel
On 2020-06-29 17:41, Robin Murphy wrote: On 2020-06-28 18:16, Björn Töpel wrote: [...]> Somewhat related to the DMA API; It would have performance benefits for AF_XDP if the DMA range of the mapped memory was linear, i.e. by IOMMU utilization. I've started hacking a thing a little

Re: [PATCH net] xsk: remove cheap_dma optimization

2020-06-29 Thread Björn Töpel
On 2020-06-29 17:18, Daniel Borkmann wrote: Nice, tossed from bpf tree then! (Looks like it didn't land on the bpf list yet, but seems other mails are currently stuck as well on vger. I presume it will be routed to Linus via Christoph?) Thanks! Christoph (according to the other mail) was

Re: [PATCH net] xsk: remove cheap_dma optimization

2020-06-29 Thread Björn Töpel
On 2020-06-29 15:52, Daniel Borkmann wrote: Ok, fair enough, please work with DMA folks to get this properly integrated and restored then. Applied, thanks! Daniel, you were too quick! Please revert this one; Christoph just submitted a 4-patch-series that addresses both the DMA API, and the

Re: add an API to check if a streamming mapping needs sync calls

2020-06-29 Thread Björn Töpel
, and there are (obviously) no performance regressions. Would the patches go through the net/bpf trees or somewhere else? For the series: Tested-by: Björn Töpel Acked-by: Björn Töpel Björn Diffstat: Documentation/core-api/dma-api.rst |8 + include/linux/dma-direct.h |1

Re: [PATCH net] xsk: remove cheap_dma optimization

2020-06-28 Thread Björn Töpel
On 2020-06-27 09:04, Christoph Hellwig wrote: On Sat, Jun 27, 2020 at 01:00:19AM +0200, Daniel Borkmann wrote: 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

[PATCH net] xsk: remove cheap_dma optimization

2020-06-26 Thread Björn Töpel
From: Björn Töpel 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

Re: the XSK buffer pool needs be to reverted

2020-06-26 Thread Björn Töpel
On 2020-06-26 14:41, Christoph Hellwig wrote: On Fri, Jun 26, 2020 at 02:22:41PM +0200, Björn Töpel wrote: [...] Understood. Wdyt about something in the lines of the diff below? It's build tested only, but removes all non-dma API usage ("poking internals"). Would that be a w

Re: the XSK buffer pool needs be to reverted

2020-06-26 Thread Björn Töpel
On 2020-06-26 09:47, Christoph Hellwig wrote: Hi Björn, you addition of the xsk_buff_pool.c APIs in commit 2b43470add8c ("xsk: Introduce AF_XDP buffer allocation API") is unfortunately rather broken by making lots of assumptions and poking into dma-direct and swiotlb internals that are of no