Re: [PATCH 2/5] mm/khugepaged: scan mm's more efficiently under mmap_lock contention

From: Lorenzo Stoakes (ARM)

Date: Thu Nov 05 2026 - 09:09:28 EST


On Thu, Nov 05, 2026 at 11:23:41AM +0100, David Hildenbrand (Arm) wrote:
> I could have sworn I saw a similar patch from Nico at some point ... maybe it
> was in a private discussion.

Ah, yeah, it seems a fairly obvious thing to do (as often these things
are), was surprised somebody hadn't already tried it.

>
>
> Am I correct or is the short version of this change "Remember the next scan
> address per MM instead of starting from address 0 whenever we continue scanning
> a MM after a skip; and we might skip under mmap lock contention" ?

Yes!

>
> I think a lot of the commit message above can be simplified.

The book author part of me comes through sometimes ;) Will try and cut it
down for the respin.

>
> Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

Thanks!

>
> --
> Cheers,
>
> David

--
Cheers, Lorenzo