RE: [PATCH 0/15] mm: introduce ANON_VMA_LAZY for deferred anon_vma creation

wangtao posted 15 patches 5 days, 2 hours ago
Only 0 patches received!
There is a newer version of this series
RE: [PATCH 0/15] mm: introduce ANON_VMA_LAZY for deferred anon_vma creation
Posted by wangtao 5 days, 2 hours ago
> During rmap we can compute the folio address using root_vma:
> 
> vma_address(vma, pgoff, 1) =
>     vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT)
>   = vma_mapping_base(vma) + pgoff * PAGE_SIZE
>   = vma_mapping_base(root_vma) + folio_pgoff * PAGE_SIZE
> 
It is inconsistent here. The offset should remain pgoff throughout. It should be:

vma_address(vma, pgoff, 1) =
vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT)
= vma_mapping_base(vma) + pgoff * PAGE_SIZE
= vma_mapping_base(root_vma) + pgoff * PAGE_SIZE