The quilt patch titled Subject: mm: set pte writable while pte_soft_dirty() is true in do_swap_page() has been removed from the -mm tree. Its filename was mm-set-pte-writable-while-pte_soft_dirty-is-true-in-do_swap_page.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Barry Song <v-songbaohua@xxxxxxxx> Subject: mm: set pte writable while pte_soft_dirty() is true in do_swap_page() Date: Sat, 8 Jun 2024 09:13:58 +1200 This patch leverages the new pte_needs_soft_dirty_wp() helper to optimize a scenario where softdirty is enabled, but the softdirty flag has already been set in do_swap_page(). In this situation, we can use pte_mkwrite instead of applying write-protection since we don't depend on write faults. Link: https://lkml.kernel.org/r/20240607211358.4660-3-21cnbao@xxxxxxxxx Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx> Suggested-by: David Hildenbrand <david@xxxxxxxxxx> Acked-by: David Hildenbrand <david@xxxxxxxxxx> Cc: Chris Li <chrisl@xxxxxxxxxx> Cc: Kairui Song <kasong@xxxxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Ryan Roberts <ryan.roberts@xxxxxxx> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/memory.c~mm-set-pte-writable-while-pte_soft_dirty-is-true-in-do_swap_page +++ a/mm/memory.c @@ -4324,7 +4324,7 @@ check_folio: if (!folio_test_ksm(folio) && (exclusive || folio_ref_count(folio) == 1)) { if ((vma->vm_flags & VM_WRITE) && !userfaultfd_pte_wp(vma, pte) && - !vma_soft_dirty_enabled(vma)) { + !pte_needs_soft_dirty_wp(vma, pte)) { pte = pte_mkwrite(pte, vma); if (vmf->flags & FAULT_FLAG_WRITE) { pte = pte_mkdirty(pte); _ Patches currently in -mm which might be from v-songbaohua@xxxxxxxx are mm-extend-rmap-flags-arguments-for-folio_add_new_anon_rmap.patch mm-extend-rmap-flags-arguments-for-folio_add_new_anon_rmap-fix-2.patch mm-extend-rmap-flags-arguments-for-folio_add_new_anon_rmap-fix-3.patch mm-use-folio_add_new_anon_rmap-if-folio_test_anonfolio==false.patch mm-use-folio_add_new_anon_rmap-if-folio_test_anonfolio==false-fix-2.patch mm-remove-folio_test_anonfolio==false-path-in-__folio_add_anon_rmap.patch tools-mm-introduce-a-tool-to-assess-swap-entry-allocation-for-thp_swapout.patch