From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,vbabka@kernel.org,surenb@google.com,
shakeel.butt@linux.dev,rppt@kernel.org,riel@surriel.com,mhocko@suse.com,
ljs@kernel.org,liam@infradead.org,kuba@kernel.org,jp.kobryn@linux.dev,
hannes@cmpxchg.org,david@kernel.org,baohua@kernel.org,
xueyuan.chen21@gmail.com,akpm@linux-foundation.org
Subject: + mm-vmpressure-exclude-costly-order-reclaim-from-socket-pressure-accounting.patch added to mm-unstable branch
Date: Sat, 28 Nov 2026 17:54:11 -0800 [thread overview]
Message-ID: <20261129015412.639E01F00896@smtp.kernel.org> (raw)
In-Reply-To: <20261127-socket_pressure-v1-1-1d3a60c1dbb7@gmail.com>
The patch titled
Subject: mm/vmpressure: exclude costly-order reclaim from socket pressure accounting
has been added to the -mm mm-unstable branch. Its filename is
mm-vmpressure-exclude-costly-order-reclaim-from-socket-pressure-accounting.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmpressure-exclude-costly-order-reclaim-from-socket-pressure-accounting.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Xueyuan Chen <xueyuan.chen21@gmail.com>
Subject: mm/vmpressure: exclude costly-order reclaim from socket pressure accounting
Date: Fri, 27 Nov 2026 20:27:02 +0800
vmpressure() accumulates reclaim statistics but only checks the order of
the last sample when closing a window. As a result, costly-order reclaim
can still trigger socket pressure indirectly or discard accumulated
low-order reclaim statistics.
Skip costly-order reclaim before updating the counters.
Link: https://patch.msgid.link/20261127-socket_pressure-v1-1-1d3a60c1dbb7@gmail.com
Fixes: f2a950170f7a ("mm/vmpressure: skip socket pressure for costly order reclaim")
Signed-off-by: Xueyuan Chen <xueyuan.chen21@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: Rik van Riel <riel@surriel.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Barry Song <baohua@kernel.org>
Cc: JP Kobryn <jp.kobryn@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jakub Kicinski <kuba@kernel.org>
mm/vmpressure.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/mm/vmpressure.c~mm-vmpressure-exclude-costly-order-reclaim-from-socket-pressure-accounting
+++ a/mm/vmpressure.c
@@ -156,6 +156,14 @@ void vmpressure(gfp_t gfp, int order, st
if (!memcg || mem_cgroup_is_root(memcg))
return;
+ /*
+ * Costly-order reclaim relies on compaction, so its efficiency
+ * is a poor signal for socket pressure. Exclude these samples
+ * before they can affect the window.
+ */
+ if (order > PAGE_ALLOC_COSTLY_ORDER)
+ return;
+
spin_lock(&vmpr->sr_lock);
scanned = vmpr->scanned += scanned;
reclaimed = vmpr->reclaimed += reclaimed;
@@ -168,15 +176,7 @@ void vmpressure(gfp_t gfp, int order, st
level = vmpressure_calc_level(scanned, reclaimed);
- /*
- * Once we go above COSTLY_ORDER, reclaim relies heavily on
- * compaction to make progress. Reclaim efficiency was never a
- * great proxy for pressure to begin with, but it's outright
- * misleading with these high orders. Don't throttle sockets
- * because somebody is attempting something crazy like an order-7
- * and predictably struggling.
- */
- if (level > VMPRESSURE_LOW && order <= PAGE_ALLOC_COSTLY_ORDER) {
+ if (level > VMPRESSURE_LOW) {
/*
* Let the socket buffer allocator know that
* we are having trouble reclaiming LRU pages.
_
Patches currently in -mm which might be from xueyuan.chen21@gmail.com are
mm-zsmalloc-remove-config_zsmalloc_stat.patch
mm-vmpressure-exclude-costly-order-reclaim-from-socket-pressure-accounting.patch
mm-memcontrol-expose-anon-and-file-reclaim-statistics-in-memorystat.patch
prev parent reply other threads:[~2026-11-29 1:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 12:27 [PATCH] mm/vmpressure: exclude costly-order reclaim from socket pressure accounting Xueyuan Chen
2026-11-28 16:36 ` Rik van Riel
2026-11-29 1:48 ` Shakeel Butt
2026-11-29 1:54 ` Andrew Morton [this message]
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=20261129015412.639E01F00896@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jp.kobryn@linux.dev \
--cc=kuba@kernel.org \
--cc=liam@infradead.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=mm-commits@vger.kernel.org \
--cc=riel@surriel.com \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=xueyuan.chen21@gmail.com \
/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.