linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/ksm: calculate ksm_process_profit more accurately
@ 2025-06-04  3:17 Longlong Xia
  2025-06-04  3:17 ` [PATCH 1/2] " Longlong Xia
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Longlong Xia @ 2025-06-04  3:17 UTC (permalink / raw)
  To: akpm, xu.xin16; +Cc: linux-mm, linux-kernel, Longlong Xia

During the KSM testing, it was observed that the sum of KSM profits 
for each process does not equal the general_profit.

The reason is general_profit_show() only considers ksm_pages_sharing,
whereas ksm_process_profit() accounts for both ksm_pages_sharing
and ksm_pages_shared for each process. By concentrating solely on 
ksm_pages_sharing, we can achieve a more accurate representation 
of actual profits.

Thanks for review and comments!

Longlong Xia (2):
  mm/ksm: calculate ksm_process_profit more accurately
  mm/ksm: Rename ksm_merging_pages to ksm_process_sharing

 Documentation/admin-guide/mm/ksm.rst          |  6 ++---
 Documentation/filesystems/proc.rst            |  6 ++---
 .../translations/zh_CN/admin-guide/mm/ksm.rst |  8 +++----
 .../translations/zh_TW/admin-guide/mm/ksm.rst |  8 +++----
 fs/proc/base.c                                | 10 ++++-----
 include/linux/mm_types.h                      |  2 +-
 mm/ksm.c                                      | 22 ++++++++-----------
 .../selftests/mm/ksm_functional_tests.c       | 10 ++++-----
 8 files changed, 34 insertions(+), 38 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2025-06-17 15:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04  3:17 [PATCH 0/2] mm/ksm: calculate ksm_process_profit more accurately Longlong Xia
2025-06-04  3:17 ` [PATCH 1/2] " Longlong Xia
2025-06-04  3:45   ` xu.xin16
2025-06-17 15:52   ` David Hildenbrand
2025-06-04  3:17 ` [PATCH 2/2] mm/ksm: Rename ksm_merging_pages to ksm_process_sharing Longlong Xia
2025-06-17 15:51   ` David Hildenbrand
2025-06-17 15:48 ` [PATCH 0/2] mm/ksm: calculate ksm_process_profit more accurately David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).