Re: [PATCH v3 0/3] mm/khugepaged: bound mmap_lock hold time when walking an mm's VMAs
From: David Hildenbrand
Date: Thu Nov 12 2026 - 04:47:16 EST
On Tue, 10 Nov 2026 17:19:10 +0000, Lorenzo Stoakes (ARM) wrote:
> This series introduces a couple small changes to khugepaged to improve its
> behaviour both in the face of mm->mmap_lock contention and to reduce that
> lock contention when possible.
>
> Looking at the first change - if the mmap lock is contended, an attempted
> mmap trylock in collapse_scan_mm_slot() will result in the scan being
> aborted wherever it happens to be, and when next the mm is processed it
> starts from the beginning again.
>
> [...]
Applied, thanks!
tree: mm/core.git
branch: thp-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/3] Revert "mm/khugepaged: remove definition of struct khugepaged_mm_slot"
https://git.kernel.org/mm/core/c/3734f01d
[2/3] mm/khugepaged: scan mm's more efficiently under mmap_lock contention
https://git.kernel.org/mm/core/c/f4720f7b
[3/3] mm/khugepaged: release contended mmap read lock after scanning enough VMAs
https://git.kernel.org/mm/core/c/f616e41a
--
Cheers,
David