[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250623080440.3005693-1-agordeev@linux.ibm.com>
Date: Mon, 23 Jun 2025 10:04:40 +0200
From: Alexander Gordeev <agordeev@...ux.ibm.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH] mm: move mask update out of the atomic context
There is not need to modify page table synchronization mask
while apply_to_pte_range() holds user page tables spinlock.
Signed-off-by: Alexander Gordeev <agordeev@...ux.ibm.com>
---
mm/memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/memory.c b/mm/memory.c
index 8eba595056fe..6849ab4e44bf 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3035,12 +3035,13 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
}
} while (pte++, addr += PAGE_SIZE, addr != end);
}
- *mask |= PGTBL_PTE_MODIFIED;
arch_leave_lazy_mmu_mode();
if (mm != &init_mm)
pte_unmap_unlock(mapped_pte, ptl);
+ *mask |= PGTBL_PTE_MODIFIED;
+
return err;
}
--
2.48.1
Powered by blists - more mailing lists