Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <shakeel.butt@linux.dev>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Greg Thelen <gthelen@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Tejun Heo <tj@kernel.org>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Shakeel Butt and committed by
Andrew Morton
c6c895cf c8e6002b

+22 -12
+22 -12
Documentation/admin-guide/cgroup-v2.rst
··· 1299 1299 monitors the limited cgroup to alleviate heavy reclaim 1300 1300 pressure. 1301 1301 1302 - If memory.high is opened with O_NONBLOCK then the synchronous 1303 - reclaim is bypassed. This is useful for admin processes that 1304 - need to dynamically adjust the job's memory limits without 1305 - expending their own CPU resources on memory reclamation. The 1306 - job will trigger the reclaim and/or get throttled on its 1307 - next charge request. 1302 + If memory.high is opened with O_NONBLOCK then the synchronous 1303 + reclaim is bypassed. This is useful for admin processes that 1304 + need to dynamically adjust the job's memory limits without 1305 + expending their own CPU resources on memory reclamation. The 1306 + job will trigger the reclaim and/or get throttled on its 1307 + next charge request. 1308 + 1309 + Please note that with O_NONBLOCK, there is a chance that the 1310 + target memory cgroup may take indefinite amount of time to 1311 + reduce usage below the limit due to delayed charge request or 1312 + busy-hitting its memory to slow down reclaim. 1308 1313 1309 1314 memory.max 1310 1315 A read-write single value file which exists on non-root ··· 1328 1323 Caller could retry them differently, return into userspace 1329 1324 as -ENOMEM or silently ignore in cases like disk readahead. 1330 1325 1331 - If memory.max is opened with O_NONBLOCK, then the synchronous 1332 - reclaim and oom-kill are bypassed. This is useful for admin 1333 - processes that need to dynamically adjust the job's memory limits 1334 - without expending their own CPU resources on memory reclamation. 1335 - The job will trigger the reclaim and/or oom-kill on its next 1336 - charge request. 1326 + If memory.max is opened with O_NONBLOCK, then the synchronous 1327 + reclaim and oom-kill are bypassed. This is useful for admin 1328 + processes that need to dynamically adjust the job's memory limits 1329 + without expending their own CPU resources on memory reclamation. 1330 + The job will trigger the reclaim and/or oom-kill on its next 1331 + charge request. 1332 + 1333 + Please note that with O_NONBLOCK, there is a chance that the 1334 + target memory cgroup may take indefinite amount of time to 1335 + reduce usage below the limit due to delayed charge request or 1336 + busy-hitting its memory to slow down reclaim. 1337 1337 1338 1338 memory.reclaim 1339 1339 A write-only nested-keyed file which exists for all cgroups.