linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Vlastimil Babka <vbabka@suse.cz>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Minchan Kim <minchan@kernel.org>,
	Sasha Levin <sasha.levin@oracle.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Michal Hocko <mhocko@suse.com>
Subject: [PATCH v4 08/14] mm, oom: print symbolic gfp_flags in oom warning
Date: Tue, 26 Jan 2016 13:45:47 +0100	[thread overview]
Message-ID: <1453812353-26744-9-git-send-email-vbabka@suse.cz> (raw)
In-Reply-To: <1453812353-26744-1-git-send-email-vbabka@suse.cz>

It would be useful to translate gfp_flags into string representation when
printing in case of an OOM, especially as the flags have been undergoing some
changes recently and the script ./scripts/gfp-translate needs a matching source
version to be accurate.

Example output:

a.out invoked oom-killer: gfp_mask=0x24280ca(GFP_HIGHUSER_MOVABLE|GFP_ZERO), order=0, om_score_adj=0

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: David Rientjes <rientjes@google.com>
---
 mm/oom_kill.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 6ebc03511807..ce0d2c21e698 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -388,10 +388,11 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
 static void dump_header(struct oom_control *oc, struct task_struct *p,
 			struct mem_cgroup *memcg)
 {
-	pr_warning("%s invoked oom-killer: gfp_mask=0x%x, order=%d, "
-		"oom_score_adj=%hd\n",
-		current->comm, oc->gfp_mask, oc->order,
+	pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), order=%d, "
+			"oom_score_adj=%hd\n",
+		current->comm, oc->gfp_mask, &oc->gfp_mask, oc->order,
 		current->signal->oom_score_adj);
+
 	cpuset_print_current_mems_allowed();
 	dump_stack();
 	if (memcg)
-- 
2.7.0

--
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>

  parent reply	other threads:[~2016-01-26 12:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 12:45 [PATCH v4 00/14] mm flags in printk, page_owner improvements for debugging Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 01/14] tracepoints: move trace_print_flags definitions to tracepoint-defs.h Vlastimil Babka
2016-02-03 23:54   ` David Rientjes
2016-01-26 12:45 ` [PATCH v4 02/14] mm, tracing: make show_gfp_flags() up to date Vlastimil Babka
2016-02-03 23:55   ` David Rientjes
2016-01-26 12:45 ` [PATCH v4 03/14] tools, perf: make gfp_compact_table " Vlastimil Babka
2016-02-03 23:58   ` David Rientjes
2016-01-26 12:45 ` [PATCH v4 04/14] mm, tracing: unify mm flags handling in tracepoints and printk Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 05/14] mm, printk: introduce new format string for flags Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 06/14] mm, debug: replace dump_flags() with the new printk formats Vlastimil Babka
2016-02-04  0:04   ` David Rientjes
2016-01-26 12:45 ` [PATCH v4 07/14] mm, page_alloc: print symbolic gfp_flags on allocation failure Vlastimil Babka
2016-02-04  0:05   ` David Rientjes
2016-01-26 12:45 ` Vlastimil Babka [this message]
2016-02-04  0:01   ` [PATCH v4 08/14] mm, oom: print symbolic gfp_flags in oom warning David Rientjes
2016-01-26 12:45 ` [PATCH v4 09/14] mm, page_owner: print migratetype of page and pageblock, symbolic flags Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 10/14] mm, page_owner: convert page_owner_inited to static key Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 11/14] mm, page_owner: copy page owner info during migration Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 12/14] mm, page_owner: track and print last migrate reason Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 13/14] mm, page_owner: dump page owner info from dump_page() Vlastimil Babka
2016-01-26 12:45 ` [PATCH v4 14/14] mm, debug: move bad flags printing to bad_page() Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453812353-26744-9-git-send-email-vbabka@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=rientjes@google.com \
    --cc=sasha.levin@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox