On Wed, Oct 20, 2021 at 11:09:58AM -0300, Jason Gunthorpe wrote: > On Wed, Oct 20, 2021 at 08:34:33AM +0200, Thomas Hellström wrote: > > > Follow up question: If we resurrect this in the proper way (and in that case > > only for x86_64) is there something we need to pay particular attention to > > WRT the ZONE_DEVICE refcounting fixing you mention above? > > Similar to PTE it should be completely separated from ZONE_DEVICE. > > Seeing the special bit set at any level should trigger all page table > walkers to never try to get a struct page. > > Today some of the page table walkers are trying to do this with > vma_is_special(), all of those should end up being the Pxx_SPECIAL > test instead. My understanding is that vma_is_special is for platforms which don't have pte_special, and hence can't do gup_fast. At least I was assuming this is why vma_is_special is a thing, and why some architectures cannot do gup_fast. I think for pmd and higher that approach isn't feasible and so we'll probably have to disable VM_PFNMAP hugepages if the arch doesn't support that. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch