linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>, cgel.zte@gmail.com
Cc: yang.yang29@zte.com.cn, ran.xiaokai@zte.com.cn,
	yang.shi@linux.alibaba.com, dave.hansen@linux.intel.com,
	minchan@kernel.org, saravanand@fb.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	xu xin <xu.xin16@zte.com.cn>
Subject: Re: [PATCH v3] mm/vmstat: add events for ksm cow
Date: Fri, 25 Mar 2022 21:19:51 +0100	[thread overview]
Message-ID: <7f3a973f-1f0c-4e50-2528-b0e9dc3e4cac@redhat.com> (raw)
In-Reply-To: <20220325130957.171a68dee88118082ab841c5@linux-foundation.org>

On 25.03.22 21:09, Andrew Morton wrote:
> On Thu, 24 Mar 2022 10:43:33 +0000 cgel.zte@gmail.com wrote:
> 
>> From: Yang Yang <yang.yang29@zte.com.cn>
>>
>> Users may use ksm by calling madvise(, , MADV_MERGEABLE) when they want
>> to save memory, it's a tradeoff by suffering delay on ksm cow. Users can
>> get to know how much memory ksm saved by reading
>> /sys/kernel/mm/ksm/pages_sharing, but they don't know what's the costs
>> of ksm cow, and this is important of some delay sensitive tasks.
>>
>> So add ksm cow events to help users evaluate whether or how to use ksm.
> 
> It's unclear (to me) how anyone will actually use this, how they will
> interpret the output.
> 
> Some tutorial words added to Documentation/vm/ksm.rst would be helpful.
> While in there, please check for any other /proc/vmstat fields which
> we forgot to document.
> 
>> --- a/include/linux/vm_event_item.h
>> +++ b/include/linux/vm_event_item.h
>> @@ -131,6 +131,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
>>  		SWAP_RA_HIT,
>>  #ifdef CONFIG_KSM
>>  		KSM_SWPIN_COPY,
>> +		COW_KSM,
> 
> I agree that this name looks unpleasingly backwards.  Do we have an
> expectation that we actually will be adding more COW_* fields?

As raised previously (also when proposing this), I'd like to have
COW_ANON, COW_ZERO, COW_OTHER. Ideally, we'd have added all via a single
patch for them. They would at least be of value to me.

-- 
Thanks,

David / dhildenb



      reply	other threads:[~2022-03-25 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 10:43 cgel.zte
2022-03-24 12:45 ` Matthew Wilcox
2022-03-24 12:49   ` David Hildenbrand
2022-03-25 20:09 ` Andrew Morton
2022-03-25 20:19   ` David Hildenbrand [this message]

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=7f3a973f-1f0c-4e50-2528-b0e9dc3e4cac@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgel.zte@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ran.xiaokai@zte.com.cn \
    --cc=saravanand@fb.com \
    --cc=xu.xin16@zte.com.cn \
    --cc=yang.shi@linux.alibaba.com \
    --cc=yang.yang29@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