Re: [RFC PATCH 1/1] mm/filemap: tighten mmap_miss hit accounting
From: fujunjie
Date: Mon Apr 27 2026 - 12:27:46 EST
On Mon, Apr 27, 2026 at 21:25, Jan Kara wrote:
> 1) These are two separate logical changes - handling of filemap_map_pages()
> and handling of FAULT_FLAG_TRIED. Please create two separate patches for
> them.
>
> 2) After changing the mmap_miss logic in filemap_map_pages() there's no
> need for the odd propagation of mmap_miss variable to
> filemap_map_order0_folio() and filemap_map_folio_range(). Now you are
> guaranteed to need to update mmap_miss at by at most 1. So I think you
> should just drop mmap_miss argument, check return value of
> filemap_map_order0_folio() / filemap_map_folio_range() in
> filemap_map_pages() and based on it just update file->f_ra.mmap_miss if
> appropriate. Much simpler.
Thanks a lot for the review.
Both points make sense to me. I'll send v2 shortly.
Best regards,
fujunjie