Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1474512pxu; Fri, 16 Oct 2020 12:58:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjEp3de6lyHyq/no5WucLLWt8GmCW7p7iUjOYC/NQ25pmW+tUP7ePQZEiBUkm/ATyBjZEA X-Received: by 2002:a17:906:38d8:: with SMTP id r24mr5690356ejd.32.1602878288505; Fri, 16 Oct 2020 12:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602878288; cv=none; d=google.com; s=arc-20160816; b=IErzMbv2K5ipkjMlXqaBS2gYEsE/JYqIJzzvD35MM2dlldCEqLvVnqmw7T9p06wIZ6 3wqMcOo9FTUZi9msq5e3FLN16zUiE8BEk/bNZLDlfl2jTq/jG/s/eP7FFa6utEhZ/Emg vrhgxOisYbF5ZJ48riwAY3bT+U21JWrLlUprmvPvEwzNKiY13TLsIIAIko1BcRIA6mmw vuOs8I3ddyqNC6spLcLmv57Tg6+LK84PwgY0CUW5xd6Shwrbwoy0Y6mLK09CzlTV1sHf CPFQI/P2WjZAF2u9mwtYtrrj72gCjwDkj7lIewnDeFkw+jJ6GWAMHgKHxtJq2lpwfUIw nUMg== 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=mFbdqeNtBNjHicVP7D22X8dVYCOccFrfnE1MEFdmE4Q=; b=Uj95sMGgsH253/AvbRC7ey1OVz23pZr73I17qYDKgESDpnnearXhUPK8VUc1xrKVp7 IZX1W6AUozzPR0kBMWddnaEPcobXjJqEaRZ+6ci/T1UbjfTq8aXGc8ZNdUOfTpkmIdV+ gsexybvVjbi/Nh49oDWZg+UtCl9RuO51vAGrlHPPB4ok6nwFSqWqszhGdE25BWVh50F+ wErEoivcIR2f7Em307wJDU4uVl+Yy1QIvMY2p+uQ9Fg5iT4PsT+r+KA3QEKt3hkzSyju mV/9XjuMwBedneLVDmU2ZRM/AlV2fGeOZkGJHNSbZNUm02vLg++NUtakcGg7ARZqBX9E uJ7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=XxTbbwgh; 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 b29si2417061edn.354.2020.10.16.12.57.46; Fri, 16 Oct 2020 12:58:08 -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=XxTbbwgh; 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 S1732596AbgJPRPI (ORCPT + 99 others); Fri, 16 Oct 2020 13:15:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:56544 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732591AbgJPRPI (ORCPT ); Fri, 16 Oct 2020 13:15:08 -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=1602868506; 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=mFbdqeNtBNjHicVP7D22X8dVYCOccFrfnE1MEFdmE4Q=; b=XxTbbwghhHpophO+3RjhXcyLzig0YGtPJto1PjCXVaIqqRh2BMY7/wsbkhZKeJCHEcIUlr tcf9Z+eMHuNLVBv4mAlx6kN1UhYmgqBn0fvhLzqWmmln0ig07f3Z4APC6JQQtoHyV5J0MX mmLtn8iRvngf4JSjLM85IlwvLtUGl6E= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B5266AC4D; Fri, 16 Oct 2020 17:15:06 +0000 (UTC) Date: Fri, 16 Oct 2020 19:15:02 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Johannes Weiner Cc: Richard Palethorpe , Roman Gushchin , ltp@lists.linux.it, Andrew Morton , Shakeel Butt , Christoph Lameter , Michal Hocko , Tejun Heo , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mm: memcg/slab: Stop reparented obj_cgroups from charging root Message-ID: <20201016171502.GA102311@blackbook> References: <20201014190749.24607-1-rpalethorpe@suse.com> <20201016094702.GA95052@blackbook> <20201016145308.GA312010@cmpxchg.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <20201016145308.GA312010@cmpxchg.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 16, 2020 at 10:53:08AM -0400, Johannes Weiner wrote: > The central try_charge() function charges recursively all the way up > to and including the root. Except for use_hiearchy=0 (which is the case here as Richard wrote). The reparenting is hence somewhat incompatible with new_parent.use_hiearchy=0 :-/ > We should clean this up one way or another: either charge the root or > don't, but do it consistently. I agree this'd be good to unify. One upside of excluding root memcg from charging is that users are spared from the charging overhead when memcg tree is not created. (Actually, I thought that was the reason for this exception.) Michal --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl+J1Q4ACgkQia1+riC5 qSgPXxAAlksCkqR8l99ZzFc6f0VtH0koSVgI6EMj4AI/sNjao5oMhMkmB5UWFJVW kxFvARHCJ0JShOiEB3lk2VEPuebsvzOUeeTixyyLs8VyFXUwq5WryvJPmbvq3AoI 3kaPRv6vO+pUldVVwA/puWX9V2yi2eNM3Qrn7ibjfWnRc0f2oP6VB6zJAIDeU4gU vKkmYiOmPIPNWp5Sn+IoH0qWqhXJHMykw7F7YdIQNfvCcDU2RFVAmHqhxm40noI2 Ke6oBTqCD5esJpf38Qx6+DYkYrGZ8Ehbuk0PYFrBMz3oLhRUB9L4LdTOZmkIBLl3 sGWAuOQ1k8cmngSuLkiDgO3/WDHkFMKgXoBMz+hWsUmWaFRdctyTahCEIVTj+v6K fm3brShqrVWKjoF9EcHpFy4iC6fyBl1TUn6a0yo8/V6EOMwjxCYzH53FFZj996V+ VUg/MATOqeAz38xWgomfwb2Sw797ueue4Cv+YM1CBXCQNC3koDlxT58u6VlG+T4J +xNlvWILhqXxXuQdJ8a0LTf2KWSAiaFxy59EnVIHY3NKLELglS8yN30EJJbyW2cu KTajMd5yitZSxkNyrwflOdmeBQtBv/MgvtfyM8YzMQF/Mt8J6AtH9WASMUNtNvKC qlJ5hRkE3xbMdwIVqThcyGbW+F32fSj1/dmOAMumYGh3U8gT584= =FgAq -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z--