From patchwork Sat Apr 23 15:56:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Vernet X-Patchwork-Id: 12824630 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 AABF0C433F5 for ; Sat, 23 Apr 2022 15:56:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B4B7B6B0074; Sat, 23 Apr 2022 11:56:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFB4E6B0075; Sat, 23 Apr 2022 11:56:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 99C526B0078; Sat, 23 Apr 2022 11:56:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 865636B0074 for ; Sat, 23 Apr 2022 11:56:50 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5928126355 for ; Sat, 23 Apr 2022 15:56:50 +0000 (UTC) X-FDA: 79388596980.20.64CEF94 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by imf17.hostedemail.com (Postfix) with ESMTP id 625C840037 for ; Sat, 23 Apr 2022 15:56:45 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id bb21so7598209qtb.3 for ; Sat, 23 Apr 2022 08:56:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KYSyRCk38u4G2hktKJeu3gAfTkZxhlPFYSytt9pTpIw=; b=MKQrYdCaMGETgctUVpTN8DsA2qKu3tw2Z3u3roVO4U0bfdj0YggC30izRwVRgH0bcj jHbyNXvECz1esJs1dLVn+p9dioDx1MHDNzHVWLOVc0f7QZIe8iimT6vrqoC3qHuHzmiQ HdtiB//QfFUTOflgjGh+HqJmJti3YQdeRTQQOcMnujRGubTcRApvhtEs0xj6zGPNJV3c H39OokEDncthHVmUxI9NFfNNEbl51PuwYKZG/Eg9icELOpN2YC2ny5vvJPg3+Pyb/bJ9 lCxIPS8lwgQqMG5OdCJpqkZDsfvdUiUeYWKXPx0qao7m7C/f0x2V4KbgxjhXcm0u0yOF SVdA== X-Gm-Message-State: AOAM5324WO+K+gj0INDTLlSbQ2cn0AxYMmqjNk/VMhd/eUq1kKX2rndB msln+yWtoTx8CH2fhWhK6h4= X-Google-Smtp-Source: ABdhPJwMzqu+MSfBXkoJcYYp/xxZpV8JWGg4fm1DIKo3/DT++ZvLT7JwV9+hqT59/UZrCpyeL1m+zw== X-Received: by 2002:ac8:5f06:0:b0:2f1:f657:eb3a with SMTP id x6-20020ac85f06000000b002f1f657eb3amr6846295qta.151.1650729409102; Sat, 23 Apr 2022 08:56:49 -0700 (PDT) Received: from localhost (fwdproxy-ash-022.fbsv.net. [2a03:2880:20ff:16::face:b00c]) by smtp.gmail.com with ESMTPSA id n11-20020a05622a11cb00b002f344f11849sm2967490qtk.71.2022.04.23.08.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 08:56:48 -0700 (PDT) From: David Vernet To: akpm@linux-foundation.org Cc: tj@kernel.org, roman.gushchin@linux.dev, 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, void@manifault.com Subject: [PATCH v2 0/5] Fix bugs in memcontroller cgroup tests Date: Sat, 23 Apr 2022 08:56:15 -0700 Message-Id: <20220423155619.3669555-1-void@manifault.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 625C840037 X-Stat-Signature: dojf4zxcsfx369hh1h1bgf1dfayiwihh X-Rspam-User: Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf17.hostedemail.com: domain of dcvernet@gmail.com designates 209.85.160.180 as permitted sender) smtp.mailfrom=dcvernet@gmail.com X-HE-Tag: 1650729405-537769 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tools/testing/selftests/cgroup/test_memcontrol.c contains a set of testcases which validate expected behavior of the cgroup memory controller. Roman Gushchin recently sent out a patchset that fixed a few issues in the test. This patchset continues that effort by fixing a few more issues that were causing non-deterministic failures in the suite. With this patchset, I'm unable to reproduce any more errors after running the tests in a continuous loop for many iterations. Before, I was able to reproduce at least one of the errors fixed in this patchset with just one or two runs. Changelog: v2: - Fixed the comment headers in test_memcg_min() and test_memcg_low() to reflect the new ordering of child cgroups in those tests. - Fixed the comment I added in test_memcg_oom_group_leaf_events() to use /* */ for multiline comments, as is the norm according to the kernel style guide. - Changed some of the conditional logic in test_memcg_oom_group_leaf_events() that checks for OOM event counts based on memory_localevents to be more intuitive. David Vernet (5): cgroups: Refactor children cgroups in memcg tests cgroup: Account for memory_recursiveprot in test_memcg_low() cgroup: Account for memory_localevents in test_memcg_oom_group_leaf_events() cgroup: Removing racy check in test_memcg_sock() cgroup: Fix racy check in alloc_pagecache_max_30M() helper function tools/testing/selftests/cgroup/cgroup_util.c | 12 +++ tools/testing/selftests/cgroup/cgroup_util.h | 1 + .../selftests/cgroup/test_memcontrol.c | 77 ++++++++++++------- 3 files changed, 64 insertions(+), 26 deletions(-)