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 0BD73C433EF for ; Tue, 26 Apr 2022 01:56:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32DEC6B0073; Mon, 25 Apr 2022 21:56:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DC5F6B0074; Mon, 25 Apr 2022 21:56:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A38E6B0075; Mon, 25 Apr 2022 21:56:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 076E26B0073 for ; Mon, 25 Apr 2022 21:56:19 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id DA63E1201C8 for ; Tue, 26 Apr 2022 01:56:18 +0000 (UTC) X-FDA: 79397365236.19.2503CF1 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf21.hostedemail.com (Postfix) with ESMTP id 79C601C0049 for ; Tue, 26 Apr 2022 01:56:15 +0000 (UTC) Date: Mon, 25 Apr 2022 18:56:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1650938176; 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: in-reply-to:in-reply-to:references:references; bh=eknS5mZjx4pi0PW50DuACc81xMEJlhElzkFotI9xECI=; b=Zy5KwFrskWKcY3bLKvYR+K/romXFvT8ubAkmxpL922s/9KYhDYlCYyxcYgBNWmO6yRbAyC IFVV3DYFHNBmr/F90mhh7Pla2zpFxQqPYO7rgaZdV6JsTx9RICKkLRnpAIprEhvq78S2W5 GPndu/sXoZVZyLWfyONdz6s6ipZHESo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: David Vernet Cc: akpm@linux-foundation.org, tj@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, hannes@cmpxchg.org, mhocko@kernel.org, shakeelb@google.com, kernel-team@fb.com Subject: Re: [PATCH v2 1/5] cgroups: Refactor children cgroups in memcg tests Message-ID: References: <20220423155619.3669555-1-void@manifault.com> <20220423155619.3669555-2-void@manifault.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220423155619.3669555-2-void@manifault.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 79C601C0049 X-Stat-Signature: cbo43pwujuipno8u4bju7hmec43rtdfu X-Rspam-User: Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Zy5KwFrs; spf=pass (imf21.hostedemail.com: domain of roman.gushchin@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-HE-Tag: 1650938175-146830 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 Sat, Apr 23, 2022 at 08:56:17AM -0700, David Vernet wrote: > In test_memcg_min() and test_memcg_low(), there is an array of four sibling > cgroups. All but one of these sibling groups does a 50MB allocation, and > the group that does no allocation is the third of four in the array. This > is not a problem per se, but makes it a bit tricky to do some assertions in > test_memcg_low(), as we want to make assertions on the siblings based on > whether or not they performed allocations. Having a static index before > which all groups have performed an allocation makes this cleaner. > > This patch therefore reorders the sibling groups so that the group that > performs no allocations is the last in the array. A follow-on patch will > leverage this to fix a bug in the test that incorrectly asserts that a > sibling group that had performed an allocation, but only had protection > from its parent, will not observe any memory.events.low events during > reclaim. > > Signed-off-by: David Vernet Acked-by: Roman Gushchin Thanks!