linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] mem: disable KSM smart scan for ksm tests
@ 2023-11-27 17:45 Stefan Roesch
  2023-11-28  7:46 ` [LTP] " Petr Vorel
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roesch @ 2023-11-27 17:45 UTC (permalink / raw)
  To: kernel-team; +Cc: shr, david, oliver.sang, linux-mm, ltp

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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-01 20:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27 17:45 [PATCH v1] mem: disable KSM smart scan for ksm tests Stefan Roesch
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

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 NNTP newsgroup(s).