The quilt patch titled Subject: mm: wake_up only when swapcache_wq waitqueue is active has been removed from the -mm tree. Its filename was mm-avoid-unconditional-one-tick-sleep-when-swapcache_prepare-fails-fix.patch This patch was dropped because it was folded into mm-avoid-unconditional-one-tick-sleep-when-swapcache_prepare-fails.patch ------------------------------------------------------ From: Barry Song <v-songbaohua@xxxxxxxx> Subject: mm: wake_up only when swapcache_wq waitqueue is active Date: Tue, 8 Oct 2024 20:18:27 +0800 wake_up() will acquire spinlock even waitqueue is empty. This might involve cache sync overhead. Let's only call wake_up() when waitqueue is active. Link: https://lkml.kernel.org/r/20241008130807.40833-1-21cnbao@xxxxxxxxx Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx> Suggested-by: "Huang, Ying" <ying.huang@xxxxxxxxx> Cc: Chris Li <chrisl@xxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Kairui Song <kasong@xxxxxxxxxxx> Cc: Kalesh Singh <kaleshsingh@xxxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Oven Liyang <liyangouwen1@xxxxxxxx> Cc: SeongJae Park <sj@xxxxxxxxxx> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx> Cc: Yosry Ahmed <yosryahmed@xxxxxxxxxx> Cc: Yu Zhao <yuzhao@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/mm/memory.c~mm-avoid-unconditional-one-tick-sleep-when-swapcache_prepare-fails-fix +++ a/mm/memory.c @@ -4611,7 +4611,8 @@ out: /* Clear the swap cache pin for direct swapin after PTL unlock */ if (need_clear_cache) { swapcache_clear(si, entry, nr_pages); - wake_up(&swapcache_wq); + if (waitqueue_active(&swapcache_wq)) + wake_up(&swapcache_wq); } if (si) put_swap_device(si); @@ -4629,7 +4630,8 @@ out_release: } if (need_clear_cache) { swapcache_clear(si, entry, nr_pages); - wake_up(&swapcache_wq); + if (waitqueue_active(&swapcache_wq)) + wake_up(&swapcache_wq); } if (si) put_swap_device(si); _ Patches currently in -mm which might be from v-songbaohua@xxxxxxxx are mm-avoid-unconditional-one-tick-sleep-when-swapcache_prepare-fails.patch mm-fix-pswpin-counter-for-large-folios-swap-in.patch