From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Wei Gao" <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] mmapstress06: Rate limit page-dirtying loop to prevent MemCG OOM-kills
Date: Wed, 26 Aug 2026 07:58:34 +0000 [thread overview]
Message-ID: <6a8e9cab.c5f98925.1b714b.83c7@mx.google.com> (raw)
In-Reply-To: <ao6R_qZC1ged_wzE@autotest-wegao.qe.prg2.suse.org>
Hi Wei,
> The goal of this test is to reach memory.max and trigger kernel-driven
> swapping as a direct result of hitting that limit.
> Proactively calling memory.reclaim forces swapping before reaching memory.max,
> meaning the memory limit is never actually reached. Furthermore, if calling memory.reclaim
> after hitting memory.max is too late to prevent OOM-kills on slow storage.
> So i do not think `memory.reclaim` solution can help on our oom failure.
memory.reclaim doesn't run during the pressure, but right after we
reached the memory limit, so OOM killer can be handled by excluding
it from the chain and getting an error instead of an OOM kill. In this
way we know if there's an error while swapping, instead of guessing that
device is too slow.
That's basically what we would do if we want to implement something
that is suitable for all the devices: we disable OOM killer in the cgroup,
we remove any sleep, we give a max runtime and if that is reached, it
means that after a number of attempts we are still not swapping -> TFAIL.
Just notice that what I just described is not so far from what OOM-killer
or memory.reclaim does. The ending result is exactly the same, but we
do things by hand.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-08-26 7:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 2:13 [LTP] [PATCH v1] mmapstress06: Rate limit page-dirtying loop to prevent MemCG OOM-kills Wei Gao via ltp
2026-08-25 3:00 ` [LTP] " linuxtestproject.agent
2026-08-25 12:16 ` [LTP] [PATCH v1] " Andrea Cervesato via ltp
2026-08-26 7:13 ` Wei Gao via ltp
2026-08-26 7:58 ` Andrea Cervesato via ltp [this message]
2026-08-26 9:31 ` Wei Gao via ltp
2026-08-26 9:49 ` Andrea Cervesato via ltp
2026-08-26 13:38 ` Wei Gao via ltp
2026-08-27 8:06 ` Andrea Cervesato via ltp
2026-08-27 14:21 ` Cyril Hrubis
2026-09-01 2:04 ` Wei Gao via ltp
2026-09-01 7:38 ` Andrea Cervesato via ltp
2026-09-01 8:22 ` Wei Gao via ltp
2026-09-01 8:47 ` Cyril Hrubis
2026-09-02 2:57 ` [LTP] [PATCH v2] mmapstress06: Use memory.high in cgroup v2 to start swapping early Wei Gao via ltp
2026-09-02 8:28 ` [LTP] " linuxtestproject.agent
2026-09-04 8:53 ` [LTP] [PATCH v2] " Andrea Cervesato via ltp
2026-09-04 10:23 ` Cyril Hrubis
2026-09-04 10:43 ` Andrea Cervesato via ltp
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=6a8e9cab.c5f98925.1b714b.83c7@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=wegao@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox