From: Chengming Zhou <chengming.zhou@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Hugh Dickins <hughd@google.com>,
Andrea Arcangeli <aarcange@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 v2 0/2] mm/ksm: fix some accounting problems
Date: Mon, 13 May 2024 10:48:35 +0800 [thread overview]
Message-ID: <20240513-b4-ksm-counters-v2-0-f2520183a8ca@linux.dev> (raw)
Changes in v2:
- Add Fixes and Acked-by tags from David Hildenbrand, thanks!
- Inline atomic_long_read(&ksm_zero_pages), per David Hildenbrand.
- Don't include the last two optimization patches to keep this fix
simple.
- Link to v1: https://lore.kernel.org/r/20240508-b4-ksm-counters-v1-0-e2a9b13f70c5@linux.dev
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.
Thanks for review and comments!
Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>
---
Chengming Zhou (2):
mm/ksm: fix ksm_pages_scanned accounting
mm/ksm: fix ksm_zero_pages accounting
fs/proc/base.c | 2 +-
include/linux/ksm.h | 17 ++++++++++++++---
include/linux/mm_types.h | 2 +-
mm/ksm.c | 17 +++++++----------
4 files changed, 23 insertions(+), 15 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-13 2:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 2:48 Chengming Zhou [this message]
2024-05-13 2:48 ` [PATCH v2 1/2] mm/ksm: fix ksm_pages_scanned accounting Chengming Zhou
2024-05-13 2:48 ` [PATCH v2 2/2] mm/ksm: fix ksm_zero_pages accounting Chengming Zhou
2024-05-13 6:00 ` xu xin
2024-05-13 6:17 ` 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=20240513-b4-ksm-counters-v2-0-f2520183a8ca@linux.dev \
--to=chengming.zhou@linux.dev \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hughd@google.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).