diff options
| author | Barry Song <[email protected]> | 2025-06-05 08:31:44 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-07-10 05:41:58 +0000 |
| commit | 99edea30058bb5dd6c2fee6fa0c703fa4bc4b140 (patch) | |
| tree | beffe26c3433ccb628fc3fba101f6af7541862a7 /mm/filemap.c | |
| parent | mm: remove the for_reclaim field from struct writeback_control (diff) | |
| download | kernel-99edea30058bb5dd6c2fee6fa0c703fa4bc4b140.tar.gz kernel-99edea30058bb5dd6c2fee6fa0c703fa4bc4b140.zip | |
mm: madvise: use walk_page_range_vma() instead of walk_page_range()
We've already found the VMA within madvise_walk_vmas() before calling
specific madvise behavior functions like madvise_free_single_vma(). So
calling walk_page_range() and doing find_vma() again seems unnecessary.
It also prevents potential optimizations in those madvise callbacks,
particularly the use of dedicated per-VMA locking.
[[email protected]: revert the walk_page_range_vma change for MADV_GUARD_INSTALL]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Barry Song <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Reviewed-by: Lorenzo Stoakes <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Reviewed-by: Harry Yoo <[email protected]>
Reviewed-by: Dev Jain <[email protected]>
Reviewed-by: Vlastimil Babka <[email protected]>
Reviewed-by: Ryan Roberts <[email protected]>
Tested-by: Lorenzo Stoakes <[email protected]>
Cc: "Liam R. Howlett" <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Lokesh Gidra <[email protected]>
Cc: Tangquan Zheng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/filemap.c')
0 files changed, 0 insertions, 0 deletions
