Thread (17 messages) 17 messages, 4 authors, 2024-09-05

Re: [RFC net] net: make page pool stall netdev unregistration to avoid IOMMU crashes

From: Yunsheng Lin <hidden>
Date: 2024-08-07 11:00:38

On 2024/8/6 23:16, Jakub Kicinski wrote:
There appears to be no clean way to hold onto the IOMMU, so page pool
cannot outlast the driver which created it. We have no way to stall
the driver unregister, but we can use netdev unregistration as a proxy.

Note that page pool pages may last forever, we have seen it happen
e.g. when application leaks a socket and page is stuck in its rcv queue.
We saw some page_pool pages might last forever too, but were not sure
if it was the same reason as above? Are there some cmds/ways to debug
if a application leaks a socket and page is stuck in its rcv queue?
Hopefully this is fine in this particular case, as we will only stall
unregistering of devices which want the page pool to manage the DMA
mapping for them, i.e. HW backed netdevs. And obviously keeping
the netdev around is preferable to a crash.

More work is needed for weird drivers which share one pool among
multiple netdevs, as they are not allowed to set the pp->netdev
pointer. We probably need to add a bit that says "don't expose
to uAPI for them".
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help