From: Jann Horn Date: Wed, 28 May 2025 21:06:17 +0000 (+0200) Subject: mm/gup: update comment explaining why gup_fast() disables IRQs X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=52084f258e46f09a71063447df31cbd48c0cacd0;p=linux-2.6-microblaze.git mm/gup: update comment explaining why gup_fast() disables IRQs The current comment in gup_fast() talks about "IPIs that come from THPs splitting", which is outdated and refers to the old THP splitting implementation that was removed in commit ad0bed24e98b ("thp: drop all split_huge_page()-related code"), which landed in v4.5. Before then, THP splitting involved a pmdp_splitting_flush(), which sent an IPI to serialize against gup_fast(). Nowadays, we use tlb_remove_table_sync_one() to send IPIs that serialize against gup_fast(); this is used, for example, in THP *collapsing* to stop gup_fast() walks of a page table before depositing it. Link: https://lkml.kernel.org/r/20250528-gup-irq-comment-fix-v1-1-b9d83c345333@google.com Signed-off-by: Jann Horn Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: John Hubbard Cc: Kirill A. Shuemov Cc: Peter Xu Signed-off-by: Andrew Morton --- diff --git a/mm/gup.c b/mm/gup.c index 329c5f7acc7a..e065a49842a8 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -3299,7 +3299,7 @@ static unsigned long gup_fast(unsigned long start, unsigned long end, * include/asm-generic/tlb.h for more details. * * We do not adopt an rcu_read_lock() here as we also want to block IPIs - * that come from THPs splitting. + * that come from callers of tlb_remove_table_sync_one(). */ local_irq_save(flags); gup_fast_pgd_range(start, end, gup_flags, pages, &nr_pinned);