Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4845782rwl; Tue, 28 Mar 2023 12:08:07 -0700 (PDT) X-Google-Smtp-Source: AK7set9J79JbJHxx5RrCE6aQ/oKiK+WmftMWTEbT7zqqeSLe19y+KQh4/5vPylMl8QhkZPCG3dUB X-Received: by 2002:a05:6a20:e1e:b0:d0:4f09:219a with SMTP id ej30-20020a056a200e1e00b000d04f09219amr13830141pzb.39.1680030487429; Tue, 28 Mar 2023 12:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680030487; cv=none; d=google.com; s=arc-20160816; b=ZiYoS62FDe8J8otxql8P7S5eFFW+mXvw6g6M/D4yRGeSoCP0HLb4Ozgm4bRWFHntfI 4AC2Q3BougPLXdCtSUEwmkchO/ds9TnuNSTao6I1maaIucHXc1X8EYyXqPbSPbTRIq4l AY9wxR7GRYdKsvoLJ/dHWm/46lteSQ2G0onJSiNLMlVkwDYX3ZqTIIp9TD840wcWXBiF H6NPa4JGAEp4HrKlwTm/IWpJhofSgkTiXGghOvfxpmxWER72D4MEAMPQlonKPcdxJLNF kU686j16T7ASGRWUr+G83tiG1zMGuf2dXg0jhl9Wc+NwhcdN8ul5SbaPxdxLR5rr71Hn ME+Q== 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=iZSVb7anGXXb5zwCrWYt7xgUpKRegbsbYrM5HxY90BU=; b=Ag0YgpWUzWkL84L8zg+mffB6qRfatnM6zu3bUJH+knnVx021ZvZUz5kbRNo4RhjzfZ M5+JZFPId/OArDTFTbpLqgZr/w+Kkqh0o0QJ+ktbASPr5eE49czNY1SOLCfn94tnST/7 j9vSdftc22W5/g3XBF8ChiserBSleVYxAIHOshnEIIqjetR3giaqIJ0i8YaxWuQa7ZhF +Nx4EahuxQcQ9wdkBd9EG3F2uxfKjkOI9uFJ6RnRNDfhlGhv7G1+92Njx7Na+luNLVzK ir8E3enLPU62Js0MPSfIL44ZOvyPUmpYZU0VEi1EJIwgMg/4AGEtFzG6NUveCFLiogcJ hjDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=1QR4XjLL; 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 k17-20020a056a00169100b006281ec442absi17839499pfc.309.2023.03.28.12.07.54; Tue, 28 Mar 2023 12:08:07 -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.20210112.gappssmtp.com header.s=20210112 header.b=1QR4XjLL; 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 S229888AbjC1Su1 (ORCPT + 99 others); Tue, 28 Mar 2023 14:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjC1Su0 (ORCPT ); Tue, 28 Mar 2023 14:50:26 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EDB0213B for ; Tue, 28 Mar 2023 11:50:24 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id er13so12692208edb.9 for ; Tue, 28 Mar 2023 11:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; t=1680029423; 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=iZSVb7anGXXb5zwCrWYt7xgUpKRegbsbYrM5HxY90BU=; b=1QR4XjLLHLwM3Zmsgaw3zWAa78I3csLORy/e4VsQEXzXCtITlQVpm9CWPmkA6lEcIE l9vmq5KaRQWWkY58REzTUL7Y/u5ZvmJs1xya/EdeYG29I/YbohF5pbuCFsfRBDGYlfpa p4+KCJ7vkwLoJ30cObjArAxVzTagZEWVhWKhny11ej+ktXnisgks1Ea5bw54UXSAFUJP EZNJCkG8Zn+gP472ONOhnUlgPe0T6dvbJ34PIKUqkH13xcjMBzi1bU5dV74ngPS+pWrQ xUZz6BK/4anNdLHeDCltA0sRYmjomO3FLH8/SVTCua/HLKFTspSzgbYC2LJ0qTlNrcOp Y5Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680029423; 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=iZSVb7anGXXb5zwCrWYt7xgUpKRegbsbYrM5HxY90BU=; b=VvgJIuMXd/vrO+YIQS5ZVHWXaqjws4vIK90tSNnSq78mOStK+VuBR+R8nKNxPDTj6g 95SFUJ+zbMXVrKl8n8EhoJt2vpdlfBbHxO1aecIW4zNVVIVFV4LXM8RcYg2KcJw2qWaN qvSgCy3inpYPXzjj1YXH+5/xrupijNILuUuQ5q4/cYnqbZluIC1noNIHtiuPsRMpiSAt AAmuIQrudXjPqUce5mIDl6jYHjtueF9reWwmDUd7kgViVRwvmstCW4Wd4M9muvjFgSiW hvCcjsVVQ10JWNNzhyRJi3zL8Vtd6YQRilb4YIi7yj2cGLgoQf5g8OOJFdItFoXh75ER /4eQ== X-Gm-Message-State: AAQBX9ftdqdcGXJdARBJWsWGiA9kecmFGtwCydy+r058tnCaaZli9BVb WNokAOdSwbo44gbcASuGdo1dWw== X-Received: by 2002:a17:906:3590:b0:8b1:75a0:e5c6 with SMTP id o16-20020a170906359000b008b175a0e5c6mr17691817ejb.18.1680029423006; Tue, 28 Mar 2023 11:50:23 -0700 (PDT) Received: from localhost ([2a02:8070:6387:ab20:5139:4abd:1194:8f0e]) by smtp.gmail.com with ESMTPSA id h25-20020a1709063c1900b008e8e975e185sm15495056ejg.32.2023.03.28.11.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 11:50:22 -0700 (PDT) Date: Tue, 28 Mar 2023 14:50:21 -0400 From: Johannes Weiner To: Yosry Ahmed Cc: Tejun Heo , Josef Bacik , Jens Axboe , Zefan Li , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Michal =?iso-8859-1?Q?Koutn=FD?= , Vasily Averin , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org Subject: Re: [PATCH v1 9/9] memcg: do not modify rstat tree for zero updates Message-ID: References: <20230328061638.203420-1-yosryahmed@google.com> <20230328061638.203420-10-yosryahmed@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230328061638.203420-10-yosryahmed@google.com> X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,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 Tue, Mar 28, 2023 at 06:16:38AM +0000, Yosry Ahmed wrote: > In some situations, we may end up calling memcg_rstat_updated() with a > value of 0, which means the stat was not actually updated. An example is > if we fail to reclaim any pages in shrink_folio_list(). > > Do not add the cgroup to the rstat updated tree in this case, to avoid > unnecessarily flushing it. > > Signed-off-by: Yosry Ahmed Acked-by: Johannes Weiner