That consolidation would have been unnecessary, then, since all
allocations with order < PAGE_ALLOC_COSTLY_ORDER automatically loop
indefinitely in the page allocator. struct dm_region allocations would
already do that.
So this retry loop doesn't actually do anything that the page allocator
already doesn't, with or without __GFP_NOFAIL. The difference here is
that
- it doesn't depend on the page allocator's implementation, which may
change over time, and
- it adds documentation so that the subsystems doing these loops can
(hopefully) fix these problems later, although their appear to be
geniune cases where little other options are available.
It removes several branches from the page allocator.
If the prerequisite for removing __GFP_NOFAIL is that nobody must ever
loop indefinitely looking for memory or smaller order allocations don't
implicitly retry, then there's little chance it'll ever get removed since
they've existed for years without anybody cleaning them up.
--