aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2025-04-09 17:00:21 -0700
committerAndrew Morton <akpm@linux-foundation.org>2025-05-11 17:48:27 -0700
commitde8efdf8cd273619121cbc2f0f70dddc74bc586e (patch)
tree2b998aa57d52bc9b90fd00f34d3e71c6932ddc78 /tools
parentmm/madvise: batch tlb flushes for MADV_FREE (diff)
downloadlinux-de8efdf8cd273619121cbc2f0f70dddc74bc586e.tar.gz
linux-de8efdf8cd273619121cbc2f0f70dddc74bc586e.zip
mm/memory: split non-tlb flushing part from zap_page_range_single()
Some of zap_page_range_single() callers such as [process_]madvise() with MADV_DONTNEED[_LOCKED] cannot batch tlb flushes because zap_page_range_single() flushes tlb for each invocation. Split out the body of zap_page_range_single() except mmu_gather object initialization and gathered tlb entries flushing for such batched tlb flushing usage. To avoid hugetlb pages allocation failures from concurrent page faults, the tlb flush should be done before hugetlb faults unlocking, though. Do the flush and the unlock inside the split out function in the order for hugetlb vma case. Refer to commit 2820b0f09be9 ("hugetlbfs: close race between MADV_DONTNEED and page fault") for more details about the concurrent faults' page allocation failure problem. Link: https://lkml.kernel.org/r/20250410000022.1901-4-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions