Re: [PATCH v3 2/2] mm/ksm: fix advisor_min_pages_to_scan description
"David Hildenbrand (Arm)" <[email protected]>
| Newsgroups | org.kernel.vger.linux-doc,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 8/24/26 08:10, Jinjiang Tu wrote:
> Both Documentation/admin-guide/mm/ksm.rst and the comment next to the
> variable definition in mm/ksm.c describe advisor_min_pages_to_scan as a
> lower limit of the pages_to_scan parameter, but that is not how the
> scan-time advisor actually uses it. commit 4e5fa4f5eff6 ("mm/ksm: add ksm
> advisor") only uses it to initialize ksm_thread_pages_to_scan when the
> scan-time advisor is enabled.
>
> ksm_thread_pages_to_scan is adjusted by scan_time_advisor() after a full
> scan finishes. ksm_thread_pages_to_scan could be increased or decreased
> depend on the real scan time is longer or shorter than the target scan
> time. The min value of ksm_thread_pages_to_scan is only limited by
> KSM_ADVISOR_MIN_CPU, so ksm_thread_pages_to_scan could be smaller than
> ksm_advisor_min_pages_to_scan.
>
> The semantics of advisor_min_pages_to_scan was updated in the v2 patchset
> [1], but the documentation wasn't updated.
>
> Update the documentation and comment to match the semantics of
> advisor_min_pages_to_scan.
>
> Link: https://lore.kernel.org/linux-mm/[email protected]/ [1]
> Signed-off-by: Jinjiang Tu <[email protected]>
> ---
Acked-by: David Hildenbrand (Arm) <[email protected]>
--
Cheers,
David