Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3381119ioa; Tue, 26 Apr 2022 02:25:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzisJWS+fN8TV6ZXj+Nf05uS7O0cKfnKDoAWiHmG3BMHC9fTmcw0BqdGZdxuJhV1Xiy1Ecl X-Received: by 2002:a17:907:7ea1:b0:6f3:acda:4e34 with SMTP id qb33-20020a1709077ea100b006f3acda4e34mr2997756ejc.215.1650965137683; Tue, 26 Apr 2022 02:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650965137; cv=none; d=google.com; s=arc-20160816; b=S4Rq69ae3FZXDrrKH18wI9rOkHtGsVM4ZmV9vZEoG1I51Sx1pX1V8jxIYs4qmEpnKF c7Uwyq8ShPsMy1PxLO/ZS5UAX4jJCuqtL4jg0DXl1rV1Kns9GCYqrcBFNxWOziG9pWvV 64nOHlTt9fZy0c7ImPaunlfrAci2j3um/qUK9RU+kjzPoFYhIuVtacdu5Pe7T+nzo4Ry I6SRVM2p4vQTzSQDmRUVeGl+OvS9absMyZKeeFf6nON+o1g7k6alqBWhObjniR7yyIzK ujvp4/Ezf19oPdLfUCTygzYr5f1vNZKDIHw47a9594m00g8YIZrJspVHRlQiT9vcqGXg vQ1w== 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-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=eknS5mZjx4pi0PW50DuACc81xMEJlhElzkFotI9xECI=; b=eTVcVoGoZF6zNCSe0dW9pF9hHPvAZ9BE2aaqbQl2yiRRC83EMLX1+sE0mHaV0f48zq w7dQfn3hXTYLWts0idxZOQWNeKm4ZFDsxNYhoPKHehuChUeB3Dd8hVi2ArbazZAuv4CV ImhAd+QqtpnbWj4K+myNTFLtFutBIIcSgsMgu+GWKofRrhpU4iJQJ9uQiKeRimHhGbjG LLzdfL8L1P/Ro82Oua+XK0iaLNZ4QwmUrUZmRIQjB6g/Bce3vyHloTo6/XnoRKrDU2CO YQBPDNj2vAUhi2JvgTHjFv1doCl7X45nl/EjY5VuVS+eYyZzCe8ROH6TUM/XVVleoV6H ugug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Zy5KwFrs; 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 jr2-20020a170906a98200b006f3afa5f445si1374439ejb.993.2022.04.26.02.25.13; Tue, 26 Apr 2022 02:25:37 -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=Zy5KwFrs; 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 S241567AbiDZB7Y (ORCPT + 99 others); Mon, 25 Apr 2022 21:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229834AbiDZB7X (ORCPT ); Mon, 25 Apr 2022 21:59:23 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB9C46FA0B; Mon, 25 Apr 2022 18:56:17 -0700 (PDT) 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-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 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 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!