From: Vishal Moola <vishal.moola@gmail.com>
To: fujunjie <fujunjie1@qq.com>
Cc: Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Roman Gushchin <roman.gushchin@linux.dev>,
Haoran Zhu <zhr1502@sjtu.edu.cn>
Subject: Re: [PATCH v3 1/2] mm/filemap: count only the faulting address as a mmap hit
Date: Sun, 10 May 2026 13:45:32 +0100 [thread overview]
Message-ID: <agB97DSWxaS-z093@fedora> (raw)
In-Reply-To: <tencent_756F151FE66F3D80479A6F982C0AB8569F09@qq.com>
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>
next prev parent reply other threads:[~2026-05-10 12:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 1:57 [PATCH v3 0/2] mm/filemap: tighten mmap_miss hit accounting fujunjie
2026-04-28 1:59 ` [PATCH v3 1/2] mm/filemap: count only the faulting address as a mmap hit fujunjie
2026-04-28 9:47 ` Jan Kara
2026-05-10 12:45 ` Vishal Moola [this message]
2026-04-28 1:59 ` [PATCH v3 2/2] mm/filemap: do not count FAULT_FLAG_TRIED retries as mmap hits fujunjie
2026-04-28 9:48 ` Jan Kara
2026-05-10 12:46 ` Vishal Moola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agB97DSWxaS-z093@fedora \
--to=vishal.moola@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fujunjie1@qq.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=roman.gushchin@linux.dev \
--cc=willy@infradead.org \
--cc=zhr1502@sjtu.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.