Re: [PATCH 1/2] mm/ksm: calculate ksm_process_profit more accurately

From: David Hildenbrand
Date: Tue Jun 17 2025 - 12:05:38 EST


On 04.06.25 05:17, Longlong Xia wrote:
The 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. This discrepancy leads to
the sum of ksm_process_profit() across all processes not being equal
to general_profit_show().

Fixes: 7609385337a4 ("ksm: count ksm merging pages for each process")
Signed-off-by: Longlong Xia <xialonglong@xxxxxxxxxx>
---


What happened to the original idea of [1]

[1] https://lkml.kernel.org/r/20250606070314.3028593-1-xialonglong@xxxxxxxxxx

--
Cheers,

David / dhildenb