On Thu, May 14, 2026 at 02:36:08PM -0300, Thadeu Lima de Souza Cascardo 
<[email protected]> wrote:
> Just like we have memory.peak, introduce a dmem.peak, which uses the
> page_counter support for that.
> 
> For now, make it read-only.
> 
> This allows for memory usage monitoring without polling dmem.current when
> the information needed is the maximum device memory used. That can be used
> for capacity planning, such that dmem.max can be properly setup for a given
> workload. It can also be used for debugging to determine whether a given
> workload would have caused eviction or system memory use.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
> ---
> Changes in v3:
> - EDITME: describe what is new in this series revision.
> - EDITME: use bulletpoints and terse descriptions.
> - Link to v2: 
> https://patch.msgid.link/[email protected]
> 
> Changes in v2:
> - Make it read-only for now and adjust documentation accordingly.
> - Link to v1: 
> https://patch.msgid.link/[email protected]
> ---
>  Documentation/admin-guide/cgroup-v2.rst |  6 ++++++
>  kernel/cgroup/dmem.c                    | 15 +++++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/Documentation/admin-guide/cgroup-v2.rst 
> b/Documentation/admin-guide/cgroup-v2.rst
> index 6efd0095ed99..d103623b2be4 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -2808,6 +2808,12 @@ DMEM Interface Files
>       The semantics are the same as for the memory cgroup controller, and are
>       calculated in the same way.
>  
> +  dmem.peak
> +     A read-only nested-keyed file that exists on non-root cgroups.

s/nested-keyed/flat-keyed/


With that

Reviewed-by: Michal Koutný <[email protected]>

Attachment: signature.asc
Description: PGP signature

Reply via email to