All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang via ltp <ltp@lists.linux.it>
To: Gao Xiang <gaoxiang@kylinos.cn>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] madvise09: support cgroup v2 via LTP cgroup API
Date: Thu, 19 Mar 2026 20:34:18 +0800	[thread overview]
Message-ID: <abvtSlnT-1P2pYZG@redhat.com> (raw)
In-Reply-To: <20260319073248.4681-1-gaoxiang@kylinos.cn>

Gao Xiang wrote:

> --- a/testcases/kernel/syscalls/madvise/madvise09.c
> +++ b/testcases/kernel/syscalls/madvise/madvise09.c
> @@ -18,7 +18,7 @@
>   *
>   * o Set memory limits
>   *   - limit_in_bytes = 8MB
> - *   - memsw.limit_in_bytes = 16MB
> + *   - swap.limit_in_bytes = 16MB

The previous ctrl-files in Cgroup v1 naming which should match in v2 as:
  memory.limit_in_bytes -> memory.max
  memory.memsw.limit_in_bytes -> memory.swap.max

Maybe we should standardize all the names in the comments to v2.

See: ltp/lib/tst_cgroup.c line#183.

> ...
>  static struct tst_test test = {
>  	.setup = setup,
> -	.cleanup = cleanup,
>  	.test_all = run,
>  	.needs_root = 1,
>  	.forks_child = 1,

> +	.needs_cgroup_ver = 2,

LTP now supports automatically mapping v2 control files to v1,
therefore, there is no need to set cgroup_ver restrictions here.

IOW, with your patch applied, madvise09 works well on Cgroup v1 too.

-- 
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-03-19 12:34 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 [this message]
2026-03-20  2:07   ` [LTP] [PATCH v2] " Gao Xiang
2026-03-20  3:27     ` Li Wang 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=abvtSlnT-1P2pYZG@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 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.