On 09/26/2016 06:20 PM, Vlastimil Babka wrote:
The compaction_zonelist_suitable() function tries to determine if compaction
will be able to proceed after sufficient reclaim, i.e. whether there are
enough reclaimable pages to provide enough order-0 freepages for compaction.
This addition of reclaimable pages to the free pages works well for the order-0
watermark check, but in the fragmentation index check we only consider truly
free pages. Thus we can get fragindex value close to 0 which indicates failure
do to lack of memory, and wrongly decide that compaction won't be suitable even
after reclaim.
Instead of trying to somehow adjust fragindex for reclaimable pages, let's just
skip it from compaction_zonelist_suitable().
Signed-off-by: Vlastimil Babka <redacted>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mel Gorman <redacted>
Cc: Joonsoo Kim <redacted>
Cc: David Rientjes <rientjes@google.com>
Cc: Rik van Riel <redacted>
Bah, a fix below, sorry.
----8<----