migrate_pages03: remove wait_ksmd_full_scan() check because it's not necessary
PATCH 1/1 migrate_pages03: remove wait_ksmd_full_scan() check because it's not necessary
In reply to a message not in the archiveRemove wait_ksmd_full_scan() check because it's not a necessary step for migrate_pages03 syscall test:
1. KSM(kernel samepage merging) could be enabled and it is optional for migrate_pages syscall testing.
2. When server launched any qemu guest, wait_ksmd_full_scan() will in infinite loop due to /sys/kernel/mm/ksm/full_scans number would not increase anymore, and migrate_pages03 will failed with timeout reason. After removed wait_ksmd_full_scan(), migrate_pages03 could pass without issue.
--- testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 1 - 1 file changed, 1 deletion(-)
testcases/kernel/syscalls/migrate_pages/migrate_pages03.c +0 -1
@@ -95,7 +95,6 @@ static void setup(void)SAFE_FILE_SCANF (PATH_KSM "run" ,"%d" , &orig_ksm_run);SAFE_FILE_PRINTF (PATH_KSM "run" ,"%d" ,1 ); -wait_ksmd_full_scan (); }static void cleanup (void )
Signature · 5 lines
2.43.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Pengfei Xu <[email protected]> wrote:
Remove wait_ksmd_full_scan() check because it's not a necessary step for
Quoted 4 lines
migrate_pages03syscall test:
1. KSM(kernel samepage merging) could be enabled and it is optional formigrate_pagessyscall testing.
The wait_ksmd_full_scan guarantees the actual merging happens then test can migrate those merged KSM pages to reproduce the regression panic in kernel commit 4b0ece6fa0167b.
So this is a necessary configuration before testing.
Quoted 5 lines
2. When server launched any qemu guest,
wait_ksmd_full_scan()will in infinite loop due to/sys/kernel/mm/ksm/full_scansnumber would not increase anymore, andmigrate_pages03will failed with timeout reason. After removedwait_ksmd_full_scan(),migrate_pages03could pass without issue.
Yes, this timeout problem likely exists. That is the KSM design which can't avoid "unrelated" page merging happening in the background.
But removing the wait_ksmd_full_scan might not be a good approach IMHO.
Cc @Andrea Arcangeli <[email protected]> if he has good suggestions on the test.
Quoted 26 lines
Signed-off-by Pengfei Xu <[email protected]>--- testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 1 - 1 file changed, 1 deletion(-)testcases/kernel/syscalls/migrate_pages/migrate_pages03.c +0
-2@@ -95,7 +95,6 @@ static void setup(void)SAFE_FILE_SCANF (PATH_KSM "run" ,"%d" , &orig_ksm_run);SAFE_FILE_PRINTF (PATH_KSM "run" ,"%d" ,1 ); -wait_ksmd_full_scan (); }static void cleanup (void ) --2.43.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Sorry, forgot to cc Andrea Arcangeli in the last reply.
Quoted 61 lines · Li Wang
Pengfei Xu <[email protected]> wrote:
Remove
wait_ksmd_full_scan()check because it's not a necessary step forQuoted 4 lines
migrate_pages03syscall test:
1. KSM(kernel samepage merging) could be enabled and it is optional formigrate_pagessyscall testing.The
wait_ksmd_full_scanguarantees the actual merging happens then test can migrate those merged KSM pages to reproduce the regression panic in kernel commit4b0ece6fa0167b.So this is a necessary configuration before testing.
Quoted 5 lines
2. When server launched any qemu guest,
wait_ksmd_full_scan()will in infinite loop due to/sys/kernel/mm/ksm/full_scansnumber would not increase anymore, andmigrate_pages03will failed with timeout reason. After removedwait_ksmd_full_scan(),migrate_pages03could pass without issue.Yes, this timeout problem likely exists. That is the KSM design which can't avoid "unrelated" page merging happening in the background.
But removing thewait_ksmd_full_scanmight not be a good approach IMHO.Cc @Andrea Arcangeli <[email protected]> if he has good suggestions on the test.
Quoted 22 lines
Signed-off-by Pengfei Xu <[email protected]>--- testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 1 - 1 file changed, 1 deletion(-)testcases/kernel/syscalls/migrate_pages/migrate_pages03.c +0
-2@@ -95,7 +95,6 @@ static void setup(void)SAFE_FILE_SCANF (PATH_KSM "run" ,"%d" , &orig_ksm_run);SAFE_FILE_PRINTF (PATH_KSM "run" ,"%d" ,1 ); -wait_ksmd_full_scan (); }static void cleanup (void ) --2.43.0
Quoted 4 lines
--
Mailing list info: https://lists.linux.it/listinfo/ltp--
Regards,
Li Wang
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Li Wang and Andrea Arcangeli,
Quoted 18 lines · Li Wang
Sorry, forgot to cc Andrea Arcangeli in the last reply.
Quoted 13 lines · Li Wang
Pengfei Xu <[email protected]> wrote:
Remove
wait_ksmd_full_scan()check because it's not a necessary step forQuoted 4 lines
migrate_pages03syscall test:
1. KSM(kernel samepage merging) could be enabled and it is optional formigrate_pagessyscall testing.The
wait_ksmd_full_scanguarantees the actual merging happens then test can migrate those merged KSM pages to reproduce the regression panic in kernel commit4b0ece6fa0167b.So this is a necessary configuration before testing.
I did not consider the above situation. Is it possible to improve wait_ksmd_full_scan() to handle the scenario described in point 2?
Quoted 9 lines
Quoted 9 lines
Quoted 7 lines
2. When server launched any qemu guest,
wait_ksmd_full_scan()will in infinite loop due to/sys/kernel/mm/ksm/full_scansnumber would not increase anymore, andmigrate_pages03will failed with timeout reason. After removedwait_ksmd_full_scan(),migrate_pages03could pass without issue.
Quoted 3 lines
Quoted 3 lines
Yes, this timeout problem likely exists. That is the KSM design which can't avoid "unrelated" page merging happening in the background.
But removing thewait_ksmd_full_scanmight not be a good approach IMHO.
Yes, thanks for above background info sharing!
Best Regards,
Thank you!
Quoted 41 lines
Quoted 36 lines
Cc @Andrea Arcangeli <[email protected]> if he has good suggestions on the test.
Quoted 22 lines
Signed-off-by Pengfei Xu <[email protected]>--- testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 1 - 1 file changed, 1 deletion(-)testcases/kernel/syscalls/migrate_pages/migrate_pages03.c +0
-2@@ -95,7 +95,6 @@ static void setup(void)SAFE_FILE_SCANF (PATH_KSM "run" ,"%d" , &orig_ksm_run);SAFE_FILE_PRINTF (PATH_KSM "run" ,"%d" ,1 ); -wait_ksmd_full_scan (); }static void cleanup (void ) --2.43.0
Quoted 4 lines
--
Mailing list info: https://lists.linux.it/listinfo/ltp--
Regards,
Li WangSignature · 2 lines
Regards, Li Wang
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp