Re: [RFC PATCH 0/3] selftests: mm: introduce page allocation stall reproducer

Andrew Morton <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Wed, 19 Aug 2026 00:05:35 -0700 Jason Miu <[email protected]> wrote:

> Background
> ==========
> Under severe system memory pressure, system unresponsiveness often 
> occurs due to page allocation stalls. In commit 94e0bcde055e ("mm, 
> page_alloc: reintroduce page allocation stall warning"), David Rientjes 
> introduced a warning mechanism to emit a kernel log when a page 
> allocation takes longer than 10 seconds. This log is used to correlate
> a frozen system with the system memory state at the time of failure.
> 
> To further debug and analyze these allocation stalls, we need a 
> reproducible test case. This patch series introduces a new selftest 
> designed to artificially mimic the severe memory pressure scenarios 
> seen in production, allowing us to observe the resulting allocation 
> stalls.

Interesting.

>  lib/Kconfig.debug                             |  11 +
>  lib/Makefile                                  |   1 +
>  lib/test_mempress_timer.c                     | 140 +++++++++++
>  .../testing/selftests/mm/page_alloc_stall.sh  |  80 ++++++
>  .../selftests/mm/page_alloc_stall_pressure.py | 235 ++++++++++++++++++
>  5 files changed, 467 insertions(+)
>  create mode 100644 lib/test_mempress_timer.c
>  create mode 100644 tools/testing/selftests/mm/page_alloc_stall.sh
>  create mode 100644 tools/testing/selftests/mm/page_alloc_stall_pressure.py

Nothing fits very well, does it?



selftests is for quick tests which are run by run_kselftest.sh.  You
had to place it in selftests because there isn't anywhere obvious for
it to live.

So I suggest a brand new tools/testing/stresstests/mm.  If we create
this, people will jump on it and start adding things which presently
reside in their personal collections.



I can't say I like "mempress".  Is "memory_pressure" too wordy?



All of lib/test*.c shouldn't be in lib/.  lib/ is for library code! 
Again, we put them there because people are shy about doing mkdir.


Sashiko said hello:
	https://sashiko.dev/#/patchset/[email protected]


In [patch 1/3], s/__GFP_NOFAIL// and s/cond_resched()//.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.