From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Xueyuan Chen <xueyuan.chen21@gmail.com>,
akpm@linux-foundation.org, ljs@kernel.org, usama.arif@linux.dev,
ziy@nvidia.com, baolin.wang@linux.alibaba.com,
liam@infradead.org, nico.pache@linux.dev, ryan.roberts@arm.com,
dev.jain@arm.com, baohua@kernel.org, lance.yang@linux.dev,
kas@kernel.org, catalin.marinas@arm.com, will@kernel.org,
mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
luto@kernel.org, peterz@infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/3] mm: make persistent huge zero folio read-only
Date: Mon, 7 Sep 2026 16:48:01 +0200 [thread overview]
Message-ID: <2e8dae0b-d81e-4c5d-b4d5-c80bde07a314@kernel.org> (raw)
In-Reply-To: <ap7L2UEriz6DJfif@kernel.org>
On 9/7/26 16:36, Mike Rapoport wrote:
> On Mon, Sep 07, 2026 at 01:18:42PM +0200, David Hildenbrand (Arm) wrote:
>> On 9/7/26 08:03, Mike Rapoport wrote:
>>> Hi Xueyuan,
>>>
>>>
>>> And I believe this is an historical artifact rather than necessity. For
>>> configurations that allow set_direct_map on arm64, change_memory_common can
>>> update direct map too, it just need to be implemented there.
>>>
>>
>> Are we sure the other architectures do what we want in their set_memory_ro?
>
> It's a zoo right now :(
Yeah, that's why I'm asking :)
> Although most of them do.
>
> But we need to sort it out anyway because of increasingly growing demand
> for modifications of the kernel page tables.
The question really is whether we want to use a single interface for all page
tables.
I quite like a page-based directmap interface. Other page table areas are not
necessarily page-based. It also expresses which types of operations we expect on
the direct map.
One could, of course, use set_memory_ro() internally to implement
set_direct_map_ro() (and similarly for other variants); but at least
set_direct_map_*() would have clear, well documented semantics.
>
> I started something here:
> https://lore.kernel.org/linux-mm/20260721-generic-set-memory-v0-1-v1-0-2c1fc62306b3@kernel.org/
>
> Now that x86 CPA is nearly fixed, I can look into the next iteration.
>
>> Having a dedicated set_direct_map_ro() with clear (documented ;)) semantics does
>> not sound too crazy to me.
>
> It's not too crazy, no.
>
> Still making arm64 more aligned with x86 and other arches that update the
> direct/linear map in the set_memory_ro() seem a good thing on it's own.
Right, but I'd much rather user set_memory_ro() later to implement
set_direct_map_ro() [initially on architectures where we made sure that it
actually does what we expect? later maybe generically]
--
Cheers,
David
next prev parent reply other threads:[~2026-09-07 14:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 15:18 [PATCH v7 0/3] mm: make persistent huge zero folio read-only Xueyuan Chen
2026-09-01 15:18 ` [PATCH v7 1/3] " Xueyuan Chen
2026-09-02 20:59 ` Dave Hansen
2026-09-03 1:19 ` Xueyuan Chen
2026-09-03 9:20 ` Mike Rapoport
2026-09-03 14:09 ` Dave Hansen
2026-09-04 3:27 ` Xueyuan Chen
2026-09-03 9:22 ` Mike Rapoport
2026-09-03 12:49 ` Xueyuan Chen
2026-09-06 10:00 ` Mike Rapoport
2026-09-07 1:11 ` Xueyuan Chen
2026-09-07 6:03 ` Mike Rapoport
2026-09-07 11:18 ` David Hildenbrand (Arm)
2026-09-07 14:36 ` Mike Rapoport
2026-09-07 14:48 ` David Hildenbrand (Arm) [this message]
2026-09-08 7:35 ` Xueyuan Chen
2026-09-08 8:29 ` David Hildenbrand (Arm)
2026-09-08 14:48 ` Xueyuan Chen
2026-09-09 15:18 ` David Hildenbrand (Arm)
2026-09-10 6:22 ` Xueyuan Chen
2026-09-10 7:24 ` Mike Rapoport
2026-09-10 7:33 ` David Hildenbrand (Arm)
2026-09-10 7:46 ` Xueyuan Chen
2026-09-01 15:18 ` [PATCH v7 2/3] arm64/mm: add set_direct_map_ro() Xueyuan Chen
2026-09-01 15:18 ` [PATCH v7 3/3] x86/mm: " Xueyuan Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e8dae0b-d81e-4c5d-b4d5-c80bde07a314@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=dev.jain@arm.com \
--cc=hpa@zytor.com \
--cc=kas@kernel.org \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=nico.pache@linux.dev \
--cc=peterz@infradead.org \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=tglx@kernel.org \
--cc=usama.arif@linux.dev \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=xueyuan.chen21@gmail.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox