[PATCH 0/2] mm: Improve mlock tracking for large folios

kirill
2025-09-18T11:22:03Z

From: Kiryl Shutsemau <kas@kernel.org>

We do not mlock large folios on adding them to rmap deferring until
relaim. It leads to substantial undercount of Mlocked in /proc/meminfo.

This patchset improves the situation by mlocking large folios fully
mapped to the VMA.

Partially mapped large folios are still not accounted, but it brings
meminfo value closer to the truth and makes it useful.

Kiryl Shutsemau (2):
mm/fault: Try to map the entire file folio in finish_fault()
mm/rmap: Improve mlock tracking for large folios

mm/memory.c | 9 ++-------
mm/rmap.c | 13 ++++---------
2 files changed, 6 insertions(+), 16 deletions(-)

--
2.50.1