Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp548861pxx; Thu, 29 Oct 2020 08:41:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcBI2zYKYPs0Dv/JPTpPNjLbxjokOA3s5Ukh7bABzTlMgYDr+aZ+9W5QHaLMIhMADZawhn X-Received: by 2002:a17:906:c293:: with SMTP id r19mr4460438ejz.63.1603986071661; Thu, 29 Oct 2020 08:41:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603986071; cv=none; d=google.com; s=arc-20160816; b=w4/fvxV7LEVfC/dMnYmdJa7sGOpsyjfWVH5vJkyQ0kiq/IigwP1aN7Ru4erull+JwO gQAdHmik3VERQdnX1jMEIPj0odU6ejBhGkWVmMufZg474xS2DFuduA7hk+PvEEXfAdIv TvRMRkS7p7PdG0BLJE7K5YNYEgP4U1JeDtImXyzfWdARYPxq3Jr2kBW/sU6iXOfdEQsU cJwhEWJrGE9w9Zi+gaMkucBBBjjdp39awZQQ0yNhtJaOGIGr5ZYg0Lv8hsiX3K/Aehgr Ps2Q7rJ7k0ZcbsWkbCFoK08YHcNExfcj84PalXwuB7wpblac5KLljO/aSZvYHh2cS9ro J0ow== 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=47PdL2vSj8GaMm5B9GKdrojmHctd//BKwcYIBTeFsLk=; b=WrN+aIn0u9y1N+mT4DIMZAvL4fuKnA2pa2SzDleteEQUhh2kAjQ9uxEXref4Iks5Ju 3JwhMifjOt3uZZDk7s2/SdU7sdzopCgQjWPiuvBeNK/TJRb/9Jz+PuQaF+sRxNslytF+ 2VwK87HVf237cAiTwXostemcbhN6LUbf5jPHA79tlGWYj7Jo/v1U9Ojb/i/dum2BSzXl kblDo+NE1yyU0eLYo0VEsRbe1Hh8WE53W1Y5OX/azndreBj6EaUrYsn+LNXtWH/L1UiB nvCco7yGADLmLonvTlA6rxlUbbeKumsQ1v7rUgGmFObsUMDutm07umcI68p+YAoTbxTY kuKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=YrtUPBFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si2087740edv.66.2020.10.29.08.40.49; Thu, 29 Oct 2020 08:41:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=YrtUPBFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728437AbgJ2Pj1 (ORCPT + 99 others); Thu, 29 Oct 2020 11:39:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:35650 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728420AbgJ2Pj0 (ORCPT ); Thu, 29 Oct 2020 11:39:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1603985963; 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=47PdL2vSj8GaMm5B9GKdrojmHctd//BKwcYIBTeFsLk=; b=YrtUPBFel0gpSL/B9Cq1VE4szKaFL/c7muxY+vXdCyqmnWirrHHFD8voW9YVCFALDh42N7 FrsejlmMaWqoKREhTxj3cMwKr8uplenuXhdRmasBJSckkc6v4Mdb2l7iv9TQFfq/LPL7Di elDFxV6HjAYRIpGwvtw64P7iOdsupLQ= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9FCA0AC6A; Thu, 29 Oct 2020 15:39:23 +0000 (UTC) Date: Thu, 29 Oct 2020 16:39:21 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Roman Gushchin Cc: Andrew Morton , Shakeel Butt , Johannes Weiner , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com, ltp@lists.linux.it, Richard Palethorpe , stable@vger.kernel.org Subject: Re: [PATCH v2] mm: memcg: link page counters to root if use_hierarchy is false Message-ID: <20201029153921.GC9928@blackbook> References: <20201026231326.3212225-1-guro@fb.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2/5bycvrmDh4d1IB" Content-Disposition: inline In-Reply-To: <20201026231326.3212225-1-guro@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2/5bycvrmDh4d1IB Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. On Mon, Oct 26, 2020 at 04:13:26PM -0700, Roman Gushchin wrot= e: > Please note, that in the non-hierarchical mode all objcgs are always > reparented to the root memory cgroup, even if the hierarchy has more > than 1 level. This patch doesn't change it. >=20 > The patch also doesn't affect how the hierarchical mode is working, > which is the only sane and truly supported mode now. I agree with the patch and you can add Reviewed-by: Michal Koutn=FD However, it effectively switches any users of root.use_hierarchy=3D0 (if th= ere are any, watching the counters of root memcg) into root.use_hierarchy=3D1. So I'd show them the warning even with a single level of cgroups, i.e. add this hunk @@ -5356,12 +5356,11 @@ page_counter_init(&memcg->kmem, &root_mem_cgroup->kmem); page_counter_init(&memcg->tcpmem, &root_mem_cgroup->tcpmem); /* - * Deeper hierachy with use_hierarchy =3D=3D false doesn't make + * Hierachy with use_hierarchy =3D=3D false doesn't make * much sense so let cgroup subsystem know about this * unfortunate state in our controller. */ - if (parent !=3D root_mem_cgroup) - memory_cgrp_subsys.broken_hierarchy =3D true; + memory_cgrp_subsys.broken_hierarchy =3D true; } =20 /* The following stuff does not apply to the root */ What do you think? Michal --2/5bycvrmDh4d1IB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl+a4iEACgkQia1+riC5 qShc2RAAmjtCmuIa3ZwnDGZzw0oV6CtPxW9sj6/KFmioBPpQRrUGlRnoSN5jqyT2 yEMHbsSKl/TE0f/avpNQNNeEvqkdoUFdl89eSCh2Fwt90S8GgDyJZcOnWxTMc3pg unhhXqB1xoD2qPmIRY31jf9j1za/d4OfDdJK0jUrgLhClnos9eF5i0IKwIaAY79f VIeyWDuEMe/CE6LVBiomObarQK7PUETE2jfYcXAdBzEKfudbINDE4yeV+DzJ4ZlK bv61oAW+0D0oJTP+V9JCXORfgLgnNObNCP1BBcayhl1bfQQ5bGbuipDYJAriL7Ce OYjUC8H3VEfBcALEsZjFmxWRNJkYxupjIeX1CjaRncBmXC4uuFrEKdwsdRWeIiW0 FyvzuDUi0LiTd7lPN9R0yWehwoqGvb1ES0l2X3XGzTzXprZPTOgLNz+MyXfn4x1d QqiP27paN+TGgW/Oa1846nwKTgwG35RAvxuheP2ZcyYGbcEJOKx1stld1EuSOGob JINTltj2rwk/yHO4XVz5ptyOG/HAfokyPwGTiC+bJrl8ipmueFkq/mEYYsUVrmbD TtQXNjSB1EW6cS07aAw9mEj6XnJ7B9NJY2MSKv895wXDNelXmC+dYeTJQED9vVIP yPyo/1wcbERct2ojN4BYFNYW/66EfGoFnFowOAsaCMSBjZPh4x4= =I9HI -----END PGP SIGNATURE----- --2/5bycvrmDh4d1IB--