Thread (21 messages) 21 messages, 6 authors, 2016-09-29

Re: [PATCH 2/2] mm: warn about allocations which stall for too long

From: Michal Hocko <mhocko@kernel.org>
Date: 2016-09-29 09:10:44
Also in: lkml

On Thu 29-09-16 18:02:44, Tetsuo Handa wrote:
[...]
quoted
@@ -3650,6 +3652,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 	if (order > PAGE_ALLOC_COSTLY_ORDER && !(gfp_mask & __GFP_REPEAT))
 		goto nopage;
 
+	/* Make sure we know about allocations which stall for too long */
+	if (time_after(jiffies, alloc_start + stall_timeout)) {
+		warn_alloc(gfp_mask,
I expect "gfp_mask & ~__GFP_NOWARN" rather than "gfp_mask" here.
Otherwise, we can't get a clue for __GFP_NOWARN allocations.
If there is an explicit __GFP_NOWARN then I believe we should obey it
same way we do for the allocation failure. If you believe this is not
the best way then feel free to send a patch with an example where a
__GFP_NOWARN user would really like to see about the stall.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help