Re: [PATCH v5 0/2] ksm: count allocated rmap_items and update documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Aug 2022 14:37:31 +0000 xu xin <cgel.zte@xxxxxxxxx> 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.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux