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=-5.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 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 845F8C63777 for ; Fri, 20 Nov 2020 17:46:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EFB5E223BE for ; Fri, 20 Nov 2020 17:46:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="QvRl43zJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFB5E223BE Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine 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 3D6656B0072; Fri, 20 Nov 2020 12:46:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 336086B0073; Fri, 20 Nov 2020 12:46:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2247F6B0074; Fri, 20 Nov 2020 12:46:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0027.hostedemail.com [216.40.44.27]) by kanga.kvack.org (Postfix) with ESMTP id DECDD6B0072 for ; Fri, 20 Nov 2020 12:46:25 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 815F7824999B for ; Fri, 20 Nov 2020 17:46:25 +0000 (UTC) X-FDA: 77505525930.05.fold53_25035d52734d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 5C2AC1826B6B9 for ; Fri, 20 Nov 2020 17:46:25 +0000 (UTC) X-HE-Tag: fold53_25035d52734d X-Filterd-Recvd-Size: 4453 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Fri, 20 Nov 2020 17:46:24 +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=1605894383; h=from:from:reply-to: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=05hfz9UibGY8EhxM5vF9mb80d6tYqyKPBz9VqyDSJc8=; b=QvRl43zJlLeKUsGjBxQf6ne5Uw3/1C0Qtmn7HmKfQ6WlxIaJ1KwpHKuoXqb59U/vVgsSGw Kvq+ousxPqvyiTvY4EOatnAvXVr//wSqIjGFG+vW58+WrFpPb5cL1gnd52E99PUgUPNQZb Xr1YJH68aRUOOgBvonHANFW6d9UU33Y= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4C3A7ACBA; Fri, 20 Nov 2020 17:46:23 +0000 (UTC) Date: Fri, 20 Nov 2020 18:46:16 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Shakeel Butt , Roman Gushchin Cc: Johannes Weiner , Richard Palethorpe , LTP List , Andrew Morton , Christoph Lameter , Michal Hocko , Tejun Heo , Vlastimil Babka , Linux MM , LKML , Michal Hocko Subject: Re: [RFC PATCH] mm: memcg/slab: Stop reparented obj_cgroups from charging root Message-ID: <20201120174616.GA94676@blackbook> References: <20201016145308.GA312010@cmpxchg.org> <20201016171502.GA102311@blackbook> <20201019222845.GA64774@carbon.dhcp.thefacebook.com> <20201020162714.GC46039@blackbook> <20201020170717.GA153102@carbon.DHCP.thefacebook.com> <20201020181822.GA397401@cmpxchg.org> <20201021193322.GA300658@carbon.dhcp.thefacebook.com> <20201023163053.GB535375@cmpxchg.org> <20201110012758.GA2612097@carbon.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: 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: --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi. On Tue, Nov 10, 2020 at 07:11:28AM -0800, Shakeel Butt wrote: > > The problem is that cgroup_subsys_on_dfl(memory_cgrp_subsys)'s return value > > can change at any particular moment. The switch can happen only when singular (i.e. root-only) hierarchy exists. (Or it could if rebind_subsystems() waited until all memcgs are completely free'd.) > Since the commit 0158115f702b0 ("memcg, kmem: deprecate > kmem.limit_in_bytes"), we are in the process of deprecating the limit > on kmem. If we decide that now is the time to deprecate it, we can > convert the kmem page counter to a memcg stat, update it for both v1 > and v2 and serve v1's kmem.usage_in_bytes from that memcg stat. So with the single memcg, it may be possible to reconstruct the necessary counters in both directions using the statistics (or some complementarity, without fine grained counters removal). I didn't check all the charging/uncharging places, these are just my 2 cents to the issue. Michal --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl+4AOMACgkQia1+riC5 qShDDA//VKPWDCNm70dyHIeZkqaD/EqDTDbcSYSs+4zTlOnYg4Mf1oahYAuZJR9i 5UwJwvyNu7zDQJJb2wGPBfrhWnc8LMJwKuedjWYUhZnm1mifdL1/4eomL/B6UdhI qjaWI5C+NCc/Yvu4tjTDvGwJvQsRNlEqHNvlcU8Lq6xhBO0+eFSm6LClcbLJDpC2 lMNHkcIlyA7la+dDkOJGQ798tbZUAeIaBaj6v/cmWP4By9QZFLctIIFuwZVE7zUY irzTx2B2zeVXpQDdkriRG/+WtQRmAYvhcgHuhCORDJd2Ue7gYD8ShD+Z9zTdbkHH OkdvZ7vQ2B3Rf/uoiOU+Q4Mk9qmlpLlYWHlTvvQaOcFSvx37FDWVsZRE2vTjI8PH 8/pji3Qd27cGLzqlsWbNFPGcz5mouoLMV5M5FfpPL5tzTc+CrONmgRv5SOW9ID8e EChWvp6sVrU2hiSZ7EODR3c1OsntR8GxVZGeJJL9YJO6H6FPW5m88oGTpXl07jUh bYlZPdmD4F3ar8kP0acD5wDqQhRaz2Ryj+37uV+IdmVS4br26bUf/jgGQ9Vj/4Pa xypvUHRP6DRxfytu20OEbCa8e9/kI27MAjRVOFX6pUrfAu5tf0zjlvLFBFjBlaTn 2Mr2wJn3VO8bOToSzu/JLlIqGN2F1oya9KQqmZSRKUGypR3qQv4= =tHCs -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N--