On Fri 20-11-15 15:33:17, David Rientjes wrote: > On Fri, 20 Nov 2015, Michal Hocko wrote: > > > > > @@ -3167,24 +3166,21 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, > > > > > > > > /* > > > > * Do not retry high order allocations unless they are __GFP_REPEAT > > > > - * and even then do not retry endlessly unless explicitly told so > > > > + * unless explicitly told so. > > > > */ > > > > - pages_reclaimed += did_some_progress; > > > > - if (order > PAGE_ALLOC_COSTLY_ORDER) { > > > > - if (!(gfp_mask & __GFP_NOFAIL) && > > > > - (!(gfp_mask & __GFP_REPEAT) || pages_reclaimed >= (1<<order))) > > > > - goto noretry; > > > > - > > > > - if (did_some_progress) > > > > - goto retry; > > > > - } > > > > + if (order > PAGE_ALLOC_COSTLY_ORDER && > > > > + !(gfp_mask & (__GFP_REPEAT|__GFP_NOFAIL))) > > > > + goto noretry; > > > > > > Who is allocating order > PAGE_ALLOC_COSTLY_ORDER with __GFP_REPEAT and > > > would be affected by this change? > > > > E.g. hugetlb pages. I have tested this in my testing scenario 3. > > > > If that's the only high-order user of __GFP_REPEAT, we might want to > consider dropping it. There are many others. I have tried to clean this area up quite recently http://lkml.kernel.org/r/1446740160-29094-1-git-send-email-mhocko%40kernel.org and managed to drop half of the current usage of __GFP_REPEAT. > I believe the hugetlb usecase would only be > relevant in early init (when __GFP_REPEAT shouldn't logically help) and > when returning surplus pages due to hugetlb overcommit. Since hugetlb > overcommit is best effort and we already know that the > pages_reclaimed >= (1<<order) check is ridiculous for order-9 pages, I > think you could just drop hugetlb's usage of __GFP_REPEAT and nobody would > notice. Even if that was the case, which I am not sure right now, I believe this is a separate topic. We should still support __GFP_REPEAT in some form. -- Michal Hocko SUSE Labs -- 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>