Re: [RFC PATCH] mm: only set fault addrsss' access bit in do_anonymous_page

From: David Hildenbrand (Arm)

Date: Tue Feb 10 2026 - 04:08:41 EST


On 2/10/26 05:34, Wenchao Hao wrote:
When do_anonymous_page() creates mappings for huge pages, it currently sets
the access bit for all mapped PTEs (Page Table Entries) by default.

This causes an issue where the Referenced field in /proc/pid/smaps cannot
distinguish whether a page was actually accessed.

What is the use case that cares about that?

What we have right now is the exact same behavior as if you would get a PMD THP that has a single access+dirty bit at fault time.

Also, architectures that support transparent PTE coalescing will not be able to coalesce until all PTE bits are equal.

This level of imprecision is to be expected with large folios that only have a single access+dirty bit.

--
Cheers,

David