From: David Hildenbrand <david@redhat.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Dev Jain <dev.jain@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: move mask update out of the atomic context
Date: Tue, 24 Jun 2025 11:40:05 +0200 [thread overview]
Message-ID: <75717e4e-51d0-41a2-8463-45097fc3875b@redhat.com> (raw)
In-Reply-To: <aFpxvQxgUEdO9jd/@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com>
On 24.06.25 11:37, Alexander Gordeev wrote:
> On Mon, Jun 23, 2025 at 09:45:34PM +0200, David Hildenbrand wrote:
> ...
>> Let's ask the real questions: who checks PGTBL_PTE_MODIFIED?
>>
>> I see
>>
>> if (mask & ARCH_PAGE_TABLE_SYNC_MASK)
>> arch_sync_kernel_mappings(start, start + size);
>>
>> And then
>>
>> arch/arm/include/asm/page.h:#define ARCH_PAGE_TABLE_SYNC_MASK PGTBL_PMD_MODIFIED
>> arch/x86/include/asm/pgtable-2level_types.h:#define ARCH_PAGE_TABLE_SYNC_MASK PGTBL_PMD_MODIFIED
>> arch/x86/include/asm/pgtable-3level_types.h:#define ARCH_PAGE_TABLE_SYNC_MASK PGTBL_PMD_MODIFIED
>>
>>
>> Which makes me wonder why we need PGTBL_PTE_MODIFIED at all? Is there some other check I am missing?
>>
>> (same question regarding everything excepy PGTBL_PMD_MODIFIED, because that actually seems to be used)
>
> AFAICT it was thought as architecture-specific:
>
> /*
> * Architectures can set this mask to a combination of PGTBL_P?D_MODIFIED values
> * and let generic vmalloc and ioremap code know when arch_sync_kernel_mappings()
> * needs to be called.
> */
> #ifndef ARCH_PAGE_TABLE_SYNC_MASK
> #define ARCH_PAGE_TABLE_SYNC_MASK 0
> #endif
>
> Not sure if that needs to be addressed at all.
Okay, if there are no users of PGTBL_PTE_MODIFIED we could just ...
remove it. Dead code.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-06-24 9:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 8:04 [PATCH] mm: move mask update out of the atomic context Alexander Gordeev
2025-06-23 8:56 ` Dev Jain
2025-06-23 9:37 ` Alexander Gordeev
2025-06-23 10:09 ` Dev Jain
2025-06-23 19:45 ` David Hildenbrand
2025-06-24 9:37 ` Alexander Gordeev
2025-06-24 9:40 ` David Hildenbrand [this message]
2025-06-24 12:00 ` Alexander Gordeev
2025-06-24 12:03 ` David Hildenbrand
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=75717e4e-51d0-41a2-8463-45097fc3875b@redhat.com \
--to=david@redhat.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dev.jain@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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).