Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] cgroup/dmem: subject and body claim a reclaim callback the patch lacks --
commit 10f437866e4dd01de14e6d0d5054df57b3119a81 Author: Thomas Hellström <[email protected]> ms/cgroup/dmem: Add reclaim callback for lowering max below current usage This is a rebased backport of an upstream change. Only set_resource_max() is changed. It now stores the new limit directly with xchg() instead of calling page_counter_set_max(). The reclaim callback, retry loop, O_NONBLOCK handling and SRCU protection described in the commit message are not part of this tree. Link: https://patch.msgid.link/[email protected] > ms/cgroup/dmem: Add reclaim callback for lowering max below current usage [Severity: Low] The subject says this adds a reclaim callback, and the body and the v1-v7 changelog describe the same feature. Examples are "Add an optional reclaim callback to struct dmem_cgroup_region" and "the driver is asked to evict memory to bring usage back below the limit". Is that accurate for this commit? The diff below touches only set_resource_max() in kernel/cgroup/dmem.c. It adds no reclaim callback, no retry loop, no signal abort, no O_NONBLOCK handling and no SRCU domain. The rebase note at the end of the message says so itself. Could the subject be changed to match what the patch does? For example, "cgroup/dmem: apply dmem.max immediately even below current usage". The rebase note can stay. > diff --git a/kernel/cgroup/dmem.c b/kernel/cgroup/dmem.c > index 8424df801bc0..46b6aca765a4 100644 > --- a/kernel/cgroup/dmem.c > +++ b/kernel/cgroup/dmem.c > @@ -158,7 +158,10 @@ set_resource_low(struct dmem_cgroup_pool_state *pool, > u64 val) > static void > set_resource_max(struct dmem_cgroup_pool_state *pool, u64 val) > { > - page_counter_set_max(&pool->cnt, val); > + unsigned long limit = (unsigned long)val; > + > + /* Apply the new limit immediately so concurrent allocations are > throttled. */ > + xchg(&pool->cnt.max, limit); > } > > static u64 get_resource_low(struct dmem_cgroup_pool_state *pool) -- Sashiko AI review · https://sashiko.vzint.dev/#/patchset/[email protected]?part=6 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
