From: Dev Jain <dev.jain@arm.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
David Hildenbrand <david@redhat.com>
Cc: akpm@linux-foundation.org, catalin.marinas@arm.com,
will@kernel.org, Liam.Howlett@oracle.com, vbabka@suse.cz,
rppt@kernel.org, surenb@google.com, mhocko@suse.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
suzuki.poulose@arm.com, steven.price@arm.com, gshan@redhat.com,
linux-arm-kernel@lists.infradead.org,
yang@os.amperecomputing.com, ryan.roberts@arm.com,
anshuman.khandual@arm.com
Subject: Re: [PATCH v2 1/2] mm: Allow lockless kernel pagetable walking
Date: Wed, 11 Jun 2025 09:15:28 +0530 [thread overview]
Message-ID: <c99e60d8-57c3-4607-a0ea-b12ed6765b73@arm.com> (raw)
In-Reply-To: <359668fb-df61-4135-89ee-2675a06a5c1b@lucifer.local>
On 10/06/25 6:57 pm, Lorenzo Stoakes wrote:
> On Tue, Jun 10, 2025 at 03:24:16PM +0200, David Hildenbrand wrote:
>> On 10.06.25 14:07, Lorenzo Stoakes wrote:
>>> OK so I think the best solution here is to just update check_ops_valid(), which
>>> was kind of sucky anyway (we check everywhere but walk_page_range_mm() to
>>> enforce the install pte thing).
>>>
>>> Let's do something like:
>>>
>>> #define OPS_MAY_INSTALL_PTE (1<<0)
>>> #define OPS_MAY_AVOID_LOCK (1<<1)
>>>
>>> and update check_ops_valid() to take a flags or maybe 'capabilities' field.
>>>
>>> Then check based on this e.g.:
>>>
>>> if (ops->install_pte && !(capabilities & OPS_MAY_INSTALL_PTE))
>>> return false;
>>>
>>> if (ops->walk_lock == PGWALK_NOLOCK && !(capabilities & OPS_MAY_AVOID_LOCK))
>>> return false;
>>>
>> Hm. I mean, we really only want to allow this lockless check for
>> walk_kernel_page_table_range(), right?
>>
>> Having a walk_kernel_page_table_range_lockeless() might (or might not) be
>> better, to really only special-case this specific path.
> Agree completely, Dev - let's definitely do this.
Makes sense.
>
>> So, I am wondering if we should further start splitting the
>> kernel-page-table walker up from the mm walker, at least on the "entry"
>> function for now.
> How do you mean?
>
>> --
>> Cheers,
>>
>> David / dhildenb
>>
next prev parent reply other threads:[~2025-06-11 3:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 11:43 [PATCH v2 0/2] Enable permission change on arm64 kernel block mappings Dev Jain
2025-06-10 11:44 ` [PATCH v2 1/2] mm: Allow lockless kernel pagetable walking Dev Jain
2025-06-10 12:07 ` Lorenzo Stoakes
2025-06-10 12:40 ` Dev Jain
2025-06-10 12:57 ` Lorenzo Stoakes
2025-06-11 3:43 ` Dev Jain
2025-06-10 13:24 ` David Hildenbrand
2025-06-10 13:25 ` David Hildenbrand
2025-06-10 13:27 ` Lorenzo Stoakes
2025-06-10 13:31 ` David Hildenbrand
2025-06-10 13:35 ` Lorenzo Stoakes
2025-06-10 13:44 ` David Hildenbrand
2025-06-11 3:45 ` Dev Jain [this message]
2025-06-10 11:44 ` [PATCH v2 2/2] arm64: pageattr: Use walk_page_range_novma() to change memory permissions Dev Jain
2025-06-10 13:14 ` David Hildenbrand
2025-06-10 14:41 ` Ryan Roberts
2025-06-11 4:01 ` Dev Jain
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=c99e60d8-57c3-4607-a0ea-b12ed6765b73@arm.com \
--to=dev.jain@arm.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=david@redhat.com \
--cc=gshan@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=steven.price@arm.com \
--cc=surenb@google.com \
--cc=suzuki.poulose@arm.com \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=yang@os.amperecomputing.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;
as well as URLs for NNTP newsgroup(s).