Skip to content

Commit 52084f2

Browse files
thejhakpm00
authored andcommitted
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 ad0bed2 ("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/[email protected] Signed-off-by: Jann Horn <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: John Hubbard <[email protected]> Cc: Kirill A. Shuemov <[email protected]> Cc: Peter Xu <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent bb08499 commit 52084f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/gup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3299,7 +3299,7 @@ static unsigned long gup_fast(unsigned long start, unsigned long end,
32993299
* include/asm-generic/tlb.h for more details.
33003300
*
33013301
* We do not adopt an rcu_read_lock() here as we also want to block IPIs
3302-
* that come from THPs splitting.
3302+
* that come from callers of tlb_remove_table_sync_one().
33033303
*/
33043304
local_irq_save(flags);
33053305
gup_fast_pgd_range(start, end, gup_flags, pages, &nr_pinned);

0 commit comments

Comments
 (0)