From: no-reply@sashiko.virtuozzo.com
To: khorenko@virtuozzo.com,
Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>,
ptikhomirov@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 6/6] ms/cgroup/dmem: Add reclaim callback for lowering max below current usage
Date: Sun, 1 Nov 2026 23:57:42 +0000 [thread overview]
Message-ID: <010701a1998c294b-e3ee9ae2-7e6c-4e6f-8b36-bd1183979b6e-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261101235155.124059-7-mirian.shilakadze@virtuozzo.com>
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 <thomas.hellstrom@linux.intel.com>
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/20260725100036.2372-4-thomas.hellstrom@linux.intel.com
> 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/20261101235155.124059-1-mirian.shilakadze@virtuozzo.com?part=6
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-11-01 23:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 23:51 [Devel] [PATCH hci-8.1 0/6] cgroup/dmem: backport fixes and apply a lower dmem.max at once Mirian Shilakadze
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 1/6] ms/cgroup/dmem: fix NULL pointer dereference when setting max Mirian Shilakadze
2026-11-01 23:54 ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 2/6] ms/cgroup/dmem: avoid rcu warning when unregister region Mirian Shilakadze
2026-11-01 23:55 ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 3/6] ms/cgroup/dmem: avoid pool UAF Mirian Shilakadze
2026-11-01 23:56 ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 4/6] ms/cgroup/dmem: Return -ENOMEM on failed pool preallocation Mirian Shilakadze
2026-11-01 23:55 ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 5/6] ms/drm/ttm: Convert -EAGAIN from dmem_cgroup_try_charge to -ENOSPC Mirian Shilakadze
2026-11-01 23:56 ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 6/6] ms/cgroup/dmem: Add reclaim callback for lowering max below current usage Mirian Shilakadze
2026-11-01 23:57 ` no-reply [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=010701a1998c294b-e3ee9ae2-7e6c-4e6f-8b36-bd1183979b6e-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=mirian.shilakadze@virtuozzo.com \
--cc=ptikhomirov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.