Re: [PATCH] mm: map maximum pages possible in finish_fault

From: Matthew Wilcox

Date: Tue Feb 10 2026 - 11:28:21 EST


On Tue, Feb 10, 2026 at 06:58:37PM +0530, Dev Jain wrote:
> On 06/02/26 8:52 pm, Matthew Wilcox wrote:
> > It's nice that you can construct a test-case that shows improvement, but
> > is there any real workload that benefits from this?
>
> I can try to measure this. But, I constructed that testcase to test the
> code path, not to show a perf boost (although the boost is obvious enough
> so why not show it). As I say in the description:
>
> "Align finish_fault with filemap_map_pages, and map as many pages as
> possible, without crossing VMA/PMD/file boundaries."
>
> The patch should rather be seen as an extension to 19773df031bc
> ("mm/fault: try to map the entire file folio in finish_fault()").
> The code which my patch removes, was added when the norm was to still
> perform per-page fault, the argument being, RSS inflation.
>
> Perhaps I can polish the patch description so that it clearly mentions
> what the objective is.

You say "removing code". Diffstat says "no real difference in amount of
code".

1 file changed, 38 insertions(+), 34 deletions(-)

You're messing with some complex code and you haven't said why it's
important for us to spend effort making sure you haven't made a mistake.
Please persuade us that this is worth doing.