Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH v9 2/3] mm: add new KSM process and sysfs knobs
       [not found] <20230418051342.1919757-3-shr@devkernel.io>
@ 2023-04-28  9:36 ` xu xin
  2023-04-28 16:27   ` Stefan Roesch
  0 siblings, 1 reply; 2+ messages in thread
From: xu xin @ 2023-04-28  9:36 UTC (permalink / raw)
  To: shr
  Cc: akpm, bagasdotme, david, hannes, kernel-team, linux-doc,
	linux-kselftest, linux-mm, mhocko, riel, willy, yang.yang29,
	xu.xin16

> 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.


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v9 2/3] mm: add new KSM process and sysfs knobs
  2023-04-28  9:36 ` [PATCH v9 2/3] mm: add new KSM process and sysfs knobs xu xin
@ 2023-04-28 16:27   ` Stefan Roesch
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roesch @ 2023-04-28 16:27 UTC (permalink / raw)
  To: xu xin
  Cc: akpm, bagasdotme, david, hannes, kernel-team, linux-doc,
	linux-kselftest, linux-mm, mhocko, riel, willy, yang.yang29,
	xu.xin16


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-28 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230418051342.1919757-3-shr@devkernel.io>
2023-04-28  9:36 ` [PATCH v9 2/3] mm: add new KSM process and sysfs knobs xu xin
2023-04-28 16:27   ` Stefan Roesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox