[LTP] [PATCH v1 1/1] migrate_pages03: remove wait_ksmd_full_scan() check because it's not necessary

Li Wang liwang@redhat.com
Thu Jul 18 12:09:56 CEST 2024


Sorry, forgot to cc Andrea Arcangeli in the last reply.


On Thu, Jul 18, 2024 at 6:06 PM Li Wang <liwang@redhat.com> wrote:

> Pengfei Xu <pengfei.xu@intel.com> wrote:
>
> Remove 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.
>>
>
> 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.
>
>
>> 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.
>
>
> 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 <aarcange@redhat.com> if he has good suggestions on
> the test.
>
>
>> Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
>> ---
>>  testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
>> b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
>> index 4d3299b61..f514ed10c 100644
>> --- a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
>> +++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
>> @@ -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
>>
>>
>
> --
> Regards,
> Li Wang
>


-- 
Regards,
Li Wang


More information about the ltp mailing list