[PATCH] Improved allocation failure warning

Daniel Phillips (phillips@bonn-fries.net)
Tue, 28 Aug 2001 00:53:01 +0200


Hi,

Would you please consider applying this change to __alloc_pages, which
adds the gfp flags and process state information to the "allocation
failed" message. This has already proved useful in diagnosing at least
one vm problem.

--- 2.4.9.clean/mm/page_alloc.c Thu Aug 16 12:43:02 2001
+++ 2.4.9/mm/page_alloc.c Mon Aug 20 22:05:40 2001
@@ -502,7 +502,8 @@
}

/* No luck.. */
- printk(KERN_ERR "__alloc_pages: %lu-order allocation failed.\n", order);
+ printk(KERN_ERR "__alloc_pages: %lu-order allocation failed (gfp=0x%x/%i).\n",
+ order, gfp_mask, !!(current->flags & PF_MEMALLOC));
return NULL;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/