Re: [LSF/MM/BPF TOPIC][RFC PATCH v4 00/27] Private Memory Nodes (w/ Compressed RAM)

David Hildenbrand (Arm)
2026-03-17T13:06:12Z

On 2/23/26 17:08, Gregory Price wrote:
> On Mon, Feb 23, 2026 at 09:54:55AM -0500, Gregory Price wrote:
>> On Mon, Feb 23, 2026 at 02:07:15PM +0100, David Hildenbrand (Arm) wrote:
>>>
>>> I'm concerned about adding more special-casing (similar to what we already
>>> added for ZONE_DEVICE) all over the place.
>>>
>>> Like the whole folio_managed_() stuff in mprotect.c
>>>
>>> Having that said, sounds like a reasonable topic to discuss.
>>>
>>
>> Another option would be to add the hook to vma_wants_writenotify()
>> instead of the page table code - and mask MM_CP_TRY_CHANGE_WRITABLE.
>>
>
> scratch all this - existing hooks exist for exactly this purpose:
>
> can_change_[pte|pmd]_writable()
>
> Surprised I missed this.
>
> I can clean this up to remove it from the page table walks.

Sorry for the late reply -- sounds like we can handle this cleaner.

But I am wondering: why is this even required?

Is it just for "Services that intercept write faults (e.g., for
promotion tracking) need PTEs to stay read-only"

But that promotion tracking sounds like some orthogonal work to me. What
am I missing that this is required in this patch set? (is it just for
the special compressed RAM bits?)

--
Cheers,

David