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 8DD37C433EF for ; Fri, 13 May 2022 19:00:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 056746B0075; Fri, 13 May 2022 15:00:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0061F6B0078; Fri, 13 May 2022 15:00:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0F9E6B007B; Fri, 13 May 2022 15:00:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D2AFD6B0075 for ; Fri, 13 May 2022 15:00:05 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A90A520DD5 for ; Fri, 13 May 2022 19:00:05 +0000 (UTC) X-FDA: 79461634770.02.01172C0 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf05.hostedemail.com (Postfix) with ESMTP id 5AC8E1000BA for ; Fri, 13 May 2022 18:59:45 +0000 (UTC) Date: Fri, 13 May 2022 11:59:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1652468403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VqpZhH7J5youYlvqQPYfh1hCiMgjjWNCBTzk0n4ZxXA=; b=F4EModIONc1PztPbxj08bNBaO8jF2TB7U0Ez9Ira/aYAAwz8eA72ptgiF1I1ULNyM7IVp7 kK/WhwqWPOQDCfP4/od29ylwXnmAvg/gbAFgyfaveVhFF2KhbZVSGYIv5hflnA15e+qzPh YDxYaYxWoVB4FC51eWTTQkRgBUVJyjU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: void@manifault.com, akpm@linux-foundation.org, 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: References: <20220512174452.tr34tuh4k5jm6qjs@dev0025.ash9.facebook.com> <20220513171811.730-1-mkoutny@suse.com> <20220513171811.730-5-mkoutny@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220513171811.730-5-mkoutny@suse.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=F4EModIO; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf05.hostedemail.com: domain of roman.gushchin@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 5AC8E1000BA X-Rspam-User: X-Stat-Signature: xbcp8cetid19fpmhwofqpiwtqey889yn X-HE-Tag: 1652468385-409059 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, 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. > > Also, correct/deduplicate respective comments > > Signed-off-by: Michal Koutný > --- > tools/testing/selftests/cgroup/test_memcontrol.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/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) > > /* > * First, this test creates the following hierarchy: > - * A memory.min = 50M, memory.max = 200M > + * A memory.min = 0, memory.max = 200M > * A/B memory.min = 50M, memory.current = 50M > * A/B/C memory.min = 75M, memory.current = 50M > * A/B/D memory.min = 25M, memory.current = 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 ~= 50M > * A/B/C memory.current ~= 29M > @@ -335,8 +335,6 @@ static int test_memcg_min(const char *root) > (void *)(long)fd); > } > > - 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) > > /* > * First, this test creates the following hierarchy: > - * A memory.low = 50M, memory.max = 200M > - * A/B memory.low = 50M, memory.current = 50M > + * A memory.low = 0, memory.max = 200M > + * A/B memory.low = 50M, memory.current = ... Can you, please, just remove "memory.current = ...", it's not because obvious what "..." means here. Other than that: Acked-by: Roman Gushchin Thank you!