linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: move mask update out of the atomic context
@ 2025-06-23  8:04 Alexander Gordeev
  2025-06-23  8:56 ` Dev Jain
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Gordeev @ 2025-06-23  8:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel

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@linux.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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-24 12:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-06-24 12:00             ` Alexander Gordeev
2025-06-24 12:03               ` David Hildenbrand

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).