On Mon, 18 Jul 2016, Vlastimil Babka wrote:
This means we can further distinguish allocations that are costly order *and*
additionally include the __GFP_NORETRY flag. As it happens, GFP_TRANSHUGE
allocations do already fall into this category. This will also allow other
costly allocations with similar high-order benefit vs latency considerations to
use this semantic. Furthermore, we can distinguish THP allocations that should
try a bit harder (such as from khugepageed) by removing __GFP_NORETRY, as will
be done in the next patch.
Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
I think this is fine, but I would hope that we could check
gfp_pfmemalloc_allowed() before compacting and failing even for costly
orders when otherwise the first get_page_from_freelist() in the slowpath
may have succeeded due to watermarks.