linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Jinjiang Tu <tujinjiang@huawei.com>,
	hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev,
	shakeel.butt@linux.dev, muchun.song@linux.dev, shuah@kernel.org,
	jgkamat@fb.com
Cc: linux-mm@kvack.org, wangkefeng.wang@huawei.com,
	sunnanyong@huawei.com, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH -next] selftests: memcg: remove useless code in test_memcg_oom_group_leaf_events
Date: Mon, 14 Oct 2024 16:30:31 -0600	[thread overview]
Message-ID: <45e3235e-17a8-4f2a-8ecb-a66542dbaf34@linuxfoundation.org> (raw)
In-Reply-To: <20241012021057.993520-1-tujinjiang@huawei.com>

On 10/11/24 20:10, Jinjiang Tu wrote:
> Due to No Internal Process Constraint, parent cgroup couldn't contain any
> process, the code `cg_run_nowait(parent, ...)` fails to execute and
> return -1 in fact. So remove the useless code to avoid misunderstanding.
> 

Hmm. wouldn't this make a good regression test for "No Internal
Process Constraint"

Why would you want to delete it?

> Fixes: a987785dcd6c ("Add tests for memory.oom.group")
> Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>
> ---
>   tools/testing/selftests/cgroup/test_memcontrol.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c
> index 16f5d74ae762..1be36cff72a0 100644
> --- a/tools/testing/selftests/cgroup/test_memcontrol.c
> +++ b/tools/testing/selftests/cgroup/test_memcontrol.c
> @@ -1392,7 +1392,6 @@ static int test_memcg_oom_group_leaf_events(const char *root)
>   	if (cg_write(child, "memory.oom.group", "1"))
>   		goto cleanup;
>   
> -	cg_run_nowait(parent, alloc_anon_noexit, (void *) MB(60));
>   	cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
>   	cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
>   	if (!cg_run(child, alloc_anon, (void *)MB(100)))

thanks,
-- Shuah


      reply	other threads:[~2024-10-14 22:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-12  2:10 Jinjiang Tu
2024-10-14 22:30 ` Shuah Khan [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=45e3235e-17a8-4f2a-8ecb-a66542dbaf34@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jgkamat@fb.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=shuah@kernel.org \
    --cc=sunnanyong@huawei.com \
    --cc=tujinjiang@huawei.com \
    --cc=wangkefeng.wang@huawei.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