summaryrefslogtreecommitdiff
path: root/scripts/make_fit.py
diff options
context:
space:
mode:
authorKairui Song <kasong@tencent.com>2025-12-20 03:43:35 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-01-31 14:22:54 -0800
commit4b34f1d82c6549837b2061096dea249e881a4495 (patch)
treeb27ea4f5fa684b124a5e1fa7e70816170c4047f2 /scripts/make_fit.py
parent6aeec9a1a3222dc497066dfa63a0517e43493d77 (diff)
mm, swap: free the swap cache after folio is mapped
Currently, we remove the folio from the swap cache and free the swap cache before mapping the PTE. To reduce repeated faults due to parallel swapins of the same PTE, change it to remove the folio from the swap cache after it is mapped. So new faults from the swap PTE will be much more likely to see the folio in the swap cache and wait on it. This does not eliminate all swapin races: an ongoing swapin fault may still see an empty swap cache. That's harmless, as the PTE is changed before the swap cache is cleared, so it will just return and not trigger any repeated faults. This does help to reduce the chance. Link: https://lkml.kernel.org/r/20251220-swap-table-p2-v5-6-8862a265a033@tencent.com Signed-off-by: Kairui Song <kasong@tencent.com> Reviewed-by: Baoquan He <bhe@redhat.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Barry Song <baohua@kernel.org> Cc: Chris Li <chrisl@kernel.org> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Rafael J. Wysocki (Intel) <rafael@kernel.org> Cc: Yosry Ahmed <yosry.ahmed@linux.dev> Cc: Deepanshu Kartikey <kartikey406@gmail.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Kairui Song <ryncsn@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/make_fit.py')
0 files changed, 0 insertions, 0 deletions