[LTP] [PATCH v3] memory: rewrite memcg_stress_test into C API

Michal Koutný mkoutny@suse.com
Thu Nov 13 19:04:17 CET 2025


On Thu, Nov 13, 2025 at 01:19:30PM +0100, Andrea Cervesato <andrea.cervesato@suse.com> wrote:
> I'm not sure about this, because system might have other applications
> running which are (de)allocating memory there and there, and
> "MemAvailable" would change accordingly.

So the environemtn isn't sadly a good opportunity for such test :-/

> Also I was thinking that maybe we should mlock() memory pages to ensure
> we are not going to touch swap memory. WDYT?

As I wrote in [1], I'd start with the rewrite into the renewed infra
that mimics what the original stress test was supposed to do. (But I
admit it was neither a good stress nor test in my eyes.)

I'm not sure what would be the objective of avoiding swap and mlocking?

Neverthless, as a followup to the rewrite above, try converting the test
into something more useful (where it verifies something and won't
produce too many false positives). And that in a separate commit(s) with
reasoning, maybe not necessarily touching memcg_stess_test. I'd
personally still try pursuing something like a) and b) from that mail
[1] (striving to run and measure it in isolation, e.g. all in one
encompassing memcg). Of course this idea may inspire you to something
even better :-)

Thanks,
Michal

[1] https://lore.kernel.org/ltp/cvvobn3ncapngynjplotpft3vbbfzg6me2gq3omnclzgwdoqli@ga7vc5e6f5t3/


More information about the ltp mailing list