Thread (15 messages) 15 messages, 5 authors, 2024-09-24

Re: [PATCH net 2/2] page_pool: fix IOMMU crash when driver has already unbound

From: Jesper Dangaard Brouer <hawk@kernel.org>
Date: 2024-09-19 09:42:50
Also in: bpf, imx, intel-wired-lan, linux-arm-kernel, linux-iommu, linux-mediatek, linux-mm, linux-rdma, linux-wireless, lkml

On 18/09/2024 19.06, Ilias Apalodimas wrote:
quoted
In order not to do the dma unmmapping after driver has already
unbound and stall the unloading of the networking driver, add
the pool->items array to record all the pages including the ones
which are handed over to network stack, so the page_pool can
do the dma unmmapping for those pages when page_pool_destroy()
is called.
So, I was thinking of a very similar idea. But what do you mean by
"all"? The pages that are still in caches (slow or fast) of the pool
will be unmapped during page_pool_destroy().
I really dislike this idea of having to keep track of all outstanding pages.

I liked Jakub's idea of keeping the netdev around for longer.

This is all related to destroying the struct device that have points to
the DMA engine, right?

Why don't we add an API that allow netdev to "give" struct device to
page_pool.  And then the page_poll will take over when we can safely
free the stuct device?

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