Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp179886rwb; Fri, 4 Aug 2023 10:55:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7ZlfxKlQNx/dJ2ofDtc95lSX5j1gnt1+kQb3jj4uqIoaQrxFmJf1FKbB8E8qUbANkYh6T X-Received: by 2002:a17:903:454:b0:1b5:5a5f:369b with SMTP id iw20-20020a170903045400b001b55a5f369bmr2033416plb.65.1691171720768; Fri, 04 Aug 2023 10:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691171720; cv=none; d=google.com; s=arc-20160816; b=OpU8pL3PYeSh/kG5KOb6B5cdMYVFkBTnZnCl+mGGAYBKovkn0uXhXp3qOBiCMIVLbS mPrgtfc760KHVNOPMtkz5O9LLYp1s8JsQ4jmtSXNNhMrKf0S1XSZ9PO8oXA0gTi6B6Bq 2SVLb8++q+HG6QoodLIQqt8XV72o+YyvRMxKAhSH/XsLTcUdxMtdJmmddluxM9LKhYqk vmJ9B5FO2b9GSyrEEDaO2HlX0wiMwJNtHQa29+JlmqCmBz1qROb6XR+oW+A4GlcMCPoP MFpNGJiDwO7TBSpjiEqXntN8xxsrbROTWvP+uZp/z4lLUNDBCWMxRscBBBOEtS0G1hT0 mk9Q== 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:date:dkim-signature; bh=iUJy9CxyJyDezGa57jwVulgOP6Mhmh9lxMHoUFNxQOg=; fh=+sMFmTu9gCB0HZiA0DwUAN+0C6kjsoyzmm8LJXLW9cI=; b=U25yBInuOHS75568AhMf17Adld7Va3Fnl8h0MyQj+uEzV4N2/shvyte6YOJj1P1V+Q ccZiIeCHPLU9FizVWfMXHsdeoC5KT4ZqGTWl3vS4WTpplkq2+2Q4CibyhdGM7k1zoAUe W33jQz4KKgUTuvl0MQDkjVgTcUUXEUqtKmpD20htUgNcEwGzdiPhRKx/obik+UZ5TXI1 2Wms06IZECFJSBRCikjjwB/23jFXLw4cSTOxlVMPTXCcarELCwf4t96XatXFm1c3c0GA a9JsBHiVcc2RWBoo0ezL6kwl1bpSY6e057B3RNYLzcv9ltIbbfMw2s4MKbDMVNUqlROT 66ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=N8zywGIp; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a170903019200b001bbb3495d23si2146336plg.496.2023.08.04.10.55.02; Fri, 04 Aug 2023 10:55:20 -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=@cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=N8zywGIp; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230098AbjHDQhX (ORCPT + 99 others); Fri, 4 Aug 2023 12:37:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbjHDQhV (ORCPT ); Fri, 4 Aug 2023 12:37:21 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18FFC195 for ; Fri, 4 Aug 2023 09:37:19 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-63cfa3e564eso13786736d6.0 for ; Fri, 04 Aug 2023 09:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20221208.gappssmtp.com; s=20221208; t=1691167038; x=1691771838; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=iUJy9CxyJyDezGa57jwVulgOP6Mhmh9lxMHoUFNxQOg=; b=N8zywGIpRTGhPC/hd5Uaa9XnP65QfObz3MOaQDHYBSgg96x0lu4ubKHgZyvQjRg+92 VimNYt6Qi+T2OSX2whxjKdAwU5/KjPFJAJ8FQDdIS6jXwklryXprXrKQGXj9+OlCaDkz 3BPikSVV1zG++16OImjNF+EnR6jfDlpZjFzRRbEI2TKM1ALXkZgWSYisS9iRkCf9uPpL wBCvyMsghryoppGBxdYYnIv8JITuv327O30KANkFj9SkQRGLPKdUnIYxkMPnuCb+6MV2 utPvzU/Zd0n7b7YmTIV2gNEhgfjpPjenS3EcryRbLfQHd44dgYs/kyhVn6CXzmHTcpuN jP0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691167038; x=1691771838; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iUJy9CxyJyDezGa57jwVulgOP6Mhmh9lxMHoUFNxQOg=; b=Q38IVRCl6brupI/d2wXFri/VvyhrrWp6nPqafCmgrqQVkxzbosVSLRsbtyLNvIXWe5 BaE7TVuyChGdjlC5xQn1NwUXx3Njbi+q+hO0G4FaKzxwSIWUjwPawICJ3mpMuzeKlVxC WHEgDZukEz2uq+hisIdzWQqR+er5zYBjZ8q6MMZjjpxKzntPQvpA1QchatJg4ZhEnrC4 OYnPyDTF+pQCGAYDWtDgAbDTMdEYn2oV8DOJnHx4AmJ9rhapIgNeiGNMDnzrGy5Tq9On V0FHUuFgrINbBcfAxqmHlVIHHiYvJLzC2QzZcvknWObDyLFX7gSFR8tbotazbhO8/zB1 aGjg== X-Gm-Message-State: AOJu0YwAInqmTZ+M2pZuXebXsQsQKUg6Vdzu1q6S19qA06XCOEL+bpo9 UiycLbsJIefHxPCWH/imdslKcA== X-Received: by 2002:a0c:e10a:0:b0:62d:f806:7f80 with SMTP id w10-20020a0ce10a000000b0062df8067f80mr2235164qvk.13.1691167038197; Fri, 04 Aug 2023 09:37:18 -0700 (PDT) Received: from localhost ([2620:10d:c091:400::5:9910]) by smtp.gmail.com with ESMTPSA id e29-20020a0cb45d000000b00632266b569esm782221qvf.87.2023.08.04.09.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 09:37:17 -0700 (PDT) Date: Fri, 4 Aug 2023 12:37:16 -0400 From: Johannes Weiner To: Lucas Karpinski Cc: Andrew Morton , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Tejun Heo , Zefan Li , Shuah Khan , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests: cgroup: fix test_kmem_memcg_deletion false positives Message-ID: <20230804163716.GA337691@cmpxchg.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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, Aug 04, 2023 at 11:37:33AM -0400, Lucas Karpinski wrote: > The test allocates dcache inside a cgroup, then destroys the cgroups and > then checks the sanity of numbers on the parent level. The reason it > fails is because dentries are freed with an RCU delay - a debugging > sleep shows that usage drops as expected shortly after. > > Insert a 1s sleep after completing the cgroup creation/deletions. This > should be good enough, assuming that machines running those tests are > otherwise not very busy. This commit is directly inspired by Johannes > over at the link below. > > Link: https://lore.kernel.org/all/20230801135632.1768830-1-hannes@cmpxchg.org/ > > Signed-off-by: Lucas Karpinski Maybe I'm missing something, but there isn't a limit set anywhere that would cause the dentries to be reclaimed and freed, no? When the subgroups are deleted, the objects are just moved to the parent. The counters inside the parent (which are hierarchical) shouldn't change. So this seems to be a different scenario than test_kmem_basic. If the test is failing for you, I can't quite see why.