* [patch -mm] mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled
@ 2017-01-18 21:51 David Rientjes
2017-01-19 7:29 ` Vlastimil Babka
0 siblings, 1 reply; 9+ messages in thread
From: David Rientjes @ 2017-01-18 21:51 UTC (permalink / raw)
To: Andrew Morton, Michal Hocko
Cc: Johannes Weiner, Mel Gorman, Vlastimil Babka, linux-mm, LKML
The patch "mm, page_alloc: warn_alloc print nodemask" implicitly sets the
allocation nodemask to cpuset_current_mems_allowed when there is no
effective mempolicy. cpuset_current_mems_allowed is only effective when
cpusets are enabled, which is also printed by warn_alloc(), so setting
the nodemask to cpuset_current_mems_allowed is redundant and prevents
debugging issues where ac->nodemask is not set properly in the page
allocator.
This provides better debugging output since
cpuset_print_current_mems_allowed() is already provided.
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/page_alloc.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3037,7 +3037,6 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...)
va_list args;
static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST);
- nodemask_t *nm = (nodemask) ? nodemask : &cpuset_current_mems_allowed;
if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs) ||
debug_guardpage_minorder() > 0)
@@ -3051,11 +3050,16 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...)
pr_cont("%pV", &vaf);
va_end(args);
- pr_cont(", mode:%#x(%pGg), nodemask=%*pbl\n", gfp_mask, &gfp_mask, nodemask_pr_args(nm));
+ pr_cont(", mode:%#x(%pGg), nodemask=", gfp_mask, &gfp_mask);
+ if (nodemask)
+ pr_cont("%*pbl\n", nodemask_pr_args(nodemask));
+ else
+ pr_cont("(null)\n");
+
cpuset_print_current_mems_allowed();
dump_stack();
- warn_alloc_show_mem(gfp_mask, nm);
+ warn_alloc_show_mem(gfp_mask, nodemask);
}
static inline struct page *
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch -mm] mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled
2017-01-18 21:51 [patch -mm] mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled David Rientjes
@ 2017-01-19 7:29 ` Vlastimil Babka
2017-01-19 8:57 ` Michal Hocko
2017-01-19 22:57 ` [patch] mm, oom: header " David Rientjes
0 siblings, 2 replies; 9+ messages in thread
From: Vlastimil Babka @ 2017-01-19 7:29 UTC (permalink / raw)
To: David Rientjes, Andrew Morton, Michal Hocko
Cc: Johannes Weiner, Mel Gorman, linux-mm, LKML
On 01/18/2017 10:51 PM, David Rientjes wrote:
> The patch "mm, page_alloc: warn_alloc print nodemask" implicitly sets the
> allocation nodemask to cpuset_current_mems_allowed when there is no
> effective mempolicy. cpuset_current_mems_allowed is only effective when
> cpusets are enabled, which is also printed by warn_alloc(), so setting
> the nodemask to cpuset_current_mems_allowed is redundant and prevents
> debugging issues where ac->nodemask is not set properly in the page
> allocator.
>
> This provides better debugging output since
> cpuset_print_current_mems_allowed() is already provided.
>
> Signed-off-by: David Rientjes <rientjes@google.com>
Yes, with my current cpuset vs mempolicy debugging experience, this is
more useful (except how both nodemask and mems_allowed can change under
us, so what we print here is not necessarily the same that what
get_page_from_freelist() has seen, but that's another thing...).
But I would suggest you change the oom killer's dump_header() the same
way than warn_alloc().
Thanks,
Vlastimil
> ---
> mm/page_alloc.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3037,7 +3037,6 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...)
> va_list args;
> static DEFINE_RATELIMIT_STATE(nopage_rs, DEFAULT_RATELIMIT_INTERVAL,
> DEFAULT_RATELIMIT_BURST);
> - nodemask_t *nm = (nodemask) ? nodemask : &cpuset_current_mems_allowed;
>
> if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs) ||
> debug_guardpage_minorder() > 0)
> @@ -3051,11 +3050,16 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...)
> pr_cont("%pV", &vaf);
> va_end(args);
>
> - pr_cont(", mode:%#x(%pGg), nodemask=%*pbl\n", gfp_mask, &gfp_mask, nodemask_pr_args(nm));
> + pr_cont(", mode:%#x(%pGg), nodemask=", gfp_mask, &gfp_mask);
> + if (nodemask)
> + pr_cont("%*pbl\n", nodemask_pr_args(nodemask));
> + else
> + pr_cont("(null)\n");
> +
> cpuset_print_current_mems_allowed();
>
> dump_stack();
> - warn_alloc_show_mem(gfp_mask, nm);
> + warn_alloc_show_mem(gfp_mask, nodemask);
> }
>
> static inline struct page *
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch -mm] mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled
2017-01-19 7:29 ` Vlastimil Babka
@ 2017-01-19 8:57 ` Michal Hocko
2017-01-19 22:57 ` [patch] mm, oom: header " David Rientjes
1 sibling, 0 replies; 9+ messages in thread
From: Michal Hocko @ 2017-01-19 8:57 UTC (permalink / raw)
To: Vlastimil Babka
Cc: David Rientjes, Andrew Morton, Johannes Weiner, Mel Gorman,
linux-mm, LKML
On Thu 19-01-17 08:29:45, Vlastimil Babka wrote:
> On 01/18/2017 10:51 PM, David Rientjes wrote:
> > The patch "mm, page_alloc: warn_alloc print nodemask" implicitly sets the
> > allocation nodemask to cpuset_current_mems_allowed when there is no
> > effective mempolicy. cpuset_current_mems_allowed is only effective when
> > cpusets are enabled, which is also printed by warn_alloc(), so setting
> > the nodemask to cpuset_current_mems_allowed is redundant and prevents
> > debugging issues where ac->nodemask is not set properly in the page
> > allocator.
> >
> > This provides better debugging output since
> > cpuset_print_current_mems_allowed() is already provided.
> >
> > Signed-off-by: David Rientjes <rientjes@google.com>
>
> Yes, with my current cpuset vs mempolicy debugging experience, this is
> more useful (except how both nodemask and mems_allowed can change under
> us, so what we print here is not necessarily the same that what
> get_page_from_freelist() has seen, but that's another thing...).
>
> But I would suggest you change the oom killer's dump_header() the same
> way than warn_alloc().
Yes please
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch] mm, oom: header nodemask is NULL when cpusets are disabled
2017-01-19 7:29 ` Vlastimil Babka
2017-01-19 8:57 ` Michal Hocko
@ 2017-01-19 22:57 ` David Rientjes
2017-01-20 7:07 ` Hillf Danton
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: David Rientjes @ 2017-01-19 22:57 UTC (permalink / raw)
To: Andrew Morton, Vlastimil Babka
Cc: Michal Hocko, Johannes Weiner, Mel Gorman, linux-mm, LKML
Commit 82e7d3abec86 ("oom: print nodemask in the oom report") implicitly
sets the allocation nodemask to cpuset_current_mems_allowed when there is
no effective mempolicy. cpuset_current_mems_allowed is only effective
when cpusets are enabled, which is also printed by dump_header(), so
setting the nodemask to cpuset_current_mems_allowed is redundant and
prevents debugging issues where ac->nodemask is not set properly in the
page allocator.
This provides better debugging output since
cpuset_print_current_mems_allowed() is already provided.
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/oom_kill.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -403,12 +403,14 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
static void dump_header(struct oom_control *oc, struct task_struct *p)
{
- nodemask_t *nm = (oc->nodemask) ? oc->nodemask : &cpuset_current_mems_allowed;
-
- pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=%*pbl, order=%d, oom_score_adj=%hd\n",
- current->comm, oc->gfp_mask, &oc->gfp_mask,
- nodemask_pr_args(nm), oc->order,
- current->signal->oom_score_adj);
+ pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=",
+ current->comm, oc->gfp_mask, &oc->gfp_mask);
+ if (oc->nodemask)
+ pr_cont("%*pbl", nodemask_pr_args(oc->nodemask));
+ else
+ pr_cont("(null)\n");
+ pr_cont(", order=%d, oom_score_adj=%hd\n",
+ oc->order, current->signal->oom_score_adj);
if (!IS_ENABLED(CONFIG_COMPACTION) && oc->order)
pr_warn("COMPACTION is disabled!!!\n");
@@ -417,7 +419,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
if (oc->memcg)
mem_cgroup_print_oom_info(oc->memcg, p);
else
- show_mem(SHOW_MEM_FILTER_NODES, nm);
+ show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
if (sysctl_oom_dump_tasks)
dump_tasks(oc->memcg, oc->nodemask);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] mm, oom: header nodemask is NULL when cpusets are disabled
2017-01-19 22:57 ` [patch] mm, oom: header " David Rientjes
@ 2017-01-20 7:07 ` Hillf Danton
2017-01-20 10:00 ` [patch -mm] mm, oom: header nodemask is NULL when cpusets are disabled fix David Rientjes
2017-01-20 9:00 ` [patch] mm, oom: header nodemask is NULL when cpusets are disabled Vlastimil Babka
2017-01-24 10:12 ` Michal Hocko
2 siblings, 1 reply; 9+ messages in thread
From: Hillf Danton @ 2017-01-20 7:07 UTC (permalink / raw)
To: 'David Rientjes', 'Andrew Morton',
'Vlastimil Babka'
Cc: 'Michal Hocko', 'Johannes Weiner',
'Mel Gorman', linux-mm, 'LKML'
On Friday, January 20, 2017 6:58 AM David Rientjes wrote:
>
> Commit 82e7d3abec86 ("oom: print nodemask in the oom report") implicitly
> sets the allocation nodemask to cpuset_current_mems_allowed when there is
> no effective mempolicy. cpuset_current_mems_allowed is only effective
> when cpusets are enabled, which is also printed by dump_header(), so
> setting the nodemask to cpuset_current_mems_allowed is redundant and
> prevents debugging issues where ac->nodemask is not set properly in the
> page allocator.
>
> This provides better debugging output since
> cpuset_print_current_mems_allowed() is already provided.
>
> Suggested-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
> mm/oom_kill.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -403,12 +403,14 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
>
> static void dump_header(struct oom_control *oc, struct task_struct *p)
> {
> - nodemask_t *nm = (oc->nodemask) ? oc->nodemask : &cpuset_current_mems_allowed;
> -
> - pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=%*pbl, order=%d, oom_score_adj=%hd\n",
> - current->comm, oc->gfp_mask, &oc->gfp_mask,
> - nodemask_pr_args(nm), oc->order,
> - current->signal->oom_score_adj);
> + pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=",
> + current->comm, oc->gfp_mask, &oc->gfp_mask);
> + if (oc->nodemask)
> + pr_cont("%*pbl", nodemask_pr_args(oc->nodemask));
> + else
> + pr_cont("(null)\n");
Nit: no newline needed.
> + pr_cont(", order=%d, oom_score_adj=%hd\n",
> + oc->order, current->signal->oom_score_adj);
> if (!IS_ENABLED(CONFIG_COMPACTION) && oc->order)
> pr_warn("COMPACTION is disabled!!!\n");
>
> @@ -417,7 +419,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
> if (oc->memcg)
> mem_cgroup_print_oom_info(oc->memcg, p);
> else
> - show_mem(SHOW_MEM_FILTER_NODES, nm);
> + show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
> if (sysctl_oom_dump_tasks)
> dump_tasks(oc->memcg, oc->nodemask);
> }
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] mm, oom: header nodemask is NULL when cpusets are disabled
2017-01-19 22:57 ` [patch] mm, oom: header " David Rientjes
2017-01-20 7:07 ` Hillf Danton
@ 2017-01-20 9:00 ` Vlastimil Babka
2017-01-20 10:02 ` David Rientjes
2017-01-24 10:12 ` Michal Hocko
2 siblings, 1 reply; 9+ messages in thread
From: Vlastimil Babka @ 2017-01-20 9:00 UTC (permalink / raw)
To: David Rientjes, Andrew Morton
Cc: Michal Hocko, Johannes Weiner, Mel Gorman, linux-mm, LKML,
Rasmus Villemoes
On 01/19/2017 11:57 PM, David Rientjes wrote:
> Commit 82e7d3abec86 ("oom: print nodemask in the oom report") implicitly
> sets the allocation nodemask to cpuset_current_mems_allowed when there is
> no effective mempolicy. cpuset_current_mems_allowed is only effective
> when cpusets are enabled, which is also printed by dump_header(), so
> setting the nodemask to cpuset_current_mems_allowed is redundant and
> prevents debugging issues where ac->nodemask is not set properly in the
> page allocator.
>
> This provides better debugging output since
> cpuset_print_current_mems_allowed() is already provided.
>
> Suggested-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
> mm/oom_kill.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -403,12 +403,14 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
>
> static void dump_header(struct oom_control *oc, struct task_struct *p)
> {
> - nodemask_t *nm = (oc->nodemask) ? oc->nodemask : &cpuset_current_mems_allowed;
> -
> - pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=%*pbl, order=%d, oom_score_adj=%hd\n",
> - current->comm, oc->gfp_mask, &oc->gfp_mask,
> - nodemask_pr_args(nm), oc->order,
> - current->signal->oom_score_adj);
> + pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=",
> + current->comm, oc->gfp_mask, &oc->gfp_mask);
> + if (oc->nodemask)
> + pr_cont("%*pbl", nodemask_pr_args(oc->nodemask));
> + else
> + pr_cont("(null)\n");
> + pr_cont(", order=%d, oom_score_adj=%hd\n",
> + oc->order, current->signal->oom_score_adj);
> if (!IS_ENABLED(CONFIG_COMPACTION) && oc->order)
> pr_warn("COMPACTION is disabled!!!\n");
>
> @@ -417,7 +419,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
> if (oc->memcg)
> mem_cgroup_print_oom_info(oc->memcg, p);
> else
> - show_mem(SHOW_MEM_FILTER_NODES, nm);
> + show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
> if (sysctl_oom_dump_tasks)
> dump_tasks(oc->memcg, oc->nodemask);
> }
>
Could we simplify both patches with something like this?
Although the sizeof("null") is not the nicest thing, because it relies on knowledge
that pointer() in lib/vsprintf.c uses this string. Maybe Rasmus has some better idea?
Thanks,
Vlastimil
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index f746e44d4046..4add88ef63f0 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -103,7 +103,7 @@ extern nodemask_t _unused_nodemask_arg_;
*
* Can be used to provide arguments for '%*pb[l]' when printing a nodemask.
*/
-#define nodemask_pr_args(maskp) MAX_NUMNODES, (maskp)->bits
+#define nodemask_pr_args(maskp) ((maskp) ? MAX_NUMNODES : (int) sizeof("null")), ((maskp) ? (maskp)->bits : NULL)
/*
* The inline keyword gives the compiler room to decide to inline, or
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch -mm] mm, oom: header nodemask is NULL when cpusets are disabled fix
2017-01-20 7:07 ` Hillf Danton
@ 2017-01-20 10:00 ` David Rientjes
0 siblings, 0 replies; 9+ messages in thread
From: David Rientjes @ 2017-01-20 10:00 UTC (permalink / raw)
To: Andrew Morton, Hillf Danton
Cc: Vlastimil Babka, Michal Hocko, Johannes Weiner, Mel Gorman,
linux-mm, LKML
Newline per Hillf
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/oom_kill.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 1767e50844ac..51c091849dcb 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -408,7 +408,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
if (oc->nodemask)
pr_cont("%*pbl", nodemask_pr_args(oc->nodemask));
else
- pr_cont("(null)\n");
+ pr_cont("(null)");
pr_cont(", order=%d, oom_score_adj=%hd\n",
oc->order, current->signal->oom_score_adj);
if (!IS_ENABLED(CONFIG_COMPACTION) && oc->order)
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch] mm, oom: header nodemask is NULL when cpusets are disabled
2017-01-20 9:00 ` [patch] mm, oom: header nodemask is NULL when cpusets are disabled Vlastimil Babka
@ 2017-01-20 10:02 ` David Rientjes
0 siblings, 0 replies; 9+ messages in thread
From: David Rientjes @ 2017-01-20 10:02 UTC (permalink / raw)
To: Vlastimil Babka
Cc: Andrew Morton, Michal Hocko, Johannes Weiner, Mel Gorman,
linux-mm, LKML, Rasmus Villemoes
On Fri, 20 Jan 2017, Vlastimil Babka wrote:
> Could we simplify both patches with something like this?
> Although the sizeof("null") is not the nicest thing, because it relies on knowledge
> that pointer() in lib/vsprintf.c uses this string. Maybe Rasmus has some better idea?
>
> Thanks,
> Vlastimil
>
> diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
> index f746e44d4046..4add88ef63f0 100644
> --- a/include/linux/nodemask.h
> +++ b/include/linux/nodemask.h
> @@ -103,7 +103,7 @@ extern nodemask_t _unused_nodemask_arg_;
> *
> * Can be used to provide arguments for '%*pb[l]' when printing a nodemask.
> */
> -#define nodemask_pr_args(maskp) MAX_NUMNODES, (maskp)->bits
> +#define nodemask_pr_args(maskp) ((maskp) ? MAX_NUMNODES : (int) sizeof("null")), ((maskp) ? (maskp)->bits : NULL)
>
> /*
> * The inline keyword gives the compiler room to decide to inline, or
>
That's creative. I'm not sure if it's worth it considering
nodemask_pr_args() is usually used in a context where we know we have a
nodemask :) These would be the only two exceptions.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] mm, oom: header nodemask is NULL when cpusets are disabled
2017-01-19 22:57 ` [patch] mm, oom: header " David Rientjes
2017-01-20 7:07 ` Hillf Danton
2017-01-20 9:00 ` [patch] mm, oom: header nodemask is NULL when cpusets are disabled Vlastimil Babka
@ 2017-01-24 10:12 ` Michal Hocko
2 siblings, 0 replies; 9+ messages in thread
From: Michal Hocko @ 2017-01-24 10:12 UTC (permalink / raw)
To: David Rientjes
Cc: Andrew Morton, Vlastimil Babka, Johannes Weiner, Mel Gorman,
linux-mm, LKML
On Thu 19-01-17 14:57:36, David Rientjes wrote:
> Commit 82e7d3abec86 ("oom: print nodemask in the oom report") implicitly
> sets the allocation nodemask to cpuset_current_mems_allowed when there is
> no effective mempolicy. cpuset_current_mems_allowed is only effective
> when cpusets are enabled, which is also printed by dump_header(), so
> setting the nodemask to cpuset_current_mems_allowed is redundant and
> prevents debugging issues where ac->nodemask is not set properly in the
> page allocator.
>
> This provides better debugging output since
> cpuset_print_current_mems_allowed() is already provided.
>
> Suggested-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: David Rientjes <rientjes@google.com>
With the removed \n addressed in the follow up fix
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/oom_kill.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -403,12 +403,14 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
>
> static void dump_header(struct oom_control *oc, struct task_struct *p)
> {
> - nodemask_t *nm = (oc->nodemask) ? oc->nodemask : &cpuset_current_mems_allowed;
> -
> - pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=%*pbl, order=%d, oom_score_adj=%hd\n",
> - current->comm, oc->gfp_mask, &oc->gfp_mask,
> - nodemask_pr_args(nm), oc->order,
> - current->signal->oom_score_adj);
> + pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=",
> + current->comm, oc->gfp_mask, &oc->gfp_mask);
> + if (oc->nodemask)
> + pr_cont("%*pbl", nodemask_pr_args(oc->nodemask));
> + else
> + pr_cont("(null)\n");
> + pr_cont(", order=%d, oom_score_adj=%hd\n",
> + oc->order, current->signal->oom_score_adj);
> if (!IS_ENABLED(CONFIG_COMPACTION) && oc->order)
> pr_warn("COMPACTION is disabled!!!\n");
>
> @@ -417,7 +419,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
> if (oc->memcg)
> mem_cgroup_print_oom_info(oc->memcg, p);
> else
> - show_mem(SHOW_MEM_FILTER_NODES, nm);
> + show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
> if (sysctl_oom_dump_tasks)
> dump_tasks(oc->memcg, oc->nodemask);
> }
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-01-24 10:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 21:51 [patch -mm] mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled David Rientjes
2017-01-19 7:29 ` Vlastimil Babka
2017-01-19 8:57 ` Michal Hocko
2017-01-19 22:57 ` [patch] mm, oom: header " David Rientjes
2017-01-20 7:07 ` Hillf Danton
2017-01-20 10:00 ` [patch -mm] mm, oom: header nodemask is NULL when cpusets are disabled fix David Rientjes
2017-01-20 9:00 ` [patch] mm, oom: header nodemask is NULL when cpusets are disabled Vlastimil Babka
2017-01-20 10:02 ` David Rientjes
2017-01-24 10:12 ` Michal Hocko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).