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

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

From: Michal Hocko <mhocko@kernel.org>
Date: 2016-09-23 09:16:19
Also in: lkml

On Fri 23-09-16 16:44:26, Hillf Danton wrote:
On Friday, September 23, 2016 4:32 PM, Michal Hocko wrote
quoted
On Fri 23-09-16 16:29:36, Hillf Danton wrote:
[...]
quoted
quoted
@@ -3659,6 +3661,15 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 	else
 		no_progress_loops++;

+	/* Make sure we know about allocations which stall for too long */
+	if (!(gfp_mask & __GFP_NOWARN) && time_after(jiffies, alloc_start + stall_timeout)) {
+		pr_warn("%s: page alloction stalls for %ums: order:%u mode:%#x(%pGg)\n",
+				current->comm, jiffies_to_msecs(jiffies-alloc_start),
Better if pid is also printed.
I've tried to be consistent with warn_alloc_failed and that doesn't
print pid either. Maybe both of them should. Dunno
With pid imho we can distinguish two tasks with same name in a simpler way. 
I've just checked dump_stack and dump_stack_print_info provides that
information already.
-- 
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