Re: [PATCH v3 3/4] selftests/mm: move waiting for KSM full scans into a helper
From: David Hildenbrand (Arm)
Date: Sat Nov 07 2026 - 14:51:00 EST
On 11/7/26 17:57, Qiliang Yuan wrote:
> ksm_start() enables ksmd and then polls full_scans until two more full
> scans have completed, so that any merging that can happen has happened.
>
> There is no helper to wait for a number of full scans while ksmd is
> already running, so a test that needs one has to copy that loop.
>
> Move the loop into ksm_wait_full_scans() and make ksm_start() call it
> after enabling ksmd. The count is now read after ksmd starts rather than
> before, which can only make ksm_start() wait longer.
Right, we don't care about that
Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David