From: Michal Koutný <mkoutny@suse.com>
To: Maarten Lankhorst <dev@lankhorst.se>
Cc: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>,
Maxime Ripard <mripard@kernel.org>,
Natalie Vock <natalie.vock@gmx.de>, Tejun Heo <tj@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, kernel-dev@igalia.com
Subject: Re: [PATCH] cgroup/dmem: return error when failing to set dmem.max
Date: Thu, 19 Mar 2026 10:40:38 +0100 [thread overview]
Message-ID: <2q5heaiptuzya3nkmskzudeorda5segp7t2sf76btmjcgaip3n@unslzqgudcv5> (raw)
In-Reply-To: <02c0752a-1a66-4938-9f5e-152c8c98741f@lankhorst.se>
[-- Attachment #1: Type: text/plain, Size: 865 bytes --]
On Thu, Mar 19, 2026 at 08:33:12AM +0100, Maarten Lankhorst <dev@lankhorst.se> wrote:
> The semantics of dmemcg should not substantially differ from the memory cgroup
> controller. I believe the memory cgroup controller does allow setting a lower
> max, and will evict until below the new max.
>
> See mm/memcontrol.c:memory_max_write
>
> We should probably do the same in dmemcg instead, although we currently have no
> mechanism to evict, setting a new lower max at least prevents future allocations
> from failing.
+1
Yes, if the dmem resource is preemptible, the limit decrement should take an
action to fullfill the limit (like with memory.max).
Even as non-preemptible resource, the behavior could be more consistent
with misc controller that allows "storing" any value (with the effect of
preventing further growth).
Thanks,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
next prev parent reply other threads:[~2026-03-19 9:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 19:34 [PATCH] cgroup/dmem: return error when failing to set dmem.max Thadeu Lima de Souza Cascardo
2026-03-18 22:56 ` Tejun Heo
2026-03-19 7:33 ` Maarten Lankhorst
2026-03-19 9:40 ` Michal Koutný [this message]
2026-03-21 19:01 ` Claude review: " Claude Code Review Bot
2026-03-21 19:01 ` Claude Code Review Bot
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=2q5heaiptuzya3nkmskzudeorda5segp7t2sf76btmjcgaip3n@unslzqgudcv5 \
--to=mkoutny@suse.com \
--cc=cascardo@igalia.com \
--cc=cgroups@vger.kernel.org \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=natalie.vock@gmx.de \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox