[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6663d393-bac8-4bcc-b36b-58b08143d959@redhat.com>
Date: Wed, 23 Apr 2025 15:08:20 +0200
From: David Hildenbrand <david@...hat.com>
To: xu.xin16@....com.cn, akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, wang.yaxin@....com.cn, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, yang.yang29@....com.cn
Subject: Re: [PATCH RESEND 0/6] support ksm_stat showing at cgroup level
On 22.04.25 13:14, xu.xin16@....com.cn wrote:
> From: xu xin <xu.xin16@....com.cn>
>
> With the enablement of container-level KSM (e.g., via prctl [1]), there is
> a growing demand for container-level observability of KSM behavior. However,
> current cgroup implementations lack support for exposing KSM-related
> metrics.
>
> This patch introduces a new interface named ksm_stat
> at the cgroup hierarchy level, enabling users to monitor KSM merging
> statistics specifically for containers where this feature has been
> activated, eliminating the need to manually inspect KSM information for
> each individual process within the cgroup.
>
> Users can obtain the KSM information of a cgroup just by:
>
> # cat /sys/fs/cgroup/memory.ksm_stat
> ksm_rmap_items 76800
> ksm_zero_pages 0
> ksm_merging_pages 76800
> ksm_process_profit 309657600
>
> Current implementation supports cgroup v1 temporarily; cgroup v2
> compatibility is planned for future versions.
As raised by Willy, we focus on v2.
Independent of that, I strongly assume that
Documentation/admin-guide/cgroup-v1/memory.rst needs care :)
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists