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 1E0A4C3ABBC for ; Wed, 7 May 2025 00:53:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3EA9D6B000A; Tue, 6 May 2025 20:53:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 396AA6B0083; Tue, 6 May 2025 20:53:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 238686B0085; Tue, 6 May 2025 20:53:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 00F756B000A for ; Tue, 6 May 2025 20:53:19 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E0E241A076D for ; Wed, 7 May 2025 00:53:20 +0000 (UTC) X-FDA: 83414288160.28.131F99B Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf26.hostedemail.com (Postfix) with ESMTP id F0D0A140002 for ; Wed, 7 May 2025 00:53:18 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="CkQtGhw/"; dmarc=none; spf=pass (imf26.hostedemail.com: domain of akpm@linux-foundation.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1746579199; a=rsa-sha256; cv=none; b=GQGz3k/uWGEXwZPX+HoiEBLiFAsmg1MjqAa28wMJBLobjiFBDc+vT9xDN7n1yiK3LYaHHq +v4FbqGnhux+YPvdjHUft+E3Gn3bYPRhRoKFe4wb/mrTdMOzNTxKc46RQGkpLz1jM8hNd8 iriNsvRvI7c1LElV44M9upQVYAmEmDE= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="CkQtGhw/"; dmarc=none; spf=pass (imf26.hostedemail.com: domain of akpm@linux-foundation.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1746579199; 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=OUwEBiU9ddKuZ/dmGLLb1EOahz3URi/ACMZJ41y0VdA=; b=l3MH6crMZaHoZxRtY5SVUbtcIzjbVJLEz41UnxF2dSGaZ4gdQsRq/3egDkX4bFVu7funMr N/RNxQN7YoBPhaw6y6c6/2KL9DYhmNginHeKEGattzaO5ROtyQqQzFOvI9WCXs6oH0lECq PHI1gkFnHGX+dXRcuOkzhj+s5/E3IAc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 7EE0949D47; Wed, 7 May 2025 00:53:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D53F1C4CEE4; Wed, 7 May 2025 00:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1746579197; bh=JwkdJHtqnzvr9ic2vjKO3jhMa3Gd1ozvG9IU1T7YEhg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CkQtGhw/Yd9EkUf7MUO1G7J3nDCeeAlvtshzPKG5RPDaGLCAv5ipdLxRpGQN64lFS S4t9XscXFAttV98w3NZsr2iIroFrSMbxknG1qvzju6HNRXZXQ3y8QhypNC1KDpSbbU SwtMVkmbjHcUjisQaJ2Ac/JoguSKXTG8xHqtE5mw= Date: Tue, 6 May 2025 17:53:16 -0700 From: Andrew Morton To: Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Meta kernel team , Greg Thelen , Michal =?ISO-8859-1?Q?Koutn=FD?= , Tejun Heo , Yosry Ahmed , Christian Brauner Subject: Re: [PATCH v3] memcg: introduce non-blocking limit setting option Message-Id: <20250506175316.1ca96d3aab2a28086fffa33a@linux-foundation.org> In-Reply-To: <20250506232833.3109790-1-shakeel.butt@linux.dev> References: <20250506232833.3109790-1-shakeel.butt@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: F0D0A140002 X-Stat-Signature: hwacujc5qkte1xdybmoijzj1xddnbf4w X-HE-Tag: 1746579198-701829 X-HE-Meta: U2FsdGVkX195xHwBp7mUesvnnrL2s2DIWpf3aOiETDPumvoin6QyQQhAqd2XR6yI4mGg2x9hFmIlZsoEQKWv+SnOS+iPZf4EgpQWH42WzLV5FpF/MqGfCpH0D7MPqtOC0c/+UWV2pApHfSiYrGDoqCnffEqu11E+1FV0aABkjYHwTrpe0yLk2l1g7rFfvODWnV1AunSsoBO5eC6HCZuEyAZOUlCpJWSqcwso1uLSJ9jr0JoEGGJAuEkF6jsnDWWpRYRomme62DPQRdxtRS66X+135lnjyPc6yKmOPGHU/3k8NHKvKtQ2Pb/du6JUmH6UtReopUacap5/V18IR1mReVR+2D3nm0HqgD/BGhk5+RQJjCal2QEaaiPW53KmTTNJC1zmyBstUVY2csV2DoutaRv7O9sIZnFIpiO5GS4vSoQT0dtZy8QAmEboa8nsBV3YcoWDE1pHJ84T3jgZIdIPMSsxh5XZiCs3Sb68QrYODwT01bd93osG1TM+nAlm+NrBzbtN0HmXyuDzdBRCA6sd9rF3QvDDiHX/xBUyldYCWEuDNY1aJe54w43YlTe4pUhFTavjR0j68MMUiW5m/57Kfv9cnCPFyMkaRUHR+7NmeUYfuSIsKA8QopkrHzbk9ZZKuUMEpNluaKI9Lp9OPDRDfYDnhQ2xIB8LrRVzfWngL42Eu/SkVZoD01V35CMrTjHo3QuuaY9Yq6c4y8eOx/tf7fjdVGLJBR52IEAI+FuQtvMxu+gndOs+tsayPAkKx73dixrkCLOFphK/m+5UVSoDgE0uHwYpzurMHz3+cZ3Wv6BV3cyynx+1NaY/aE7hxZmAJsOlc3Y29ITOKZ8HbIGSqbjyaD/8zRux8M+sAY2/EUYupV6PHGBUMZc3j2S7zvqpDUf4hyEDq19c0wjNKHF6RwtN0t6funPobrxPa/4gXKgXQrKThm55DnaSaAFvV+Vz//uPNy4J9FWz9htyCJF 06y6RsC8 bZvHvCZUp2/vvZ97GwPIkbswo9ZXVc52c/vY5fSOH9vNpF3KjlNFpn/zh9MB3nnos8xKUciXIKZ6SNwOQlmbiTkZeQ2u5aGeCFjTI4d/BNpBjI/VrMk3wxyZuLLJSrh1m7oFkT7dAztyIXEmT5QHciCFC3PnPR4+6puyDGsIzeQ70bpGxalcOdSJb1Ph4UYlRNYpTsX2n4ycN4zqOlRbaFuTg2KRhqwZA8mXdf+i8UY7EKGnNnmrVO5vl/DV6ip0ROQNQ 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: Thanks, I queued this as a -fix: --- a/Documentation/admin-guide/cgroup-v2.rst~memcg-introduce-non-blocking-limit-setting-option-v3 +++ a/Documentation/admin-guide/cgroup-v2.rst @@ -1299,12 +1299,17 @@ PAGE_SIZE multiple when read back. monitors the limited cgroup to alleviate heavy reclaim pressure. - If memory.high is opened with O_NONBLOCK then the synchronous - reclaim is bypassed. This is useful for admin processes that - need to dynamically adjust the job's memory limits without - expending their own CPU resources on memory reclamation. The - job will trigger the reclaim and/or get throttled on its - next charge request. + If memory.high is opened with O_NONBLOCK then the synchronous + reclaim is bypassed. This is useful for admin processes that + need to dynamically adjust the job's memory limits without + expending their own CPU resources on memory reclamation. The + job will trigger the reclaim and/or get throttled on its + next charge request. + + Please note that with O_NONBLOCK, there is a chance that the + target memory cgroup may take indefinite amount of time to + reduce usage below the limit due to delayed charge request or + busy-hitting its memory to slow down reclaim. memory.max A read-write single value file which exists on non-root @@ -1323,12 +1328,17 @@ PAGE_SIZE multiple when read back. Caller could retry them differently, return into userspace as -ENOMEM or silently ignore in cases like disk readahead. - If memory.max is opened with O_NONBLOCK, then the synchronous - reclaim and oom-kill are bypassed. This is useful for admin - processes that need to dynamically adjust the job's memory limits - without expending their own CPU resources on memory reclamation. - The job will trigger the reclaim and/or oom-kill on its next - charge request. + If memory.max is opened with O_NONBLOCK, then the synchronous + reclaim and oom-kill are bypassed. This is useful for admin + processes that need to dynamically adjust the job's memory limits + without expending their own CPU resources on memory reclamation. + The job will trigger the reclaim and/or oom-kill on its next + charge request. + + Please note that with O_NONBLOCK, there is a chance that the + target memory cgroup may take indefinite amount of time to + reduce usage below the limit due to delayed charge request or + busy-hitting its memory to slow down reclaim. memory.reclaim A write-only nested-keyed file which exists for all cgroups. _