On Thu, Mar 26, 2015 at 03:11:28PM +0100, Michal Hocko wrote: > On Wed 25-03-15 02:17:11, Johannes Weiner wrote: > > The should_alloc_retry() function was meant to encapsulate retry > > conditions of the allocator slowpath, but there are still checks > > remaining in the main function, and much of how the retrying is > > performed also depends on the OOM killer progress. The physical > > separation of those conditions make the code hard to follow. > > > > Inline the should_alloc_retry() checks. Notes: > > > > - The __GFP_NOFAIL check is already done in __alloc_pages_may_oom(), > > replace it with looping on OOM killer progress > > > > - The pm_suspended_storage() check is meant to skip the OOM killer > > when reclaim has no IO available, move to __alloc_pages_may_oom() > > > > - The order < PAGE_ALLOC_COSTLY order is re-united with its original > > counterpart of checking whether reclaim actually made any progress > > it should be order <= PAGE_ALLOC_COSTLY Oops, thanks for catching that. I'll fix it in v2. > > Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> > > The resulting code looks much better and logical. > > After the COSTLY check is fixed. > Acked-by: Michal Hocko <mhocko@xxxxxxx> Thank you -- 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>