linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: xu xin <cgel.zte@gmail.com>
To: akpm@linux-foundation.org
Cc: adobriyan@gmail.com, willy@infradead.org, hughd@google.com,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, xu xin <xu.xin16@zte.com.cn>
Subject: [PATCH v2 0/2] ksm: count allocated rmap_items and update documentation
Date: Wed, 24 Aug 2022 04:00:36 +0000	[thread overview]
Message-ID: <20220824040036.215002-1-xu.xin16@zte.com.cn> (raw)

KSM can save memory by merging identical pages, but also can consume
additional memory, because it needs to generate rmap_items to save
each scanned page's brief rmap information.

To determine how beneficial the ksm-policy (like madvise), they are using
brings, so we add a new interface /proc/<pid>/ksm_alloced_items for each
process to indicate the total allocated ksm rmap_items of this process.

The detailed description can be seen in the following patches' commit message.


*** BLURB HERE ***

xu xin (2):
  ksm: count allocated ksm rmap_items for each process
  ksm: add profit monitoring documentation

 Documentation/admin-guide/mm/ksm.rst | 36 ++++++++++++++++++++++++++++
 fs/proc/base.c                       | 15 ++++++++++++
 include/linux/mm_types.h             |  5 ++++
 mm/ksm.c                             |  2 ++
 4 files changed, 58 insertions(+)

-- 
2.25.1



             reply	other threads:[~2022-08-24  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  4:00 xu xin [this message]
2022-08-24  4:01 ` [PATCH v2 1/2] ksm: count allocated ksm rmap_items for each process xu xin
2022-08-24  4:42   ` Bagas Sanjaya
2022-08-24  4:03 ` [PATCH v2 2/2] ksm: add profit monitoring documentation xu xin

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=20220824040036.215002-1-xu.xin16@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    --cc=xu.xin16@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