From: Stefan Roesch <shr@devkernel.io>
To: xu xin <xu.xin.sc@gmail.com>
Cc: akpm@linux-foundation.org, bagasdotme@gmail.com,
david@redhat.com, hannes@cmpxchg.org, kernel-team@fb.com,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-mm@kvack.org, mhocko@suse.com, riel@surriel.com,
willy@infradead.org, yang.yang29@zte.com.cn, xu.xin16@zte.com.cn
Subject: Re: [PATCH v9 2/3] mm: add new KSM process and sysfs knobs
Date: Fri, 28 Apr 2023 09:27:29 -0700 [thread overview]
Message-ID: <qvqwjzxwrmif.fsf@devbig1114.prn1.facebook.com> (raw)
In-Reply-To: <20230428093659.23962-1-xu.xin16@zte.com.cn>
xu xin <xu.xin.sc@gmail.com> writes:
>> This adds the general_profit KSM sysfs knob and the process profit metric
>> knobs to ksm_stat.
>>
>> 1) expose general_profit metric
>>
>> The documentation mentions a general profit metric, however this
>> metric is not calculated. In addition the formula depends on the size
>> of internal structures, which makes it more difficult for an
>> administrator to make the calculation. Adding the metric for a better
>> user experience.
>>
>> 2) document general_profit sysfs knob
>>
>> 3) calculate ksm process profit metric
>>
>> The ksm documentation mentions the process profit metric and how to
>> calculate it. This adds the calculation of the metric.
>>
>> 4) mm: expose ksm process profit metric in ksm_stat
>>
>> This exposes the ksm process profit metric in /proc/<pid>/ksm_stat.
>> The documentation mentions the formula for the ksm process profit
>> metric, however it does not calculate it. In addition the formula
>> depends on the size of internal structures. So it makes sense to
>> expose it.
>>
>
> Hi, Stefan, I think you should give some credits to me about my contributions on
> the concept and formula of ksm profit (process wide and system wide), it's kind
> of idea stealing.
>
>
I wasn't aware the formula that is described in the documentation is
from you. I simply implemented the documented metrics. If you came up
with it, happy to give you credit.
> Besides, the idea of Process control KSM was proposed by me last year although you use
> prctl instead of /proc fs. you even didn't CC my email. I think you should CC my email
> (xu.xin16@zte.com.cn) as least.
>
>> 5) document new procfs ksm knobs
>>
>> Signed-off-by: Stefan Roesch <shr@devkernel.io>
>> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
>> Acked-by: David Hildenbrand <david@redhat.com>
>> Cc: David Hildenbrand <david@redhat.com>
>> Cc: Johannes Weiner <hannes@cmpxchg.org>
>> Cc: Michal Hocko <mhocko@suse.com>
>> Cc: Rik van Riel <riel@surriel.com>
>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>> ---
>> Documentation/ABI/testing/sysfs-kernel-mm-ksm | 8 +++++++
>> Documentation/admin-guide/mm/ksm.rst | 5 ++++-
>> fs/proc/base.c | 3 +++
>> include/linux/ksm.h | 4 ++++
>> mm/ksm.c | 21 +++++++++++++++++++
>> 5 files changed, 40 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-ksm b/Documentation/ABI/testing/sysfs-kernel-mm-ksm
>> index d244674a9480..6041a025b65a 100644
>> --- a/Documentation/ABI/testing/sysfs-kernel-mm-ksm
>> +++ b/Documentation/ABI/testing/sysfs-kernel-mm-ksm
>> @@ -51,3 +51,11 @@ Description: Control merging pages across different NUMA nodes.
>>
>> When it is set to 0 only pages from the same node are merged,
>> otherwise pages from all nodes can be merged together (default).
>> +
>> +What: /sys/kernel/mm/ksm/general_profit
>> +Date: April 2023
>> +KernelVersion: 6.4
>> +Contact: Linux memory management mailing list <linux-mm@kvack.org>
>> +Description: Measure how effective KSM is.
>> + general_profit: how effective is KSM. The formula for the
>> + calculation is in Documentation/admin-guide/mm/ksm.rst.
>> diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst
next prev parent reply other threads:[~2023-04-28 16:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 5:13 [PATCH v9 0/3] mm: process/cgroup ksm support Stefan Roesch
2023-04-18 5:13 ` [PATCH v9 1/3] mm: add new api to enable ksm per process Stefan Roesch
2023-04-18 5:13 ` [PATCH v9 2/3] mm: add new KSM process and sysfs knobs Stefan Roesch
2023-04-28 9:36 ` xu xin
2023-04-28 16:27 ` Stefan Roesch [this message]
2023-04-18 5:13 ` [PATCH v9 3/3] selftests/mm: add new selftests for KSM Stefan Roesch
2023-04-18 15:28 ` [PATCH v1 0/3] mm/ksm: improve PR_SET_MEMORY_MERGE=0 handling and cleanup disabling KSM David Hildenbrand
2023-04-18 15:28 ` [PATCH v1 1/3] mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0 David Hildenbrand
2023-04-20 21:21 ` Stefan Roesch
2023-04-21 17:11 ` David Hildenbrand
2023-04-21 17:21 ` David Hildenbrand
2023-04-21 18:28 ` Stefan Roesch
2023-04-18 15:28 ` [PATCH v1 2/3] selftests/ksm: ksm_functional_tests: add prctl unmerge test David Hildenbrand
2023-04-20 21:30 ` Stefan Roesch
2023-04-18 15:28 ` [PATCH v1 3/3] mm/ksm: move disabling KSM from s390/gmap code to KSM code David Hildenbrand
2023-04-19 11:39 ` Janosch Frank
2023-04-19 11:40 ` David Hildenbrand
2023-04-20 21:41 ` Stefan Roesch
2023-04-21 16:52 ` David Hildenbrand
2023-04-21 18:27 ` Stefan Roesch
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=qvqwjzxwrmif.fsf@devbig1114.prn1.facebook.com \
--to=shr@devkernel.io \
--cc=akpm@linux-foundation.org \
--cc=bagasdotme@gmail.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=riel@surriel.com \
--cc=willy@infradead.org \
--cc=xu.xin.sc@gmail.com \
--cc=xu.xin16@zte.com.cn \
--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