Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp595871iob; Wed, 18 May 2022 08:48:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr2DCQ/Axdmj2p44kRdyLYWwdWy5PFQcsumFAFRgYSzmYRryY1I6tAZVc5qeNtwpFR4LDl X-Received: by 2002:a17:902:dad1:b0:161:9abb:fb75 with SMTP id q17-20020a170902dad100b001619abbfb75mr190274plx.135.1652888912398; Wed, 18 May 2022 08:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652888912; cv=none; d=google.com; s=arc-20160816; b=qNfcuKNL/NikP+tQKTNn+mZH+l2cFYA5+WcG/4pLFYb2FeHs5K3TFTJoAkXoNrQjnI Ra70MmpU4K/Bfw10hd2Q8yYX2Kdu8rrGQRGe/AdB6B4BWXpBQOAFt9hgJDlnsTipoFkc oh02DaB0SXp7KDvEll4wpiKhNwkfeL+DiWgo8tNORt7STgYInvDmLG60AUzhHkOjqJ2k M8ka8qewpHFY9206ZwgDZW/FC32WGZiZYh6PDi6XYuYevdpzdiX00g4jxUCT3M2ies8V yDEF37Rbuxfunf3VBI/AmaE3/t5x6HoS3Hkoylf/Tg8n+FIzav5GHAJEggj0chUvoeKI ejqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nGOjxaCmozTaID0zJr5Qv3xqJGJFYW6IddaRszUZ5Io=; b=ob+T0KOf46DXPnlZqUj6025+4SnfMt/NaNxOXcg234kRZx/K5O3QdA0TcszhUxEzTu jeJaQ20aIkcbAKXGP0kpogRaXVBg4MuXl+RU5zK6nDQzM3X59E/wgRAG1cypjVeW1ZW+ d53zdCnIbIgUwxHXR6wPl4aAdgTK4JHekiGIZ27Zn3UYfiZ5yb438nSHHV/CO5dbaf2d kvOoAlvQqjujd+AelUPyOIJMJUdvajBlRsi2R1QrIR4GecHk75q1LaS2TdJkRX83gg7s tk/0CZ6/u1+VotnILS4owfuYoN4PWJF5Ci/ER4aAL2L709XnvXzDH9nv3Guc/lueBoO6 4CGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qH9RzgwW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h17-20020a056a001a5100b0050e0d6d4019si3759430pfv.32.2022.05.18.08.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 08:48:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qH9RzgwW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B304AFB1B; Wed, 18 May 2022 08:41:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239627AbiERPlO (ORCPT + 99 others); Wed, 18 May 2022 11:41:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239489AbiERPkx (ORCPT ); Wed, 18 May 2022 11:40:53 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7649F2F3A8; Wed, 18 May 2022 08:40:49 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EDF811F8D9; Wed, 18 May 2022 15:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1652888447; h=from:from:reply-to: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=nGOjxaCmozTaID0zJr5Qv3xqJGJFYW6IddaRszUZ5Io=; b=qH9RzgwWP6HM53SV3SM9GGw5HQvJnlpl2b6Igr7X3voYR3Dc6P/OeGTR8HmssfX0JXtIb3 IFt9nGwpbzlH5B8YLrnC+uRfxBCXJjdl9/mD2oT3bwzduOCwx8obI4+3YeG0Vv0iNgE7Bd YcDBOk6JwLQkbFgeamv+7fxW53/ziPo= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BEA7D13A6D; Wed, 18 May 2022 15:40:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wLqYLX8ThWJDUgAAMHmgww (envelope-from ); Wed, 18 May 2022 15:40:47 +0000 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: cgroups@vger.kernel.org, linux-mm@kvack.org Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Richard Palethorpe Subject: [PATCH 4/4] selftests: memcg: Remove protection from top level memcg Date: Wed, 18 May 2022 17:40:37 +0200 Message-Id: <20220518154037.18819-5-mkoutny@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220518154037.18819-1-mkoutny@suse.com> References: <20220518154037.18819-1-mkoutny@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 = ... * A/B/C memory.low = 75M, memory.current = 50M * A/B/D memory.low = 25M, memory.current = 50M * A/B/E memory.low = 0, memory.current = 50M @@ -490,8 +488,6 @@ static int test_memcg_low(const char *root) goto cleanup; } - if (cg_write(parent[0], "memory.low", "50M")) - goto cleanup; if (cg_write(parent[1], "memory.low", "50M")) goto cleanup; if (cg_write(children[0], "memory.low", "75M")) -- 2.35.3