From: Stefan Roesch <shr@devkernel.io>
To: kernel-team@fb.com
Cc: shr@devkernel.io, david@redhat.com, oliver.sang@intel.com,
linux-mm@kvack.org, ltp@lists.linux.it
Subject: [PATCH v1] mem: disable KSM smart scan for ksm tests
Date: Mon, 27 Nov 2023 09:45:17 -0800 [thread overview]
Message-ID: <20231127174517.2369593-1-shr@devkernel.io> (raw)
This disables the "smart scan" KSM feature to make sure that the volatile
count remains at 0.
Signed-off-by: Stefan Roesch <devkernel.io>
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202311161132.13d8ce5a-oliver.sang@intel.com
---
testcases/kernel/mem/lib/mem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
index fbfeef026..ef274a3ac 100644
--- a/testcases/kernel/mem/lib/mem.c
+++ b/testcases/kernel/mem/lib/mem.c
@@ -454,6 +454,9 @@ void create_same_memory(int size, int num, int unit)
{'a', size*MB}, {'a', size*MB}, {'d', size*MB}, {'d', size*MB},
};
+ /* Disable smart scan for correct volatile counts. */
+ SAFE_FILE_PRINTF(PATH_KSM "smart_scan", "0");
+
ps = sysconf(_SC_PAGE_SIZE);
pages = MB / ps;
@@ -526,6 +529,7 @@ void create_same_memory(int size, int num, int unit)
tst_res(TINFO, "stop KSM.");
SAFE_FILE_PRINTF(PATH_KSM "run", "0");
+ SAFE_FILE_PRINTF(PATH_KSM "smart_scan", "1");
final_group_check(0, 0, 0, 0, 0, 0, size * pages * num);
while (waitpid(-1, &status, 0) > 0)
base-commit: 8c89ef3d451087ed6e18750bd5eedd10e5ab3d2e
--
2.39.3
next reply other threads:[~2023-11-27 17:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 17:45 Stefan Roesch [this message]
2023-11-28 7:46 ` [LTP] " Petr Vorel
2023-11-28 10:35 ` Li Wang
2023-11-28 16:51 ` Petr Vorel
2023-11-29 3:51 ` Li Wang
2023-11-29 10:10 ` Petr Vorel
2023-12-01 20:11 ` Stefan Roesch
2023-12-01 20:06 ` Stefan Roesch
2023-12-01 20:02 ` Stefan Roesch
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=20231127174517.2369593-1-shr@devkernel.io \
--to=shr@devkernel.io \
--cc=david@redhat.com \
--cc=kernel-team@fb.com \
--cc=linux-mm@kvack.org \
--cc=ltp@lists.linux.it \
--cc=oliver.sang@intel.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