Re: [PATCH] cgroup/dmem: return error when failing to set dmem.max
From: Tejun Heo
Date: Wed Mar 18 2026 - 18:57:02 EST
On Wed, Mar 18, 2026 at 04:34:17PM -0300, Thadeu Lima de Souza Cascardo wrote:
> page_counter_set_max may return -EBUSY in case the current usage is above
> the new max. When writing to dmem.max, this error is ignored and the new
> max is not set.
>
> Return as soon as setting one of the regions max limit fails. This keeps
> with the current behavior of returning when one of the region names is not
> valid.
Ugh, I don't know why dmemcg_limit_write() is trying to handle multi-line
inputs. After this, there's no atomicity w.r.t. failures either, so this
seems entirely pointless. I'd much prefer to strip out the multiline
handling.
Thanks.
--
tejun