On 10/8/18 10:41 PM, David Rientjes wrote:
/*
* If faulting a hugepage, it is very unlikely that
* thrashing the zonelist is going to assist compaction
* in freeing an entire pageblock. There are no
* guarantees memory compaction can free an entire
* pageblock under such memory pressure that it is
* better to simply fail and fallback to native pages.
*/
if (order == pageblock_order &&
!(current->flags & PF_KTHREAD))
goto nopage;
After we got rid of similar hardcoded heuristics, I would be very unhappy to start adding them back. A new gfp flag is also unfortunate, but more acceptable to me.
/* * Looks like reclaim/compaction is worth trying, but * sync compaction could be very expensive, so keep