From: Johannes Weiner Date: Wed, 3 May 2017 21:53:48 +0000 (-0700) Subject: mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=822519634142cb66614514ac8ee9221868f764bb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings __GFP_NOWARN, which is usually added to avoid warnings from callsites that expect to fail and have fallbacks, currently also suppresses allocation stall warnings. These trigger when an allocation is stuck inside the allocator for 10 seconds or longer. But there is no class of allocations that can get legitimately stuck in the allocator for this long. This always indicates a problem. Always emit stall warnings. Restrict __GFP_NOWARN to alloc failures. Link: http://lkml.kernel.org/r/20170125181150.GA16398@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Minchan Kim Cc: Michal Hocko Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7a3751e53f91..465391811c2e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3751,7 +3751,7 @@ retry: /* Make sure we know about allocations which stall for too long */ if (time_after(jiffies, alloc_start + stall_timeout)) { - warn_alloc(gfp_mask, ac->nodemask, + warn_alloc(gfp_mask & ~__GFP_NOWARN, ac->nodemask, "page allocation stalls for %ums, order:%u", jiffies_to_msecs(jiffies-alloc_start), order); stall_timeout += 10 * HZ;