Re: [PATCH v2] mm/page_alloc: don't wake kswapd from rmqueue() unless __GFP_KSWAPD_RECLAIM is specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux