Skip to content

LTP syscall "migrate_pages03" case will be failed due to infinite loop and timeout when any qemu guest is launched in v6.8 - v6.10 kernel #1166

Open
@xupengfe

Description

@xupengfe

LTP syscall "migrate_pages03" case will be failed due to infinite loop and timeout when any qemu guest is launched in v6.8 - v6.10 kernel

ltp/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c


-> wait_ksmd_full_scan();
ltp/testcases/kernel/lib/ksm_helper.c wait_ksmd_full_scan()
https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/lib/ksm_helper.c
while (full_scans < at_least_one_full_scan) { sleep(1); count++; SAFE_FILE_SCANF(PATH_KSM "full_scans", "%lu", &full_scans); }

-> SAFE_FILE_SCANF(PATH_KSM "full_scans", "%lu", &full_scans); // After this function, /sys/kernel/mm/ksm/full_scans should increase without guest launched and then it could exit the loop as expected.
But when qemu launched guest is launched, /sys/kernel/mm/ksm/full_scans for KSM(kernel samepage merging) will not increase, and then it will execute above infinite loop until timeout.

We need to know if it's a normal behavior and it's better to improve the above wait_ksmd_full_scan() function to avoid infinite loop situation.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions