On Sun, May 14, 2023 at 09:28:56AM +0900, Tetsuo Handa wrote: > Commit 73444bc4d8f9 ("mm, page_alloc: do not wake kswapd with zone lock > held") moved wakeup_kswapd() from steal_suitable_fallback() to rmqueue() > using ZONE_BOOSTED_WATERMARK flag. > > Only allocation contexts that include ALLOC_KSWAPD (which corresponds to > __GFP_KSWAPD_RECLAIM) should wake kswapd, for callers are supposed to > remove __GFP_KSWAPD_RECLAIM if trying to hold pgdat->kswapd_wait has a > risk of deadlock. kswapd_wait is a waitqueue so what is being held? It's safe for kswapd to try wake itself as the waitqueue will be active when wakeup_kswapd() is called so no wakeup occurs. If there is a deadlock, it needs a better explanation. I believe I already stated why this patch is fixing a bug but it wasn't deadlock related. -- Mel Gorman SUSE Labs