diff mbox series

[v2,1/2] mem: disable KSM smart scan for ksm tests

Message ID 20231201210930.2651725-2-shr@devkernel.io (mailing list archive)
State New
Headers show
Series KSM: support smart-scan feature | expand

Commit Message

Stefan Roesch Dec. 1, 2023, 9:09 p.m. UTC
This disables the "smart scan" KSM feature to make sure that the volatile
count remains at 0.

Signed-off-by: Stefan Roesch <shr@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/ksm/ksm01.c | 2 ++
 testcases/kernel/mem/ksm/ksm02.c | 2 ++
 testcases/kernel/mem/ksm/ksm03.c | 2 ++
 testcases/kernel/mem/ksm/ksm04.c | 2 ++
 4 files changed, 8 insertions(+)

Comments

Petr Vorel Dec. 4, 2023, 10:45 a.m. UTC | #1
Hi Stefan,

> This disables the "smart scan" KSM feature to make sure that the volatile
> count remains at 0.

> Signed-off-by: Stefan Roesch <shr@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/ksm/ksm01.c | 2 ++
>  testcases/kernel/mem/ksm/ksm02.c | 2 ++
>  testcases/kernel/mem/ksm/ksm03.c | 2 ++
>  testcases/kernel/mem/ksm/ksm04.c | 2 ++
Li suggested in v1, that also ksm0[56].c should disable smart_scan (ksm05.c is
questionable, but since you prepared ksm07 it can IMHO be disable in both ksm0[56].c).

https://lore.kernel.org/ltp/CAEemH2fqamX720diM1N+iN9a8HM30_5sHg8V0EMHgHdrh3iZPw@mail.gmail.com/

With that, you can add:
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr
Stefan Roesch Dec. 4, 2023, 6:38 p.m. UTC | #2
Petr Vorel <pvorel@suse.cz> writes:

> Hi Stefan,
>
>> This disables the "smart scan" KSM feature to make sure that the volatile
>> count remains at 0.
>
>> Signed-off-by: Stefan Roesch <shr@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/ksm/ksm01.c | 2 ++
>>  testcases/kernel/mem/ksm/ksm02.c | 2 ++
>>  testcases/kernel/mem/ksm/ksm03.c | 2 ++
>>  testcases/kernel/mem/ksm/ksm04.c | 2 ++
> Li suggested in v1, that also ksm0[56].c should disable smart_scan (ksm05.c is
> questionable, but since you prepared ksm07 it can IMHO be disable in both ksm0[56].c).
>
> https://lore.kernel.org/ltp/CAEemH2fqamX720diM1N+iN9a8HM30_5sHg8V0EMHgHdrh3iZPw@mail.gmail.com/
>
> With that, you can add:
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Kind regards,
> Petr

The next version will also disable smart scan for ksm05 and ksm06
Stefan Roesch Dec. 4, 2023, 6:38 p.m. UTC | #3
Petr Vorel <pvorel@suse.cz> writes:

> Hi Stefan,
>
>> This disables the "smart scan" KSM feature to make sure that the volatile
>> count remains at 0.
>
>> Signed-off-by: Stefan Roesch <shr@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/ksm/ksm01.c | 2 ++
>>  testcases/kernel/mem/ksm/ksm02.c | 2 ++
>>  testcases/kernel/mem/ksm/ksm03.c | 2 ++
>>  testcases/kernel/mem/ksm/ksm04.c | 2 ++
> Li suggested in v1, that also ksm0[56].c should disable smart_scan (ksm05.c is
> questionable, but since you prepared ksm07 it can IMHO be disable in both ksm0[56].c).
>
> https://lore.kernel.org/ltp/CAEemH2fqamX720diM1N+iN9a8HM30_5sHg8V0EMHgHdrh3iZPw@mail.gmail.com/
>
> With that, you can add:
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Kind regards,
> Petr

The next version will also disable smart scan for ksm05 and ksm06
diff mbox series

Patch

diff --git a/testcases/kernel/mem/ksm/ksm01.c b/testcases/kernel/mem/ksm/ksm01.c
index bcd095865..e2d3d9e00 100644
--- a/testcases/kernel/mem/ksm/ksm01.c
+++ b/testcases/kernel/mem/ksm/ksm01.c
@@ -86,6 +86,8 @@  static struct tst_test test = {
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
 		{"/sys/kernel/mm/ksm/merge_across_nodes", "1",
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
+		{"/sys/kernel/mm/ksm/smart_scan", "0",
+			TST_SR_SKIP_MISSING | TST_SR_TBROK_RO},
 		{}
 	},
 	.needs_kconfigs = (const char *const[]){
diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c
index bce639dce..3707de95d 100644
--- a/testcases/kernel/mem/ksm/ksm02.c
+++ b/testcases/kernel/mem/ksm/ksm02.c
@@ -107,6 +107,8 @@  static struct tst_test test = {
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
 		{"/sys/kernel/mm/ksm/merge_across_nodes", "1",
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
+		{"/sys/kernel/mm/ksm/smart_scan", "0",
+			TST_SR_SKIP_MISSING | TST_SR_TBROK_RO},
 		{}
 	},
 	.needs_kconfigs = (const char *const[]){
diff --git a/testcases/kernel/mem/ksm/ksm03.c b/testcases/kernel/mem/ksm/ksm03.c
index 4a733269f..cff74700d 100644
--- a/testcases/kernel/mem/ksm/ksm03.c
+++ b/testcases/kernel/mem/ksm/ksm03.c
@@ -89,6 +89,8 @@  static struct tst_test test = {
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
 		{"/sys/kernel/mm/ksm/merge_across_nodes", "1",
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
+		{"/sys/kernel/mm/ksm/smart_scan", "0",
+			TST_SR_SKIP_MISSING | TST_SR_TBROK_RO},
 		{}
 	},
 	.needs_kconfigs = (const char *const[]){
diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c
index 4f1f2f721..9935e32d7 100644
--- a/testcases/kernel/mem/ksm/ksm04.c
+++ b/testcases/kernel/mem/ksm/ksm04.c
@@ -109,6 +109,8 @@  static struct tst_test test = {
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
 		{"/sys/kernel/mm/ksm/merge_across_nodes", "1",
 			TST_SR_SKIP_MISSING | TST_SR_TCONF_RO},
+		{"/sys/kernel/mm/ksm/smart_scan", "0",
+			TST_SR_SKIP_MISSING | TST_SR_TBROK_RO},
 		{}
 	},
 	.needs_kconfigs = (const char *const[]){