From: Li Wang via ltp <ltp@lists.linux.it>
To: Gao Xiang <gaoxiang@kylinos.cn>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] madvise09: support cgroup v2 via LTP cgroup API
Date: Fri, 20 Mar 2026 11:27:45 +0800 [thread overview]
Message-ID: <aby-sTD-GhYeHhxE@redhat.com> (raw)
In-Reply-To: <20260320020730.11233-1-gaoxiang@kylinos.cn>
On Fri, Mar 20, 2026 at 10:07:30AM +0800, Gao Xiang wrote:
> Replace hard-coded cgroup v1 memory controller handling in madvise09
> with the LTP cgroup framework and cgroup v2 control file names..
>
> Rename the related limit variable to reflect the new interface instead
> of the old memsw naming since memsw.limit_in_bytes and memory.swap.max
> are different between cgroup v1 and v2.
>
> Also fix the munmap length argument to unmap the whole mapped area.
>
> Changes in v2:
> - Drop .needs_cgroup_ver = 2 becasue cgroup framework already maps
> v2 control files to v1.
> - Renmae the comments to use v2 control file names.
We usually add the change logs in git note:
git notes add
> --- a/testcases/kernel/syscalls/madvise/madvise09.c
> +++ b/testcases/kernel/syscalls/madvise/madvise09.c
> @@ -17,8 +17,8 @@
> * o Write to some of the madvised pages again, these must not be freed
> *
> * o Set memory limits
> - * - limit_in_bytes = 8MB
> - * - memsw.limit_in_bytes = 16MB
> + * - memory.max = 8MB
> + * - memory.swap.max = 16MB
> *
> * The reason for doubling the limit_in_bytes is to have safe margin
> * for forking the memory hungy child etc. And the reason to setting
I have modified all the relevant ctrl-file names and pushed. Thank you!
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-03-20 3:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 7:32 [LTP] [PATCH] madvise09: support cgroup v2 via LTP cgroup API Gao Xiang
2026-03-19 12:34 ` Li Wang via ltp
2026-03-20 2:07 ` [LTP] [PATCH v2] " Gao Xiang
2026-03-20 3:27 ` Li Wang via ltp [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=aby-sTD-GhYeHhxE@redhat.com \
--to=ltp@lists.linux.it \
--cc=gaoxiang@kylinos.cn \
--cc=liwang@redhat.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