Re: [PATCH net-next 06/11] net: page_pool: avoid calling no-op externals when possible

From: Alexander Lobakin
Date: Thu May 18 2023 - 09:27:28 EST


From: Christoph Hellwig <hch@xxxxxx>
Date: Wed, 17 May 2023 10:14:58 +0200

> So while this looks ok, Eric Dumazet had looked into some optimization
> for this touching the core code, and promised me to come up with an
> even better version a while ago. Eric, what's the state of your
> optimizations for no-op DMA syncs?
>

Hmm, his last proposals were for avoiding indirect calls when IOMMU is
on, but in fact we don't need to synchronize stuff -- DMA IOMMU on
x86_64 also usually doesn't synchronize anything, but you don't know
that prior to doing an indirect call and dma_need_sync() won't help.
I was thinking of adding .dma_need_sync() callback to DMA ops, which
could also be called once only on page allocation, like in this patch.

Also want to hear how it goes for Eric :)

Thanks,
Olek