linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chengming Zhou <chengming.zhou@linux.dev>
To: David Hildenbrand <david@redhat.com>,
	Sung-hun Kim <sfoon.kim@samsung.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Cc: sungguk.na@samsung.com, sw0312.kim@samsung.com, sebuns@gmail.com
Subject: Re: [PATCH v2] mm: ksm: Consider the number of ksm_mm_slot in the general_profit calculation
Date: Fri, 21 Jun 2024 10:30:22 +0800	[thread overview]
Message-ID: <9e4bba64-c13f-4157-9258-c9b647ba9dd2@linux.dev> (raw)
In-Reply-To: <254bf3e0-0056-4593-94ee-8431a1bfc430@redhat.com>

On 2024/6/21 03:38, David Hildenbrand wrote:
> On 20.06.24 06:39, Sung-hun Kim wrote:
>> The current version of KSM does not take into account the number of
>> used ksm_mm_slot. Therefore, when users want to obtain profits of
>> KSM, KSM omits the memory used for allocating ksm_mm_slots.
>>
>> This patch introduces a new variable to keep track of the number of
>> allocated ksm_mm_slots. By doing so, KSM will be able to provide a
>> more accurate number of the gains made.
> 
> If you take a look at the calculation explained in 
> Documentation/admin-guide/mm/ksm.rst, we only care about rmap_items, 
> which can grow rather substantially in size.
> 
> We also don't consider other metadata, such as the size of the stable 
> nodes etc. So why should the ksm_mm_slots matter that much that we 
> should track them and account them?

BTW, the size of stable_nodes should be more than these mm_slots,
we have one stable_nodes for each KSM page now.

But agree, we only care about the rmap_items, which is the majority
of used memory resource in KSM.



  reply	other threads:[~2024-06-21  2:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240620043920epcas1p1b57dce789304aa96fd83e5b2b194d244@epcas1p1.samsung.com>
2024-06-20  4:39 ` Sung-hun Kim
2024-06-20 19:38   ` David Hildenbrand
2024-06-21  2:30     ` Chengming Zhou [this message]
2024-07-11  5:19     ` Sung-hun Kim
2024-07-11  6:32       ` Chengming Zhou
2024-06-20 20:47   ` Andrew Morton
2024-07-11  5:25     ` Sung-hun Kim
2024-07-11  6:10     ` Sung-hun Kim

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=9e4bba64-c13f-4157-9258-c9b647ba9dd2@linux.dev \
    --to=chengming.zhou@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sebuns@gmail.com \
    --cc=sfoon.kim@samsung.com \
    --cc=sungguk.na@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /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