On Thu, Jul 27, 2017 at 06:07:00PM +0200, Vlastimil Babka wrote: > When isolating free pages as miration targets in __isolate_free_page(), s/miration/migration/ > compaction respects the min watermark. Although it checks that there's enough > free pages above the watermark in __compaction_suitable() before starting to > compact, parallel allocation may result in their depletion. Compaction will > detect this only after needlessly scanning many pages for migration, > potentially wasting CPU time. > > After this patch, we check if we are still above the watermark in > __compact_finished(). For kcompactd, we check the low watermark instead of min > watermark, because that's the point when kswapd is woken up and it's better to > let kswapd finish freeing memory before doing kcompactd work. > > Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx> Otherwise I cannot see a problem. Some compaction opportunities might be "missed" but they're ones that potentially cause increased direct reclaim or kswapd reclaim activity. -- 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>