Skip to contentSkip to conversation

mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings

PATCH New [email protected] 1 participant 1 message May 3, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 44/102 mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings

From: Johannes Weiner <[email protected]>
Subject: 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.

---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-__gfp_nowarn-shouldnt-suppress-stall-warnings +1 -1
diff -puN mm/page_alloc.c~mm-page_alloc-__gfp_nowarn-shouldnt-suppress-stall-warnings 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;

_