aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorYang Shi <[email protected]>2022-05-19 14:08:50 -0700
committerakpm <[email protected]>2022-05-19 14:08:50 -0700
commit613bec092fe78307a8b130353ce1ef340915587f (patch)
tree641435e60baaa362536aa760699b19ae98586aa7 /tools/perf/scripts/python
parentc791576c60288c89b351ea2d2098f6a872d78fa7 (diff)
mm: mmap: register suitable readonly file vmas for khugepaged
The readonly FS THP relies on khugepaged to collapse THP for suitable vmas. But the behavior is inconsistent for "always" mode (https://lore.kernel.org/linux-mm/[email protected]/). The "always" mode means THP allocation should be tried all the time and khugepaged should try to collapse THP all the time. Of course the allocation and collapse may fail due to other factors and conditions. Currently file THP may not be collapsed by khugepaged even though all the conditions are met. That does break the semantics of "always" mode. So make sure readonly FS vmas are registered to khugepaged to fix the break. Register suitable vmas in common mmap path, that could cover both readonly FS vmas and shmem vmas, so remove the khugepaged calls in shmem.c. Still need to keep the khugepaged call in vma_merge() since vma_merge() is called in a lot of places, for example, madvise, mprotect, etc. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Yang Shi <[email protected]> Reported-by: Vlastimil Babka <[email protected]> Acked-by: Vlastmil Babka <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Miaohe Lin <[email protected]> Cc: Song Liu <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Zi Yan <[email protected]> Cc: Theodore Ts'o <[email protected]> Cc: Song Liu <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions