]> Gentwo Git Trees - linux/.git/commit
mm/rmap: mlock large folios in try_to_unmap_one()
authorKiryl Shutsemau <kas@kernel.org>
Tue, 23 Sep 2025 11:07:08 +0000 (12:07 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 28 Sep 2025 18:51:30 +0000 (11:51 -0700)
commit8c49fbafedf15149069cdb9e0d543c4a68a1c683
treef7068436cb6105fb88c3067905bbcddccaad456f
parenta2880202767daded2898f62265f6cdf4cfb53bc4
mm/rmap: mlock large folios in try_to_unmap_one()

Currently, try_to_unmap_once() only tries to mlock small folios.

Use logic similar to folio_referenced_one() to mlock large folios: only do
this for fully mapped folios and under page table lock that protects all
page table entries.

[akpm@linux-foundation.org: s/CROSSSED/CROSSED/]
Link: https://lkml.kernel.org/r/20250923110711.690639-4-kirill@shutemov.name
Signed-off-by: Kiryl Shutsemau <kas@kernel.org>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/rmap.c