Re: [PATCH 01/14] mm: decouple protnone helpers from CONFIG_NUMA_BALANCING
From: SeongJae Park
Date: Thu Apr 30 2026 - 00:47:44 EST
On Mon, 27 Apr 2026 12:45:49 +0100 "Kiryl Shutsemau (Meta)" <kas@xxxxxxxxxx> wrote:
> pte_protnone() and pmd_protnone() detect present-but-inaccessible page
> table entries. This capability is useful beyond NUMA balancing — for
> example, userfaultfd working set tracking uses protnone PTEs to track
> page access without unmapping pages.
I agree. It can be useful for general access monitoring. I'm also slowly but
continuously working [1] to use that for DAMON.
>
> Introduce CONFIG_ARCH_HAS_PTE_PROTNONE to decouple the protnone PTE
> infrastructure from CONFIG_NUMA_BALANCING. The six architectures that
> support protnone PTEs (x86_64, arm64, powerpc, s390, riscv, loongarch)
> now select this option, and CONFIG_NUMA_BALANCING depends on it.
>
> No functional change — the same set of architectures continues to have
> working protnone support, but the infrastructure is now available
> independently of NUMA balancing.
I think this is a good change for making the infrastructure available for uffd.
I believe this can also be useful for making it further available for general
access monitoring purposes. I hope this to be landed on the mainline sooner
than later. Thank you for doing this, Kiryl!
>
> Signed-off-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
> Assisted-by: Claude:claude-opus-4-6
Acked-by: SeongJae Park <sj@xxxxxxxxxx>
[1] https://lore.kernel.org/linux-mm/20260218054320.4570-1-sj@xxxxxxxxxx/
Thanks,
SJ
[...]