From: Andrew Morton <akpm@linux-foundation.org>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: linux-kernel@vger.kernel.org,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Jan Kara <jack@suse.cz>, Dev Jain <dev.jain@arm.com>,
linux-mm@kvack.org
Subject: Re: [PATCH v3] mm: readahead: make thp readahead conditional to mmap_miss logic
Date: Tue, 7 Oct 2025 15:34:24 -0700 [thread overview]
Message-ID: <20251007153424.1b46a4018e17d5dafd7fb126@linux-foundation.org> (raw)
In-Reply-To: <20251006175106.377411-1-roman.gushchin@linux.dev>
On Mon, 6 Oct 2025 10:51:06 -0700 Roman Gushchin <roman.gushchin@linux.dev> wrote:
> Commit 4687fdbb805a ("mm/filemap: Support VM_HUGEPAGE for file mappings")
> introduced a special handling for VM_HUGEPAGE mappings: even if the
> readahead is disabled, 1 or 2 HPAGE_PMD_ORDER pages are
> allocated.
Three years ago.
> This change causes a significant regression
So no backport suggested? I guess reasonable given how long 4687fdbb805a has
been in tree.
>
> ...
>
> for containers with a
> tight memory.max limit, if VM_HUGEPAGE is widely used. Prior to this
> commit, mmap_miss logic would eventually lead to the readahead
> disablement, effectively reducing the memory pressure in the
> cgroup. With this change the kernel is trying to allocate 1-2 huge
> pages for each fault, no matter if these pages are used or not
> before being evicted, increasing the memory pressure multi-fold.
>
> ...
>
> Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
> Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Dev Jain <dev.jain@arm.com>
But I'll slap the Fixes: in there, it might help someone.
next prev parent reply other threads:[~2025-10-07 22:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 17:51 Roman Gushchin
2025-10-07 4:33 ` Dev Jain
2025-10-07 11:41 ` Jan Kara
2025-10-07 22:34 ` Andrew Morton [this message]
2025-10-07 22:52 ` Roman Gushchin
2025-10-08 0:53 ` Andrew Morton
2025-10-08 2:07 ` Roman Gushchin
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=20251007153424.1b46a4018e17d5dafd7fb126@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dev.jain@arm.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=roman.gushchin@linux.dev \
--cc=willy@infradead.org \
/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