[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220830173836.4e1a2a75c5e9cfb61638722a@linux-foundation.org>
Date: Tue, 30 Aug 2022 17:38:36 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: xu xin <cgel.zte@...il.com>
Cc: adobriyan@...il.com, willy@...radead.org, bagasdotme@...il.com,
hughd@...gle.com, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
xu xin <xu.xin16@....com.cn>,
Izik Eidus <izik.eidus@...ellosystems.com>,
Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH v5 0/2] ksm: count allocated rmap_items and update
documentation
On Tue, 30 Aug 2022 14:37:31 +0000 xu xin <cgel.zte@...il.com> wrote:
> KSM can save memory by merging identical pages, but also can consume
> additional memory, because it needs to generate rmap_items to save
> each scanned page's brief rmap information.
>
> To determine how beneficial the ksm-policy (like madvise), they are using
> brings, so we add a new interface /proc/<pid>/ksm_stat for each process
> The value "ksm_rmap_items" in it indicates the total allocated ksm
> rmap_items of this process.
I can see the usefulness and the code change is very simple, so I'll
queue it for testing and shall see what other reviewers have to say.
It's useful that the per-process file is called "ksm_stat", because we
may with to add additional content to it in the future. Because
concerns have been expressed (by Alexey) about the proliferation of
procfs files causing major memory use when something reads them all.
Putting more things in the same procfs files will help avoid this.
Powered by blists - more mailing lists