Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp28750rdb; Fri, 29 Sep 2023 15:29:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDdxbQmwmxGuNa65/Ao3moliisDdmPDL4PMzI7e1PPODeemi5DRrZJ834VYsfH2s1UcrZ1 X-Received: by 2002:a05:6a00:b49:b0:68e:2d9d:b0cc with SMTP id p9-20020a056a000b4900b0068e2d9db0ccmr5676700pfo.6.1696026566670; Fri, 29 Sep 2023 15:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696026566; cv=none; d=google.com; s=arc-20160816; b=ks9Sh6zCoJzx9lo/qRQrT+naJe3Sg6H5Oq7YDZUdblbbaf4uuM2lP7AnlDatG728mQ 6F0cH2F8X2D9LkF3E7M4L5npgtfekTqwvmRuXMQNhSPTV2UXVdlEISPdumrSJEDNG5Cb +oERS+194kfZyXL2aIG/TIT2p4+jmzvSdTeD5FimAjexTVMIe+9fPRVT8Sl+tZnq8hkY XTTl4IrFEkVLEzGznToX/vQ7NmW5fL9lKbdQAFd/HlytClEQhacekX1bezXB9hZ0fs7Y mPNg4KiIbCvCVKMrCxrLp3wepVJ/tjySCVuoLBbKktg8YtMtksevhoz2L4zLFCMKLQRz F0mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=B9pPpA5pmuFeJG1c7aMaJvfIq7FGjwIYQkXGwJmZbUA=; fh=iuOdG2UsaRKUpHOR3B0vXOw1fow3AOmqKEKZ7KuRmaE=; b=M4YNsGGvAGyPYNZ3hd6ckmlCLVYuNRO/JhbDN89kvMLJ2w3PXpr8AfVH1qd7FRRFol bI2tjc9xmIBRZJ7QiF93lnVNU4YLVCKngOPt79iC+jxJU//i4UAn8ykx9iANz17ePAKO 2YMoUXI7hIrY/3ey0eDsFPH7A5crZWPFhdzqFOdDV/G2dUo2wzM2g0pJag4idUY5PV15 stlBKb2IOU01omL5EXkk4XmbsujFjjZXOmEEJPrv4R5p2bu3EIJA4JCxJBE2d5sfVGsw rsdKSnkC2sRAVmq+Qlmi1xqeeOwSFZdJOahtTYYx3RyWiD2K1sxlmsum53ft0hHf2Vv2 aUNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HkgbPhF5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z189-20020a6333c6000000b00573efae0ee1si11289562pgz.515.2023.09.29.15.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 15:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HkgbPhF5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A474A83421A4; Fri, 29 Sep 2023 11:19:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233552AbjI2STV (ORCPT + 99 others); Fri, 29 Sep 2023 14:19:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjI2STU (ORCPT ); Fri, 29 Sep 2023 14:19:20 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDAEF136; Fri, 29 Sep 2023 11:19:18 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-7a269637b98so50901839f.3; Fri, 29 Sep 2023 11:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696011558; x=1696616358; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=B9pPpA5pmuFeJG1c7aMaJvfIq7FGjwIYQkXGwJmZbUA=; b=HkgbPhF51lRc1kGEbl99BlqZiZSG24w3ozbDP2HimnIXK97DY9+Sd9nm9y+MFnU5or L3/D974vga2P0ziZAycgwEyODBY6A5qjxnAf5h67wiZc0Diri+oFb5UqnIQgq3p6QWMz LtTicM7CVSSXDjbz6LSQrH3tTkZElYwaNplvg/5Q/ldCzWt7KEeEyVg+Hh8JXnVJSPRv xPBjMGWmZfWjMVu1ZUXu+M4MHyVl/d+TAsWuXxPosU6X0oPOV0k9A+kHgHqvGuWnoy78 27jiBmiPiicsOB9IOJV+JkuV+hDI1Iq5mYwCn/tB5GvIAOz40v4QdYwMbNWQhKzNuMgE OehQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696011558; x=1696616358; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B9pPpA5pmuFeJG1c7aMaJvfIq7FGjwIYQkXGwJmZbUA=; b=H4d7KLn1HVNxhq0LAvjY1/iEFySKPwFLmnRlhO71I2B1twqe4tU5CdsPL6hBhK0no+ Fe1HdMatjK6Lxz8UGMh03mqi+oXbfLU8Ja4heE7+i7pAbuJmNqfTA6YmfXOMkEQu6F5C FgFdEGiBHSCTG6ecfPX0WxhKVSiFXHYFXE9j7CJa5QUTBUL3UfXdOwDOIa1x2y/ov+PJ z0I7BYro6me8Ix9OKQdKVuZo8oN1Unq8rG6VEi0Xb6B7yq1uubuKm+itAiwZMu68lfUv 0owkyOCtKo6tvW7zZ/K5YbZAfM8T3pEBxQdDOe8kK0+2vS7eRRDO2KUVIztIkzwqwUlz mAdQ== X-Gm-Message-State: AOJu0YwCe+2xsuuc9ja2C+0YmwSlqDcTvJx+g2y6GSJi0tMnvCc28I1A 1EZ4MQghc7BzLkd5Rdp3Zvt2/UIVwgfz9hBhUOI= X-Received: by 2002:a5d:9cd5:0:b0:786:2125:a034 with SMTP id w21-20020a5d9cd5000000b007862125a034mr5565463iow.18.1696011558176; Fri, 29 Sep 2023 11:19:18 -0700 (PDT) MIME-Version: 1.0 References: <20230928005723.1709119-2-nphamcs@gmail.com> <20230929181712.3723495-1-nphamcs@gmail.com> In-Reply-To: <20230929181712.3723495-1-nphamcs@gmail.com> From: Nhat Pham Date: Fri, 29 Sep 2023 11:19:07 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] hugetlb: memcg: account hugetlb-backed memory in memory controller (fix) To: akpm@linux-foundation.org Cc: riel@surriel.com, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeelb@google.com, muchun.song@linux.dev, tj@kernel.org, lizefan.x@bytedance.com, shuah@kernel.org, mike.kravetz@oracle.com, yosryahmed@google.com, fvdl@google.com, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 29 Sep 2023 11:19:29 -0700 (PDT) On Fri, Sep 29, 2023 at 11:17=E2=80=AFAM Nhat Pham wrot= e: > > This fixlet disables the hugetlb memcg accounting behavior in cgroup v1. > Suggested-by: Johannes Weiner > Signed-off-by: Nhat Pham > --- > mm/memcontrol.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index d5dfc9b36acb..de6bd8ca87f5 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -7081,6 +7081,7 @@ int mem_cgroup_hugetlb_charge_folio(struct folio *f= olio, gfp_t gfp) > int ret; > > if (mem_cgroup_disabled() || > + !cgroup_subsys_on_dfl(memory_cgrp_subsys) || > !(cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTI= NG)) > return 0; > > -- > 2.34.1