Re: [PATCH v4 0/2] mm/ksm: clean up scan_get_next_rmap_item() initialization

From: David Hildenbrand

Date: Tue Nov 17 2026 - 05:03:26 EST


On Tue, 17 Nov 2026 09:50:09 +0800, Xu Xin (vivo) wrote:
> Currently, scan_get_next_rmap_item() has grown quite large and complex.
> When introducing new features, such as the only-merge-zero-page mode we
> are currently working on, we don't want to add more complexity to it
> and don't want to touch rmap_item structures to avoid unnecessary overhead,
> so we need to extract some common logic.
>
> With these changes, the entry of scan_get_next_rmap_item() becomes much
> cleaner and easier to follow, instead of being cluttered with unrelated
> boilerplate such as stale stable_node pruning and cycle initialization.
>
> [...]

Applied, thanks!

tree: mm/core.git
branch: ksm-7.5.misc

Applied patches will appear soon in mm-next, followed by linux-next.

Please report any outstanding bugs that were missed during review, so we
can either drop the patch series or decide how to fix it up.

It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even
though the patches have already been applied. If possible, patch trailers
will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. Further, this is not a guarantee that the
patches will go upstream. If in doubt, please check the listed branch.

[1/2] mm/ksm: extract helper functions for scan cycle cleanup
https://git.kernel.org/mm/core/c/c3ee56cc
[2/2] mm/ksm: add initialization helpers for scan_get_next_rmap_item()
https://git.kernel.org/mm/core/c/0eec9abe

--
Cheers,

David