On Thu, Oct 21, 2021 at 01:40:30PM +0200, Daniel Vetter wrote: > 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. AFAIK that is what vm_normal_page() is for as the rules for MIXED are complicated Once the semi-bogus usages in the PUD/PMD page table walkers are removed the only remaining users are in arch code around vdso, and I haven't tried to figure that out.. Jason