On Thu, Jul 27, 2017 at 06:06:59PM +0200, Vlastimil Babka wrote: > This patch deals with a corner case found when testing kcompactd with a very > simple testcase that first fragments memory (by creating a large shmem file and > then punching hole in every even page) and then uses artificial order-9 > GFP_NOWAIT allocations in a loop. This is freshly after virtme-run boot in KVM > and no other activity. > > What happens is that after few kswapd runs, there are no more reclaimable > pages, and high-order pages can only be created by compaction. Because kswapd > can't reclaim anything, pgdat->kswapd_failures increases up to > MAX_RECLAIM_RETRIES and kswapd is no longer woken up. Thus kcompactd is also > not woken up. After this patch, we will try to wake up kcompactd immediately > instead of kswapd. > > Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx> If kswapd cannot make any progress then it's possible that kcompact won'y be able to move the pages either. However, an exception is anonymous pages without swap configured so Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>