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 060CCC3DA4A for ; Wed, 14 Aug 2024 21:49:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 86AFB6B00A4; Wed, 14 Aug 2024 17:49:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 81B686B00A7; Wed, 14 Aug 2024 17:49:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6BBF66B00A8; Wed, 14 Aug 2024 17:49:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4BEA16B00A4 for ; Wed, 14 Aug 2024 17:49:09 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E879D1C4C3E for ; Wed, 14 Aug 2024 21:49:08 +0000 (UTC) X-FDA: 82452191976.04.5B76EE3 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) by imf12.hostedemail.com (Postfix) with ESMTP id 1CCA340018 for ; Wed, 14 Aug 2024 21:49:06 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Ejs7FKlZ; spf=pass (imf12.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.170 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723672076; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Bfz+tInBoeolRrtoXPsGQjhjRpHjQBGUo7rwsFTiXqA=; b=d5UQQs954Y+LLm6C2kEDHTrelBwS30b02GY/Entk8ajkMptZgiXoptVf691D001igDWOcD aEKWD7T8iTFsTkoNCA51GHqHyHJab5ZbzxhByRiyyiUlNQOpcwFFOGIoL6AE/hrjJ6y+aP 8UYCa/Fsugcy3rY75YyjE6dFP2qPH6k= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723672076; a=rsa-sha256; cv=none; b=vWHg72OgkgEslSJsEzxj160Ht0JNtdVhonlnfmi+c7uj64m5lmLIhqdIYD6F8RfOTqmIZO Vd8zWNGqTnvkS4l3EmXMVF5/auGlnvs1+A0Eg2NUlzEFE/GmBXq0PI6O12Ael/02mFvZ9Q ViENEsw33EwhUJsPxIHGNAx0CGMPgbo= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Ejs7FKlZ; spf=pass (imf12.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.170 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Wed, 14 Aug 2024 14:49:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1723672145; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bfz+tInBoeolRrtoXPsGQjhjRpHjQBGUo7rwsFTiXqA=; b=Ejs7FKlZYp7kRaj+qN/pnYUF/TAjVFChDAVad+mNprhdz2Pggck7VBt9OHgY5rtnXKnjjC 3vKsBOnuCpk+4+L5w1XsgzoNRlNVyVm375DYtjYikgklqtRzFF5siRFDpPNJbO82vdhQr0 egozFJpZIipBQ83KIxayOg+B+Dpvs1k= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: "T.J. Mercier" Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Meta kernel team , cgroups@vger.kernel.org Subject: Re: [PATCH 3/4] memcg: initiate deprecation of oom_control Message-ID: References: <20240814202825.2694077-1-shakeel.butt@linux.dev> <20240814202825.2694077-4-shakeel.butt@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 1CCA340018 X-Stat-Signature: wpoihyojxe8b41rgnwcah3oia5n1e3cg X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1723672146-928140 X-HE-Meta: U2FsdGVkX19vb5Wu3izc8aM6AhdXHoYhGkKezy6rkUwHLZ+RRnO8E0qUA420Zr2zIL2mjMfybpMyrp+QRaZr59Wj4+u5g/hDVM3w+RLKbxyGI/lISU+/0o6Dx7a2As8TBwensa4MrEvqNWgTEg1P+RH5tir9NFng22VghkokeUlX7BObuHQEXbi3glIHjMP58Koie7ttxVUYzdIQBvUIzYESZnagyINEuOPb0NwHyrTOjppouN4VO/D2BOOntvvnWCbYKZAWvzCR9aCtf1EP0tcC3IXSzrGGCtKH6mOf3jp4hux248/UD13wf53KkXgPTAZ0aQfGkpsmzgWB1rh5MTpKPZzsdYteQ0o9wsWcYdSqhOHbPBxhy1f7sgM6g72zJEfUEqRBnXLmixBh7dGVBB2AL3QFnWrkea59khSGeLWPFiJhYtR/Mpl+64KBqySls4jryUWx6D8/GALAOlyREYudIIh9ATcyhkkxAe81shzBlzhvG7/zW4Muczmnz9wKKX4k9ykJG7sgxzEaNl/fn2ynI1yW06HsXirjXORrnSKjwtEP2DEgIrBv6EYuzHPtJnRDcbWHgQ/CKdbYFFFsrwDDVi2wkEqKYSUqERHXVgO2p6CM37g23NsRzedzcrVnc5+9FSAv3AssF+jMdIzEMxQcSZlrNOB6HaprmoXtnEgn+6Z1uIvLcVb4j0rpGlP4xgBA++9NPpmvXa83MdhtqbHKy7cl7bzeucDzx3ZxkAo6k0HEplXpB0Chy4lOHscnLrewEH1RcuJtq27ZV+sFdWhoyd7jpWfgWN1dzRuhKU1SrEI0Ck3Qjh/Uw3gxO04IhJx8qVUB7T7F1qFHExPww8BjvSx0YdBIrX/wld+H31dZNFlA+nmxbDWzGMVKOWullTnQLSaHgJwB4wc/aWgVwcuI9IMcFpdQwRmnzCKKxMfFPe3aifxEFL/15hbI24t+nmYPclaPhalH7QlZhuK Ri548U5V 7JalZTEoxcHah0Qldi3J365bo1S/2hll1MiLX4WN2hTQF0+aHNTIZl95SC4iIPo9RSsrMLZd4eam+K/RNlWtFYNveE0wG9ogb1VeKIWt35RcF6sdQq+xS8gYm6pYsiv7o+xX0+HbBHsHoC9RP7uMJnyvjp/GcH5WYqfBWlhsocf1BA83q+xgX7gnoI2Kp8Ktk2JzfirwJiq+XYFhS713W6wBzPSHG6uoxVXHnV90DsIrfkk3YU98Cca3+ww== 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: List-Subscribe: List-Unsubscribe: On Wed, Aug 14, 2024 at 02:41:13PM GMT, Shakeel Butt wrote: > On Wed, Aug 14, 2024 at 02:00:03PM GMT, T.J. Mercier wrote: > > On Wed, Aug 14, 2024 at 1:29 PM Shakeel Butt wrote: > > > > > > The oom_control provides functionality to disable memcg oom-killer, > > > notifications on oom-kill and reading the stats regarding oom-kills. > > > This interface was mainly introduced to provide functionality for > > > userspace oom-killers. However it is not robust enough and only supports > > > OOM handling in the page fault path. > > > > > > For v2, the users can use the combination of memory.events notifications > > > and memory.high interface to provide userspace OOM-killing functionality. > > > Let's start the deprecation process for v1 and gather the info on how > > > the current users are using this interface and work on providing a more > > > robust functionality in v2. > > > > > > Signed-off-by: Shakeel Butt > > > --- > > > Documentation/admin-guide/cgroup-v1/memory.rst | 8 ++++++-- > > > mm/memcontrol-v1.c | 7 +++++++ > > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > > > diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation/admin-guide/cgroup-v1/memory.rst > > > index afe5e95e9f7b..74cea6712d06 100644 > > > --- a/Documentation/admin-guide/cgroup-v1/memory.rst > > > +++ b/Documentation/admin-guide/cgroup-v1/memory.rst > > > @@ -92,6 +92,8 @@ Brief summary of control files. > > > This knob is deprecated and shouldn't be > > > used. > > > memory.oom_control set/show oom controls. > > > + This knob is deprecated and shouldn't be > > > + used. > > > memory.numa_stat show the number of memory usage per numa > > > node > > > memory.kmem.limit_in_bytes Deprecated knob to set and read the kernel > > > @@ -846,8 +848,10 @@ It's applicable for root and non-root cgroup. > > > > > > .. _cgroup-v1-memory-oom-control: > > > > > > -10. OOM Control > > > -=============== > > > +10. OOM Control (DEPRECATED) > > > +============================ > > > + > > > +THIS IS DEPRECATED! > > > > > > memory.oom_control file is for OOM notification and other controls. > > > > > > diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c > > > index e0bb54e42011..07343e338e4e 100644 > > > --- a/mm/memcontrol-v1.c > > > +++ b/mm/memcontrol-v1.c > > > @@ -1907,6 +1907,9 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of, > > > event->register_event = mem_cgroup_usage_register_event; > > > event->unregister_event = mem_cgroup_usage_unregister_event; > > > } else if (!strcmp(name, "memory.oom_control")) { > > > + pr_warn_once("oom_control is deprecated and will be removed. " > > > + "Please report your usecase to linux-mm-@kvack.org" > > > + " if you depend on this functionality. \n"; > > > > Missing close paren? > > Ah, thanks for catching that. I compile tested the old version before > moving text around. Anyways, will resend. > Oh I was building without CONFIG_MEMCG_V1.