From: Chengming Zhou <chengming.zhou@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Stefan Roesch <shr@devkernel.io>, xu xin <xu.xin16@zte.com.cn>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
zhouchengming@bytedance.com,
Chengming Zhou <chengming.zhou@linux.dev>
Subject: [PATCH 0/4] mm/ksm: fix some accounting problems
Date: Wed, 08 May 2024 17:55:37 +0800 [thread overview]
Message-ID: <20240508-b4-ksm-counters-v1-0-e2a9b13f70c5@linux.dev> (raw)
We encounter some abnormal ksm_pages_scanned and ksm_zero_pages during
some random tests.
1. ksm_pages_scanned unchanged even ksmd scanning has progress.
2. ksm_zero_pages maybe -1 in some rare cases.
The first two patches fix these problems and the last two patches are
minor optimizations about ksm_stable_node and general_profit calculation.
Thanks for review and comments!
Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>
---
Chengming Zhou (4):
mm/ksm: fix ksm_pages_scanned accounting
mm/ksm: fix ksm_zero_pages accounting
mm/ksm: union hlist_node with list_head in struct ksm_stable_node
mm/ksm: calculate general_profit more accurately
fs/proc/base.c | 2 +-
include/linux/ksm.h | 22 +++++++++++++++++++---
include/linux/mm_types.h | 2 +-
mm/ksm.c | 33 ++++++++++++++++++++-------------
4 files changed, 41 insertions(+), 18 deletions(-)
---
base-commit: fb0f40125feec3de7ef4524600ac83946207117e
change-id: 20240508-b4-ksm-counters-04817b40d3ee
Best regards,
--
Chengming Zhou <chengming.zhou@linux.dev>
next reply other threads:[~2024-05-08 9:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 9:55 Chengming Zhou [this message]
2024-05-08 9:55 ` [PATCH 1/4] mm/ksm: fix ksm_pages_scanned accounting Chengming Zhou
2024-05-08 10:35 ` Chengming Zhou
2024-05-08 12:32 ` David Hildenbrand
2024-05-08 9:55 ` [PATCH 2/4] mm/ksm: fix ksm_zero_pages accounting Chengming Zhou
2024-05-08 10:37 ` Chengming Zhou
2024-05-08 12:36 ` David Hildenbrand
2024-05-08 13:52 ` Chengming Zhou
2024-05-08 9:55 ` [PATCH 3/4] mm/ksm: union hlist_node with list_head in struct ksm_stable_node Chengming Zhou
2024-05-08 9:55 ` [PATCH 4/4] mm/ksm: calculate general_profit more accurately Chengming Zhou
2024-05-08 10:24 ` [PATCH 0/4] mm/ksm: fix some accounting problems David Hildenbrand
2024-05-08 10:28 ` Chengming Zhou
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=20240508-b4-ksm-counters-v1-0-e2a9b13f70c5@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=shr@devkernel.io \
--cc=xu.xin16@zte.com.cn \
--cc=zhouchengming@bytedance.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).