Thread (85 messages) 85 messages, 9 authors, 2024-11-05

Re: [PATCH v2 29/33] iommu: Use put_pages_list

From: Robin Murphy <robin.murphy@arm.com>
Date: 2021-12-01 19:46:22
Also in: linux-iommu, linux-patches

On 2021-12-01 19:07, Matthew Wilcox wrote:
On Wed, Dec 01, 2021 at 07:15:06PM +0100, Vlastimil Babka wrote:
quoted
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

page->freelist is for the use of slab.  We already have the ability
to free a list of pages in the core mm, but it requires the use of a
list_head and for the pages to be chained together through page->lru.
Switch the iommu code over to using put_pages_list().
FYI, this is going to have conflicts with
https://lore.kernel.org/lkml/cover.1637671820.git.robin.murphy@arm.com/ (local)

I'm not sure what the appropriate resolution is going to be here;
maybe hold back part of this patch series to the following merge
window to give the iommu people time to merge their own patches?
More than that, this version is subtly but catastrophically broken - we 
can't simply pass &gather->freelist through the current IOVA entry_dtor 
machinery, since gather is a stack variable from a few call frames up so 
the actual list head will be long gone by the time 
iommu_dma_entry_dtor() tries to dereference it. It took until I was 
elbow-deep in refactoring the RFC to notice that one :)

Thanks,
Robin.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help