Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp861226iob; Fri, 13 May 2022 14:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtlEvu2AdkJ7v8f4Si7Uwm20DRY+4dBtT3wqOPUAB5CU+mhwPKIEbjlaKNeQcpIETIf+2z X-Received: by 2002:a17:906:c14e:b0:6f9:9d73:77e with SMTP id dp14-20020a170906c14e00b006f99d73077emr5892464ejc.258.1652478338342; Fri, 13 May 2022 14:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652478338; cv=none; d=google.com; s=arc-20160816; b=evFQ9CTHRuakRlsCLLuKmeqWxzcOJwm/eTQM+Xq7JSso4wdWyI8YICfqyYFJHSaoVQ xdhywGbynuS4thme0+V5VaZRtV77S2xc94Ge/XYktjCSO9BSBU6xUKOLPPFszardbOCn UN+E2eTS7nA8Xq5UiKBlVj8MQRhoHRHSlQdBxcHRAHa7Iss2rBjc7VcV/nv0/Kwom0y7 rsjpcvzO88lZ7N4TD5UjBq19uHsrFmhezdzLd5ymrsvfvo9Kn1BBYAuI0MQR35y7Tds5 kZVRO+ImsU+hn5kyTwKBU6hbr982frD5Dl8BYagy1w3+vFVXwgHXAF/3KYc5MKbQFk6U 84ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=VqpZhH7J5youYlvqQPYfh1hCiMgjjWNCBTzk0n4ZxXA=; b=J8x965pTST6z1zvNLrp8DRSVxqBTuJFQ2P9bj8X74A42cjXs3VZgVbRIGZASVJIYMy Mb/0j+DqieJfFM+8ufgKv405WIvliDpKUNcPCZTT6Iz6tA3ZuKdE3tQKvNzb6Egrc3Af OCTho4aKiWVrTt9jXXVJ5ggdTxmWseh9Ou+eENRQ7N+Kh74WSxk/HfTfnwO2WVRFE7hC UU+49BLAIplVBIrzqsFDennDyQXJ5KQDT5D97AtDRNDzrskcPqNv46f+NouXx0wDDUCC NjUsV65sizsSGWsIKcL4u+XaAVYpQevCD4QO6NPVEk63WG+tU6Sw//DPyUXeF3gLrBNu F9NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=F4EModIO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg12-20020a170907970c00b006e7f5b1fb91si3499367ejc.370.2022.05.13.14.45.12; Fri, 13 May 2022 14:45:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=F4EModIO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383523AbiEMTAL (ORCPT + 99 others); Fri, 13 May 2022 15:00:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350124AbiEMTAH (ORCPT ); Fri, 13 May 2022 15:00:07 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68E9C51325; Fri, 13 May 2022 12:00:05 -0700 (PDT) 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!