From: Matthew Wilcox <willy@infradead.org>
To: fujunjie <fujunjie1@qq.com>
Cc: 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 v2 1/2] mm/filemap: count only the faulting address as a mmap hit
Date: Mon, 27 Apr 2026 19:40:19 +0100 [thread overview]
Message-ID: <ae-tkz6qe1zFmXVj@casper.infradead.org> (raw)
In-Reply-To: <tencent_949F3B157FE71D3C7247AE6FAE2C5AB82809@qq.com>
On Mon, Apr 27, 2026 at 04:57:50PM +0000, fujunjie wrote:
> - /*
> - * If there are too many folios that are recently evicted
> - * in a file, they will probably continue to be evicted.
> - * In such situation, read-ahead is only a waste of IO.
> - * Don't decrease mmap_miss in this scenario to make sure
> - * we can stop read-ahead.
> - */
I'm sad to lose this comment. Why not move it to ...
> + ret |= map_ret;
here?
> + if ((map_ret & VM_FAULT_NOPAGE) &&
> + !folio_test_workingset(folio)) {
> + unsigned short mmap_miss;
> +
> + mmap_miss = READ_ONCE(file->f_ra.mmap_miss);
> + if (mmap_miss)
> + WRITE_ONCE(file->f_ra.mmap_miss,
> + mmap_miss - 1);
> + }
next prev parent reply other threads:[~2026-04-27 18:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260427165751.746502-1-fujunjie1@qq.com>
2026-04-27 16:57 ` [PATCH v2 1/2] mm/filemap: count only the faulting address as a mmap hit fujunjie
2026-04-27 18:40 ` Matthew Wilcox [this message]
2026-04-28 1:12 ` Fujunjie
2026-04-27 16:57 ` [PATCH v2 2/2] mm/filemap: do not count FAULT_FLAG_TRIED retries as mmap hits fujunjie
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=ae-tkz6qe1zFmXVj@casper.infradead.org \
--to=willy@infradead.org \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox