* Re: [PATCH v3 1/2] mm/filemap: count only the faulting address as a mmap hit [not found] ` <tencent_756F151FE66F3D80479A6F982C0AB8569F09@qq.com> @ 2026-05-10 12:45 ` Vishal Moola 0 siblings, 0 replies; 2+ messages in thread From: Vishal Moola @ 2026-05-10 12:45 UTC (permalink / raw) To: fujunjie Cc: Matthew Wilcox, Jan Kara, Andrew Morton, linux-fsdevel, linux-mm, linux-kernel, Roman Gushchin, Haoran Zhu On Tue, Apr 28, 2026 at 01:59:43AM +0000, fujunjie wrote: > filemap_map_pages() reduces file->f_ra.mmap_miss when fault-around maps > folios that are already present in the page cache. That hit accounting > is too generous because fault-around can install PTEs around the > faulting address even though the fault only proves that the faulting > address was accessed. > > Move the mmap_miss update back into filemap_map_pages(), drop the > mmap_miss argument from the helper functions, and decrement mmap_miss > only when the helper return value shows that the faulting address was > mapped. Keep the existing workingset-folio behavior unchanged. > > Signed-off-by: fujunjie <fujunjie1@qq.com> > --- Reviewed-by: Vishal Moola <vishal.moola@gmail.com> ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <tencent_22E6B8849EC1141FE7773C64467E6F1E2C09@qq.com>]
* Re: [PATCH v3 2/2] mm/filemap: do not count FAULT_FLAG_TRIED retries as mmap hits [not found] ` <tencent_22E6B8849EC1141FE7773C64467E6F1E2C09@qq.com> @ 2026-05-10 12:46 ` Vishal Moola 0 siblings, 0 replies; 2+ messages in thread From: Vishal Moola @ 2026-05-10 12:46 UTC (permalink / raw) To: fujunjie Cc: Matthew Wilcox, Jan Kara, Andrew Morton, linux-fsdevel, linux-mm, linux-kernel, Roman Gushchin, Haoran Zhu On Tue, Apr 28, 2026 at 01:59:44AM +0000, fujunjie wrote: > A fault that starts synchronous mmap readahead can return VM_FAULT_RETRY > after dropping mmap_lock. The retry may then map the folio brought in > by that same miss. > > Do not let this retry decrement mmap_miss. The retry still maps the > folio from the page cache; it just does not count as a useful mmap > readahead hit. > > Signed-off-by: fujunjie <fujunjie1@qq.com> > --- Reviewed-by: Vishal Moola <vishal.moola@gmail.com> ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-10 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <tencent_AA501E9A238337BD167E5C2ACF948A1AF308@qq.com>
[not found] ` <tencent_756F151FE66F3D80479A6F982C0AB8569F09@qq.com>
2026-05-10 12:45 ` [PATCH v3 1/2] mm/filemap: count only the faulting address as a mmap hit Vishal Moola
[not found] ` <tencent_22E6B8849EC1141FE7773C64467E6F1E2C09@qq.com>
2026-05-10 12:46 ` [PATCH v3 2/2] mm/filemap: do not count FAULT_FLAG_TRIED retries as mmap hits Vishal Moola
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox