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 96E2AC282EC for ; Mon, 17 Mar 2025 18:06:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4EF84280003; Mon, 17 Mar 2025 14:06:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 477C4280001; Mon, 17 Mar 2025 14:06:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31A96280003; Mon, 17 Mar 2025 14:06:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C7CD0280001 for ; Mon, 17 Mar 2025 14:06:39 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 7967714049C for ; Mon, 17 Mar 2025 18:06:40 +0000 (UTC) X-FDA: 83231823360.17.050FE45 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id 5B3AD16001A for ; Mon, 17 Mar 2025 18:06:38 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=W+dYsHh9; spf=pass (imf08.hostedemail.com: domain of tj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=tj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1742234798; 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=2ut14SNOHpxLKBSTmfpwCiNakOhkfIbQ8JnNUIf9988=; b=Uhi3Yyyl/eSbnQm2S8vW7kKwh/O2AHVJ2BfB/3W9GyYpu4UfnErGW2WIxCPFawfDHLlfnz cDY7pqUc74vBqppvEATgCFD02cPR1cTuxrpr3J1BR1DmNcFxxHg3NZfhkIhmXJzc6gygy9 yrsShjPlEEkBYWStE1qiD7uzfo+PcMQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1742234798; a=rsa-sha256; cv=none; b=Sh5Gz4sN4toAGw7Kb6et9Gbk7nJBkRcBNTqsM0VgIT7N6JH9M5PP9V2xVsi6eQm03BwAd1 Y3znYBW23Mt4RrmkCnQuvfDdTBgpDzNzntfNrWTcT2KAacuxsMFodaKJr2IL2DviEsaIsv nKk/+V0VFU6AHKsMXwiBbKtKJRFIKB0= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=W+dYsHh9; spf=pass (imf08.hostedemail.com: domain of tj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=tj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 4C6BD5C432C; Mon, 17 Mar 2025 18:04:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF80AC4CEE3; Mon, 17 Mar 2025 18:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742234796; bh=3FLdo26mXFwYCtlVIqVJamLtyOrQ6/YoNDApinu0c5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W+dYsHh9wo7womLXuX6t5hh0KPPV9T4Z57nDlJ8971VF7ZWq6Y1BAv/Joo7yxVi5e CwozsDgyYIJGEpAExb7JdjQglb6SJPJg1/i5+ZyjiLJrNHvX4R3az1MH/jrneSR2qu IgBY3GaB2U39GlIwSs8xKdFKimtXCk8G1nB203sa8RSkMN0bIMwdYNAR6UqgoARXnO TQ0D9uju+8vsfIpNAhmhqiSgL1L60lu89IU5GWvL8QuUCY/Zw3AEsrKeu/hoa+krT5 ERjZXqBNPFaOtAewvCNuS2NejUzdXgJZr8EEiN7c9Xo/ixhT3ApnSs9ZEzknSxBhpL DB3bb5/qJLkGA== Date: Mon, 17 Mar 2025 08:06:35 -1000 From: Tejun Heo To: Andrew Morton Cc: Johannes Weiner , Shakeel Butt , Michal =?iso-8859-1?Q?Koutn=FD?= , Roman Gushchin , "T.J. Mercier" , Michal Hocko , Muchun Song , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Meta kernel team Subject: Re: [PATCH] memcg: add hierarchical effective limits for v2 Message-ID: References: <5jwdklebrnbym6c7ynd5y53t3wq453lg2iup6rj4yux5i72own@ay52cqthg3hy> <20250210225234.GB2484@cmpxchg.org> <20250227035155.GA110982@cmpxchg.org> <20250316181214.704966dd41abccab249e11dc@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250316181214.704966dd41abccab249e11dc@linux-foundation.org> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 5B3AD16001A X-Stat-Signature: bcsjh4y3xsso6f4nshyd3qad8b75tujf X-HE-Tag: 1742234798-705082 X-HE-Meta: U2FsdGVkX18/Tv16wglbQWm0XJF9UU6a93rSpWD0th3VhrIpCC4k0u4RtRkQJU7p7iWf6T5YZcF7eb5PVviW8W/7oBL/UjvkyETSsendKJhqh42hBONwN2T4DNcpr2BZSdZezmfB7hwbTTtCE+4Xgthf2rSCLNuP9aH/5jAgbivDsq5oLDgCgnC1F9K11q5Hs9sISEGPhfcNTatyMnn/2xIa2rVJ8JrnKaH3JMWrpcBebz9bv4sk8N2dLkAzDHBztEJxG0DysRMlNy5TVDTm/iPxJ+NukIHuCoDuj6lQukbkA/lXxkRpFTrB9zAj2ZsWkzizPFch3Z5z/d75lFTsmDH1EuH1ZnQ1WPV88H0nTdQwqdtxItOypi0zOm51BgDFEmbxIsYxHOoS2xm3KOHkVQOAfPOIcd9nfw1SLgKPF99x65+V9g9CTo5hzkhDNoS4PSqh4ze6tbk8B9aNPkd+Pogw2WHZufNVkjo9mGCGoYNM+hYpOVL7+CuNqTvLFYmod36Pdn87Yl3is/1zkVdNHNr6NYhNrUo5P0PYko30j9qnaqwcxOeg5cPoBR6Lm8vwa9uz729WmknUQQ0l/eV/pXxB1YSBhArOR2Uu0pka6NThvJLbMJbuvssrn/6iX8cdDW5w+1o5NQspghs8KFVv6BtnidJBb/wT1z5IkGt4GxYwSYK65UVooonNVauDmptCiq/QQd5v/Jopz+glMHvPcIJ/dXdhD8cfFHWGEsocJ/3JnrH1Pg9U7XuhzwaOJCTklg53Dr7S47GDlF7fVlSTMP7af/iT6f7C0RDZGloopiyWXQwsTDhlRzvpwcXEL7JtDIeB8qcJj0yYOHWe3ytDFVLwDNig2/rsXg+dUTwFyXG73H1BU5qorzQap4Hgv1ICOd/m03MyQhA/OsT9yKQbB1Akv1faI2WaKOviohKnSORYsRnEdYMhA+P5zm2e4RLsauQSwydkFv2a0JvkUTB jwbrJBMb iJWn8vX0QaHiN2Yllx0X4jeHa2ioW6XuQcAHfkKRinyN7hk/hoXtXJl8nghtTPt9KeC/Ujb1MA4IrzOhTX3n2vxM6ULEh0ebYywSWXMX2LJdtj0WRCO2cmfVS6/fFPNUArv/KDJsH36nHTtMEz6gdQ69zZ2oNlYySy7w5cHBkfyGEbeZDv8pJhZ4tZxL29Pbvwu1n+EA8aUDLhC0aVwSdemG7Ikf2Id0dqVmCL8Bswn2K335xd9leOxkphhDivvB/LEtpNdlb67avGu4X+nc8uhyskg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hello, On Sun, Mar 16, 2025 at 06:12:14PM -0700, Andrew Morton wrote: > On Wed, 26 Feb 2025 22:51:55 -0500 Johannes Weiner wrote: > > > > > start only with memory.max as > > > > that has some usecases). > > > > > > Yes, I can link [2] with more info added to the commit message. > > > > > > Johannes, do you want effective interface for low and min as well or for > > > now just keep the current targeted interfaces? > > > > I think it would make sense to do min, low, high, max for memory in > > one go, as a complete new feature, rather than doing them one by one. > > > > Tejun, what's your take on this, considering other controllers as > > well? Does that seem like a reasonable solution to address the "I'm in > > a namespace and can't see my configuration" problem? > > I guess Tejun missed this. > > It seems that more think time is needed on this patch? Oh yes, I did. My apologies and thanks for the poking. I'm a bit doubtful that simply compounding the configured values and presenting them to the nested cgroup would be a good solution here. It does add more information but given that the same values can indicate multiple widely differing situations, I'm unsure how much value they would provide. Wouldn't it be just providing more numbers to be confused about? My intuition is that most applications would want a single number to base sizing decisions on and I don't know how they could handle the gap between e.g. low and max without further information on configuration intent. If someone has to provide the configuration intent anyway, why not just let them provide the single number that the application would care about - the intended memory amount for that application or container? We can provide a dedicated cgroup file for it or admin can just set an xattr on the cgroup directory. Maybe the xattr perm checks can be improved so that it aligns better with subtree delegations for the latter. ie. I feel like .effective's are us trying to do *something* even if that thing doesn't actually solve the problem. I'm not hard set on this opinion tho and would really appreciate counter arguments. Thanks. -- tejun