Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4591007pxu; Tue, 20 Oct 2020 23:34:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybehKYA9N9a6j5YeIOr6ii4Hw/fRS+sc24/rYWu+jtRK71P2oaAQMZxGAAVf3jR9rAZfbu X-Received: by 2002:a17:906:5806:: with SMTP id m6mr1908005ejq.20.1603262084296; Tue, 20 Oct 2020 23:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603262084; cv=none; d=google.com; s=arc-20160816; b=GJVRGnpK/EVoykjncmD3w5M8r7cbm3DkCCHonZk9ISrOA4UtsXdIbop2wfngtY307A OYV5CmRGRVw51jmx5qHePwFik1H+AuXCeqtUHVvU0KVCsKoFj3SGU/H6tkdlYYuwtCmI 7sNcw6ykJu4V7JVG4szs5Kti+qb/xUXKuV7n6WvEGk8pBYarnlyM4BYskFIFsouqCqR+ v1lM6Qm217kRzuUeKwJENW6I3f0/DzmAg3BMhfA5dTQPx3lYpq1p47qbA2gQ/saQCbk8 ALZpNa0pciKlEoFpEkm2yaYG2z/CPYfyHgmb01DockYeMiYf3uL5b7UfPi3pagc7jVCX 9ulw== 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=yzYcROWuVOVd8ipDDT9hgv+k46oTwcfYxWb+oVaSXs4=; b=Y6Goy+70hLBsH8Hb6d1LLKnqWSrID7Q4GWnCK/nI62rnIlo/7BxPV+4xHJS4ncIMxo 8SN9gdZIYh0gjUfBQZY11XMx4K8XX+ePwXi1vYtafGeTnpISdB7F/YliaE0fwjA4p0IL /cmLEJtgAjYtGdenxWDF9XzeRe/BfU87I+RYEF59gnThyBEJVU4hNkN08b4kVM1gs90e 1trrwb+GMxiOVBp8bHaIwQulAnlWHEDeW2BZ2EL0F+dVXH9RCVoXj69szwhvk9dciUo8 xZ2p/85sZNb4Mlf6JTqo+nzZVbtEFgpeG3Y8x/joPvupU5s+U7qDtdMDGBF/qHYH9VEc KEvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=DV8KuQTm; 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 h18si679622eji.162.2020.10.20.23.34.22; Tue, 20 Oct 2020 23:34:44 -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=DV8KuQTm; 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 S2394592AbgJTQ1S (ORCPT + 99 others); Tue, 20 Oct 2020 12:27:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:55126 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394585AbgJTQ1S (ORCPT ); Tue, 20 Oct 2020 12:27:18 -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=1603211236; 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=yzYcROWuVOVd8ipDDT9hgv+k46oTwcfYxWb+oVaSXs4=; b=DV8KuQTmR4sinkZeP4ARKfFF8Bl8hg/X3enbY0qekdkeaQ11/ycvVkPD4pXcHOdhRS3u+A oAfX1zi0UJxQLjnRh52dyEYDQwa+d9jeVM80QfpUfNmiGfRp/8xZApxEVQMtjz7vuIe8a4 /D1zbogUDlWk8Vjhce4CutBBjoNtRaM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5B27EAC82; Tue, 20 Oct 2020 16:27:16 +0000 (UTC) Date: Tue, 20 Oct 2020 18:27:14 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Roman Gushchin Cc: Johannes Weiner , Richard Palethorpe , 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, Michal Hocko Subject: Re: [RFC PATCH] mm: memcg/slab: Stop reparented obj_cgroups from charging root Message-ID: <20201020162714.GC46039@blackbook> References: <20201014190749.24607-1-rpalethorpe@suse.com> <20201016094702.GA95052@blackbook> <20201016145308.GA312010@cmpxchg.org> <20201016171502.GA102311@blackbook> <20201019222845.GA64774@carbon.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JgQwtEuHJzHdouWu" Content-Disposition: inline In-Reply-To: <20201019222845.GA64774@carbon.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JgQwtEuHJzHdouWu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi. On Mon, Oct 19, 2020 at 03:28:45PM -0700, Roman Gushchin wrote: > Currently the root memory cgroup is never charged directly, but > if an ancestor cgroup is charged, the charge is propagated up to the s/ancestor/descendant/ > The root memory cgroup doesn't show the charge to a user, neither it > does allow to set any limits/protections. An appealing claim, I'd like this to be true... > Please, note, that cgroup v1 provides root level memory.usage_in_bytes. > However, it's not based on page counters (refer to mem_cgroup_usage()). ...and it almost is. But there are still exposed kmem and tcpmem counters. > To avoid multiple identical checks over the page counters > code, for_each_nonroot_ancestor() macro is introduced. If the assumptions behind this patch's idea were true, I think the implementation would be simpler by merely (not)connecting the root counters and keep the traversal as is. > direct ascendants of the corresponding root memory cgroup's page s/asc/desc/ ;-) Michal --JgQwtEuHJzHdouWu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl+PD90ACgkQia1+riC5 qSjDuA//Wm7T97tLWHY64gjWUvx1R3ROAlPEceShGwKYdOE93BUbmeIK33gh+JlF XS9K7//xLTozIipTH4yA0+Yo+8WaxvdE+MCBSKjyzTGCs/YlZRcVUZQTLQlXztVM +jOOnQ49nznWYrbsPBh16/FzHm/MYAiZk4ZZXlZtbGzKemH+bwkPfy/E5XkxlFm7 EFqagyTdT53oaec7llA85f0O7RHZzHbfiWQx3LVBi21cEtf/Drui1gNjlRP5Q2S0 qz2DgfKBhUgOhtQa2pFznJtQTtjNlPYaP7XLL2HiXDjHgN+S+q/Z/yZuYYRjZdyL xy017aWL24RCCtHqOmS58/i1yPGAraxVl1SJnL+0/6Mib1/7dT1XvnNqW7HzrZxW WKZihtdr2Zgaj9i+gJmc3QUdHiGu4TFYYM2VYwSdEVGoD2oqWGn19XG+oo7Zwold mnJc6Gc6/ASNnVuNsukqoTbkT66pOLL7JFqK8ehsVH+NEfIDmElAykEvBbhEIiIu mqeV5H0GztrQ1FQsq99Ov43bbO/acdgcFi3SX0/XCWQK4G5rmtWYFj40fsuHfYVX JUgjPa5wGHXd/pmKrcrodA0FRhBJSAsEVDT9AzzVEnU/TnDdMmYz123Fgh3fyLr1 BM2eBYT/iM4b9F5f+CHQNNQfKaHdtLdvtUwt/H2JLq/eUtySExk= =xnZY -----END PGP SIGNATURE----- --JgQwtEuHJzHdouWu--