From: Shakeel Butt Date: Tue, 6 May 2025 23:28:33 +0000 (-0700) Subject: memcg-introduce-non-blocking-limit-setting-option-v3 X-Git-Tag: v6.16-rc1~92^2~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6c895cf2d323373a66d61c6acc331431de2ae5a;p=thirdparty%2Flinux.git memcg-introduce-non-blocking-limit-setting-option-v3 add more explanation in doc and commit message on O_NONBLOCK side-effects (Johannes) Link: https://lkml.kernel.org/r/20250506232833.3109790-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Johannes Weiner Cc: Greg Thelen Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Tejun Heo Cc: Yosry Ahmed Cc: Christian Brauner Signed-off-by: Andrew Morton --- diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index b34f1dd969e01..d537f3d3fed98 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/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.