lkml.org 
[lkml]   [2022]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@gmail.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.

\
 
 \ /
  Last update: 2022-08-31 02:42    [W:0.034 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site