|
@@ -3028,12 +3028,13 @@ static void warn_alloc_show_mem(gfp_t gfp_mask)
|
|
show_mem(filter);
|
|
show_mem(filter);
|
|
}
|
|
}
|
|
|
|
|
|
-void warn_alloc(gfp_t gfp_mask, const char *fmt, ...)
|
|
|
|
|
|
+void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...)
|
|
{
|
|
{
|
|
struct va_format vaf;
|
|
struct va_format vaf;
|
|
va_list args;
|
|
va_list args;
|
|
static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL,
|
|
static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL,
|
|
DEFAULT_RATELIMIT_BURST);
|
|
DEFAULT_RATELIMIT_BURST);
|
|
|
|
+ nodemask_t *nm = (nodemask) ? nodemask : &cpuset_current_mems_allowed;
|
|
|
|
|
|
if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs) ||
|
|
if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs) ||
|
|
debug_guardpage_minorder() > 0)
|
|
debug_guardpage_minorder() > 0)
|
|
@@ -3047,7 +3048,8 @@ void warn_alloc(gfp_t gfp_mask, const char *fmt, ...)
|
|
pr_cont("%pV", &vaf);
|
|
pr_cont("%pV", &vaf);
|
|
va_end(args);
|
|
va_end(args);
|
|
|
|
|
|
- pr_cont(", mode:%#x(%pGg)\n", gfp_mask, &gfp_mask);
|
|
|
|
|
|
+ pr_cont(", mode:%#x(%pGg), nodemask=%*pbl\n", gfp_mask, &gfp_mask, nodemask_pr_args(nm));
|
|
|
|
+ cpuset_print_current_mems_allowed();
|
|
|
|
|
|
dump_stack();
|
|
dump_stack();
|
|
warn_alloc_show_mem(gfp_mask);
|
|
warn_alloc_show_mem(gfp_mask);
|
|
@@ -3724,7 +3726,7 @@ retry:
|
|
|
|
|
|
/* Make sure we know about allocations which stall for too long */
|
|
/* Make sure we know about allocations which stall for too long */
|
|
if (time_after(jiffies, alloc_start + stall_timeout)) {
|
|
if (time_after(jiffies, alloc_start + stall_timeout)) {
|
|
- warn_alloc(gfp_mask,
|
|
|
|
|
|
+ warn_alloc(gfp_mask, ac->nodemask,
|
|
"page allocation stalls for %ums, order:%u",
|
|
"page allocation stalls for %ums, order:%u",
|
|
jiffies_to_msecs(jiffies-alloc_start), order);
|
|
jiffies_to_msecs(jiffies-alloc_start), order);
|
|
stall_timeout += 10 * HZ;
|
|
stall_timeout += 10 * HZ;
|
|
@@ -3775,7 +3777,7 @@ nopage:
|
|
if (read_mems_allowed_retry(cpuset_mems_cookie))
|
|
if (read_mems_allowed_retry(cpuset_mems_cookie))
|
|
goto retry_cpuset;
|
|
goto retry_cpuset;
|
|
|
|
|
|
- warn_alloc(gfp_mask,
|
|
|
|
|
|
+ warn_alloc(gfp_mask, ac->nodemask,
|
|
"page allocation failure: order:%u", order);
|
|
"page allocation failure: order:%u", order);
|
|
got_pg:
|
|
got_pg:
|
|
return page;
|
|
return page;
|