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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62945C00140 for ; Wed, 24 Aug 2022 07:50:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C5ADD6B0072; Wed, 24 Aug 2022 03:50:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C0A626B0073; Wed, 24 Aug 2022 03:50:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF94E940007; Wed, 24 Aug 2022 03:50:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9EADD6B0072 for ; Wed, 24 Aug 2022 03:50:49 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 6A0378080B for ; Wed, 24 Aug 2022 07:50:49 +0000 (UTC) X-FDA: 79833714618.30.150668F Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf15.hostedemail.com (Postfix) with ESMTP id E7A48A0017 for ; Wed, 24 Aug 2022 07:50:48 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6D03F22A95; Wed, 24 Aug 2022 07:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1661327447; 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=2rJGzyr6oBy1qZU+/Zk1WI1GzB9DJpRteFyAPs6b7+4=; b=aMpZJpSL0j6SHbTDLQ9uRdArJgkx43RjfuH7hwtRw5n6vNQ3s8Ksrlvx5uuKQVPSC1A6Ib aF/ioA5POXxE1vBpJgNBih8LLL1jAxoYIyGYPDkBWO6+ygJk+ZxL+91eD9+SH8iYwkOjf3 tKWHh1l4GA4mkpVbkI0P6UC/O0Q9nzM= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4D19913AC0; Wed, 24 Aug 2022 07:50:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 60D7D1fYBWOIVQAAMHmgww (envelope-from ); Wed, 24 Aug 2022 07:50:47 +0000 Date: Wed, 24 Aug 2022 09:50:46 +0200 From: Michal Hocko To: Zhaoyang Huang Cc: Suren Baghdasaryan , Tejun Heo , Shakeel Butt , "zhaoyang.huang" , Johannes Weiner , Linux MM , LKML , Cgroups , Ke Wang , Zefan Li , Roman Gushchin , Muchun Song Subject: Re: [RFC PATCH] memcg: use root_mem_cgroup when css is inherited Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661327449; a=rsa-sha256; cv=none; b=hPi+Z+QMd309hrRcTts6EY+h7yK05ACpAdcNhT5BrXnIhWrn8hrbTD5vRZj++tzSUrRINM NvyjuuhaMwzWAdUCbFdIfq/UbkgOEJeHvLXGSnQZf0uVbAB1eWAOaFDIxcNpUCXgU6iLZl IBJoIFPk9yHZgZxoEJPYUyghAY8s3Rk= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=aMpZJpSL; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf15.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661327449; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2rJGzyr6oBy1qZU+/Zk1WI1GzB9DJpRteFyAPs6b7+4=; b=uRzH8QRTlLDhtgXDIwELsjZ6mZ/xLmlaidaPu2YnO/it/Ihp0Mmd9EwfyST8zDWonVKqlQ Dkaayf+5uEOzzOvDYZNNcQQp4Vn2BTFE/x5VMNEttZ+VZ86xRlmxU8OqqadkbiOA1WWS7X dArhLaw1O+EVcV6bHtbXh3eNtmFWC7w= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E7A48A0017 X-Rspam-User: Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=aMpZJpSL; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf15.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Stat-Signature: zd4fz11jcufof5ycrc5th15abzf1ftnd X-HE-Tag: 1661327448-348972 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: On Wed 24-08-22 10:23:14, Zhaoyang Huang wrote: > On Tue, Aug 23, 2022 at 7:51 PM Michal Hocko wrote: [...] > > One way to achieve that would be shaping the hierarchy the following way > > root > > / \ > > no_memcg[1] memcg[2] > > |||||||| ||||| > > app_cgroups app_cgroups > > > > with > > no_memcg.subtree_control = "" > > memcg.subtree_control = memory > > > > no? > According to my understanding, No as there will be no no_memcg. All > children groups under root would have its cgroup.controllers = memory > as long as root has memory enabled. Correct > Under this circumstance, all > descendants group under 'no_memcg' will charge memory to its parent > group. Correct. And why is that a problem? I thought you main concern was a per application LRUs. With the above configuration all app_cgroups which do not require an explicit memory control will share the same (no_memcg) LRU and they will be aged together. -- Michal Hocko SUSE Labs