Re: [PATCH linux-next v4] ksm: add ksm involvement information for each process

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

 



On 04.12.24 01:56, Andrew Morton wrote:
On Tue, 3 Dec 2024 19:26:33 +0800 (CST) <xu.xin16@xxxxxxxxxx> wrote:

From: xu xin <xu.xin16@xxxxxxxxxx>

In /proc/<pid>/ksm_stat, Add two extra ksm involvement items including
KSM_mergeable and KSM_merge_any. It helps administrators to
better know the system's KSM behavior at process level.

It's hard for me to judge the usefulness of this.  Please tell us more:
usage examples, what actions have been taken using this information, etc.

Seconded.


KSM_mergeable: yes/no
	whether any VMAs of the process'mm are currently applicable to KSM.

Could we simply display VM_MERGEABLE in /proc/<pid>/maps?

We indicate in /proc/<pid>/smaps "mg" for VM_MERGEABLE already.

The "nasty" thing about smaps is that it does all the page table walking to gather memory statistics, which can be rather expensive.

I was recently asking myself whether we should have a "cheaper" way to obtain such details about mappings. /proc/<pid>/maps is likely impossible to extend (similarly display flags) I suspect.



--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux