From: Maarten Lankhorst <dev@lankhorst.se>
To: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Cc: Tejun Heo <tj@kernel.org>, Maxime Ripard <mripard@kernel.org>,
Natalie Vock <natalie.vock@gmx.de>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Koutny <mkoutny@suse.com>,
cgroups@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, kernel-dev@igalia.com
Subject: Re: [PATCH v2 0/3] cgroup/dmem: allow atomic irrestrictive writes to dmem.max
Date: Wed, 25 Mar 2026 18:40:40 +0100 [thread overview]
Message-ID: <f1edec8a-f446-4fdc-b39b-1dbb690ff57e@lankhorst.se> (raw)
In-Reply-To: <acF6PMV-aezq3dWc@quatroqueijos.cascardo.eti.br>
Hey,
Den 2026-03-23 kl. 18:37, skrev Thadeu Lima de Souza Cascardo:
> On Mon, Mar 23, 2026 at 05:46:28PM +0100, Maarten Lankhorst wrote:
>> Hey,
>>
>>
>> Den 2026-03-21 kl. 20:27, skrev Tejun Heo:
>>> Hello,
>>>
>>> Generally looks okay to me. One comment on 3/3 — the naked xchg() in
>>> set_resource_max() needs a comment explaining why it's used instead of
>>> page_counter_set_max() and what the semantics are (unconditionally sets max
>>> regardless of current usage to prevent further allocations, since there's no
>>> eviction mechanism yet).
>>>
>>> Applied 1/3. Maarten, Michal, what do you think?
>>
>> Yeah probably drop 2/3 too since there is no longer a case where setting a limit may fail.
>>
>> Kind regards,
>> ~Maarten Lankhorst
>
> Actually, this can still happen if an invalid region name is given.
>
> So, one could write:
>
> echo -e 'region1 max\ninvalidregion2 max\n' > dmem.max
>
> And even though setting the value for region1 would be applied, the write
> would return -EINVAL.
Makes sense. It would be good to validate in advance then. If that's not possible we
should at least not error when we try to update 2 regions simultaneously. Likely the
best to do so anyway if we want to handle eviction, which may be handled in a blocking
fashion.
Kind regards,
~Maarten Lankhorst
next prev parent reply other threads:[~2026-03-25 17:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 21:22 Thadeu Lima de Souza Cascardo
2026-03-19 21:22 ` [PATCH v2 1/3] cgroup/dmem: remove region parameter from dmemcg_parse_limit Thadeu Lima de Souza Cascardo
2026-03-19 21:22 ` [PATCH v2 2/3] cgroup/dmem: accept a single region when writing to attributes Thadeu Lima de Souza Cascardo
2026-03-19 21:22 ` [PATCH v2 3/3] cgroup/dmem: allow max to be set below current usage Thadeu Lima de Souza Cascardo
2026-03-21 19:27 ` [PATCH v2 0/3] cgroup/dmem: allow atomic irrestrictive writes to dmem.max Tejun Heo
2026-03-23 16:46 ` Maarten Lankhorst
2026-03-23 17:37 ` Thadeu Lima de Souza Cascardo
2026-03-25 17:40 ` Maarten Lankhorst [this message]
2026-03-26 15:24 ` Thadeu Lima de Souza Cascardo
2026-04-20 16:20 ` Michal Koutný
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=f1edec8a-f446-4fdc-b39b-1dbb690ff57e@lankhorst.se \
--to=dev@lankhorst.se \
--cc=cascardo@igalia.com \
--cc=cgroups@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--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
all inboxes | Powered by JetHome®