]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 3 May 2017 21:53:48 +0000 (14:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 May 2017 22:52:09 +0000 (15:52 -0700)
__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 <hannes@cmpxchg.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c

index 7a3751e53f915add80fb299967c8742e00030fb7..465391811c2eca8f464b771611a979d498064b9a 100644 (file)
@@ -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;