From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEE8AC433F5 for ; Wed, 18 May 2022 00:24:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0C36D6B0072; Tue, 17 May 2022 20:24:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0734F6B0073; Tue, 17 May 2022 20:24:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E7C876B0074; Tue, 17 May 2022 20:24:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D7D586B0072 for ; Tue, 17 May 2022 20:24:56 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 351A3602CC for ; Wed, 18 May 2022 00:24:48 +0000 (UTC) X-FDA: 79476968256.24.C6F4D7A Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf02.hostedemail.com (Postfix) with ESMTP id 1E255800B8 for ; Wed, 18 May 2022 00:24:37 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E380EB80B25; Wed, 18 May 2022 00:24:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35E5DC385B8; Wed, 18 May 2022 00:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652833484; bh=IqdtSbJNm+VCuGfNAw8HzsuQPLkmpT4BhAuMLtG+vDI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vhDZhQ93mCmb4YxS1mh5DEHHIcUSZbxx4FRPaLVghQFUuACIEem5vS0qa46A1JKZi a14rGVLnWHkOEKmkq1nnAYQENCzmQKAD9lqyHEfMWXg14bN0oFYkUAJ9VmLHZsK/zL mNWuy+13jtxf2UCabEYHHbwSU7jhlcDty3FRiM1w= Date: Tue, 17 May 2022 17:24:43 -0700 From: Andrew Morton To: Roman Gushchin Cc: Michal =?ISO-8859-1?Q?Koutn=FD?= , void@manifault.com, cgroups@vger.kernel.org, hannes@cmpxchg.org, kernel-team@fb.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@kernel.org, shakeelb@google.com, tj@kernel.org, Richard Palethorpe Subject: Re: [PATCH 4/4] selftests: memcg: Remove protection from top level memcg Message-Id: <20220517172443.3e524a8319c693ab24c5f22e@linux-foundation.org> In-Reply-To: References: <20220512174452.tr34tuh4k5jm6qjs@dev0025.ash9.facebook.com> <20220513171811.730-1-mkoutny@suse.com> <20220513171811.730-5-mkoutny@suse.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 1E255800B8 X-Stat-Signature: fofiagdbjg8rrzjeoriushjpm838kaad X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=vhDZhQ93; spf=pass (imf02.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam09 X-HE-Tag: 1652833477-739840 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 13 May 2022 11:59:56 -0700 Roman Gushchin wrote: > On Fri, May 13, 2022 at 07:18:11PM +0200, Michal Koutny wrote: > > The reclaim is triggered by memory limit in a subtree, therefore the > > testcase does not need configured protection against external reclaim. > >=20 > > Also, correct/deduplicate respective comments > >=20 > > Signed-off-by: Michal Koutn=FD > > --- > > tools/testing/selftests/cgroup/test_memcontrol.c | 12 ++++-------- > > 1 file changed, 4 insertions(+), 8 deletions(-) > >=20 > > diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/t= esting/selftests/cgroup/test_memcontrol.c > > index 9ffacf024bbd..9d370aafd799 100644 > > --- a/tools/testing/selftests/cgroup/test_memcontrol.c > > +++ b/tools/testing/selftests/cgroup/test_memcontrol.c > > @@ -247,7 +247,7 @@ static int cg_test_proc_killed(const char *cgroup) > > =20 > > /* > > * First, this test creates the following hierarchy: > > - * A memory.min =3D 50M, memory.max =3D 200M > > + * A memory.min =3D 0, memory.max =3D 200M > > * A/B memory.min =3D 50M, memory.current =3D 50M > > * A/B/C memory.min =3D 75M, memory.current =3D 50M > > * A/B/D memory.min =3D 25M, memory.current =3D 50M > > @@ -257,7 +257,7 @@ static int cg_test_proc_killed(const char *cgroup) > > * Usages are pagecache, but the test keeps a running > > * process in every leaf cgroup. > > * Then it creates A/G and creates a significant > > - * memory pressure in it. > > + * memory pressure in A. > > * > > * A/B memory.current ~=3D 50M > > * A/B/C memory.current ~=3D 29M > > @@ -335,8 +335,6 @@ static int test_memcg_min(const char *root) > > (void *)(long)fd); > > } > > =20 > > - if (cg_write(parent[0], "memory.min", "50M")) > > - goto cleanup; > > if (cg_write(parent[1], "memory.min", "50M")) > > goto cleanup; > > if (cg_write(children[0], "memory.min", "75M")) > > @@ -404,8 +402,8 @@ static int test_memcg_min(const char *root) > > =20 > > /* > > * First, this test creates the following hierarchy: > > - * A memory.low =3D 50M, memory.max =3D 200M > > - * A/B memory.low =3D 50M, memory.current =3D 50M > > + * A memory.low =3D 0, memory.max =3D 200M > > + * A/B memory.low =3D 50M, memory.current =3D ... >=20 > Can you, please, just remove "memory.current =3D ...", it's not > because obvious what "..." means here. >=20 You mean this? --- a/tools/testing/selftests/cgroup/test_memcontrol.c~selftests-memcg-remo= ve-protection-from-top-level-memcg-fix +++ a/tools/testing/selftests/cgroup/test_memcontrol.c @@ -403,15 +403,14 @@ cleanup: /* * First, this test creates the following hierarchy: * A memory.low =3D 0, memory.max =3D 200M - * A/B memory.low =3D 50M, memory.current =3D ... + * A/B memory.low =3D 50M * A/B/C memory.low =3D 75M, memory.current =3D 50M * A/B/D memory.low =3D 25M, memory.current =3D 50M * A/B/E memory.low =3D 0, memory.current =3D 50M * A/B/F memory.low =3D 500M, memory.current =3D 0 * * Usages are pagecache. - * Then it creates A/G an creates a significant - * memory pressure in it. + * Then it creates A/G and creates significant memory pressure in it. * * Then it checks actual memory usages and expects that: * A/B memory.current ~=3D 50M _ (includes gratuitous comment cleanup) I assume your comment in https://lkml.kernel.org/r/Yn6pBPq+lAXm9NG8@carbon can be addressed in a later patch. I'm not sure what to amke of https://lkml.kernel.org/r/Yn6pWPodGPlz+D8G@car= bon Do we feel this series needs more work before merging it up?