Re: [PATCH v2 06/33] mm/rmap: parameterise vma_interval_tree_*() by address_space

"Zi Yan" <[email protected]>
Newsgroups dev.linux.lists.damon,dev.linux.lists.iommu,dev.linux.lists.nvdimm,org.freedesktop.lists.dri-devel,org.kernel.vger.kvm,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-parisc,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-sgx,org.kernel.vger.linux-tegra,org.kernel.vger.linux-trace-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Fri Jul 10, 2026 at 4:16 PM EDT, Lorenzo Stoakes wrote:
> The file-backed mapping interval tree functions vma_interval_tree_*()
> accept a raw rb_root_cached pointer to determine the tree in which they are
> operating.
>
> However, in each case, this is always associated with an address_space data
> type.
>
> So simply pass a pointer to that instead to simplify the code, and more
> clearly differentiate between these operations and those concerning
> anonymous mappings.
>
> While we're here, make the generated interval tree functions static as they
> do not need to be used externally (any previously existing external users
> have now been removed).
>
> We also rename VMA parameters from 'node' to 'vma' as calling this a node
> is simply confusing, update the input index types to pgoff_t since they
> reference page offsets and rename the parameters to pgoff_start and
> pgoff_last.
>
> No functional change intended.
>
> Reviewed-by: Pedro Falcato <[email protected]>
> Reviewed-by: Gregory Price <[email protected]>
> Signed-off-by: Lorenzo Stoakes <[email protected]>
> ---
>  arch/arm/mm/fault-armv.c          |  2 +-
>  arch/arm/mm/flush.c               |  2 +-
>  arch/nios2/mm/cacheflush.c        |  2 +-
>  arch/parisc/kernel/cache.c        |  2 +-
>  fs/dax.c                          |  2 +-
>  fs/hugetlbfs/inode.c              | 15 +++++-----
>  include/linux/mm.h                | 34 ++++++++++++-----------
>  kernel/events/uprobes.c           |  2 +-
>  mm/hugetlb.c                      |  4 +--
>  mm/interval_tree.c                | 58 +++++++++++++++++++++++++++++----------
>  mm/khugepaged.c                   |  4 +--
>  mm/memory-failure.c               |  7 ++---
>  mm/memory.c                       |  8 +++---
>  mm/mmap.c                         |  3 +-
>  mm/nommu.c                        |  8 +++---
>  mm/pagewalk.c                     |  2 +-
>  mm/rmap.c                         |  3 +-
>  mm/vma.c                          | 14 ++++------
>  tools/testing/vma/include/stubs.h |  4 +--
>  19 files changed, 100 insertions(+), 76 deletions(-)
>

Thanks for the cleanup.

Reviewed-by: Zi Yan <[email protected]>

-- 
Best Regards,
Yan, Zi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.