[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4214d6d6-f8d5-43b3-a413-f576fdaf215d@redhat.com>
Date: Mon, 23 Jun 2025 21:45:34 +0200
From: David Hildenbrand <david@...hat.com>
To: Dev Jain <dev.jain@....com>, Alexander Gordeev <agordeev@...ux.ibm.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: move mask update out of the atomic context
On 23.06.25 12:09, Dev Jain wrote:
>
> On 23/06/25 3:07 pm, Alexander Gordeev wrote:
>> On Mon, Jun 23, 2025 at 02:26:29PM +0530, Dev Jain wrote:
>>> On 23/06/25 1:34 pm, Alexander Gordeev wrote:
>>>> There is not need to modify page table synchronization mask
>>>> while apply_to_pte_range() holds user page tables spinlock.
>>> I don't get you, what is the problem with the current code?
>>> Are you just concerned about the duration of holding the
>>> lock?
>> Yes.
>
> Doesn't really matter but still a correct change:
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)
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists