aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLi Xinhai <[email protected]>2022-01-14 14:05:16 -0800
committerLinus Torvalds <[email protected]>2022-01-15 16:30:26 +0200
commit28b0ee3fb35047bd2bac57cc5a051b26bbd9b194 (patch)
treed309b4c6ef49c4223414b88801e010642141f080 /tools/perf/scripts/python
parent677b2a8c1f25db5b09c1ef5bf72faa39ea81d9cf (diff)
mm/gup.c: stricter check on THP migration entry during follow_pmd_mask
When BUG_ON check for THP migration entry, the existing code only check thp_migration_supported case, but not for !thp_migration_supported case. If !thp_migration_supported() and !pmd_present(), the original code may dead loop in theory. To make the BUG_ON check consistent, we need catch both cases. Move the BUG_ON check one step earlier, because if the bug happen we should know it instead of depend on FOLL_MIGRATION been used by caller. Because pmdval instead of *pmd is read by the is_pmd_migration_entry() check, the existing code don't help to avoid useless locking within pmd_migration_entry_wait(), so remove that check. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Li Xinhai <[email protected]> Reviewed-by: "Huang, Ying" <[email protected]> Reviewed-by: Miaohe Lin <[email protected]> Cc: Zi Yan <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions