linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>, xu.xin16@zte.com.cn
Cc: linux-kernel@vger.kernel.org, wang.yaxin@zte.com.cn,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH linux-next v4] ksm: add ksm involvement information for each process
Date: Tue, 10 Dec 2024 21:05:18 +0100	[thread overview]
Message-ID: <3a457ce5-3c5c-4165-996b-f5a46fcda194@redhat.com> (raw)
In-Reply-To: <20241203165643.729e6c5fe58f59adc7ee098f@linux-foundation.org>

On 04.12.24 01:56, Andrew Morton wrote:
> On Tue, 3 Dec 2024 19:26:33 +0800 (CST) <xu.xin16@zte.com.cn> wrote:
> 
>> From: xu xin <xu.xin16@zte.com.cn>
>>
>> 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



  reply	other threads:[~2024-12-10 20:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 11:26 xu.xin16
2024-12-04  0:56 ` Andrew Morton
2024-12-10 20:05   ` David Hildenbrand [this message]
2025-01-10  9:57   ` xu xin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a457ce5-3c5c-4165-996b-f5a46fcda194@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wang.yaxin@zte.com.cn \
    --cc=xu.xin16@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox