Re: [RFC PATCH v2 1/3] mm/huge_memory: make persistent huge zero folio read-only
From: David Hildenbrand (Arm)
Date: Thu Jun 18 2026 - 08:37:22 EST
On 6/18/26 13:48, Xueyuan Chen wrote:
>
> On Thu, Jun 18, 2026 at 11:06:41AM +0200, David Hildenbrand (Arm) wrote:
>
> Hi, David
>
> [...]
>
>>>
>>> How about naming it int set_direct_map_ro(struct page *page, unsigned nr)?
>>
>> To distinguish it from "set_memory*" cruft, maybe best to use "remap" or
>> "adjust" instead.
>>
>
> OK, how about `remap_direct_map_ro`? If no objections, I will add this
> API to `set_memory.h` in the next version.
Best to wait for some feedback.
I do wonder whether we want to pass an address instead of a page.
https://lore.kernel.org/r/20260410151746.61150-2-kalyazin@xxxxxxxxxx
Wants to convert existing ones as well.
That would imply that the caller must check for highmem.
But then, we could just use existing set_memory_ro(), right?
--
Cheers,
David