From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E14C7C433DF for ; Fri, 16 Oct 2020 17:15:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 35E3A2084C for ; Fri, 16 Oct 2020 17:15:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="XxTbbwgh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35E3A2084C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 65FC86B0071; Fri, 16 Oct 2020 13:15:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 610146B0073; Fri, 16 Oct 2020 13:15:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 526D06B0074; Fri, 16 Oct 2020 13:15:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id B1D666B0071 for ; Fri, 16 Oct 2020 13:15:09 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B7007180AD807 for ; Fri, 16 Oct 2020 17:15:08 +0000 (UTC) X-FDA: 77378439096.08.death26_07137f02721e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 972381819E76F for ; Fri, 16 Oct 2020 17:15:08 +0000 (UTC) X-HE-Tag: death26_07137f02721e X-Filterd-Recvd-Size: 3688 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Fri, 16 Oct 2020 17:15:08 +0000 (UTC) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --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--