linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/14] mm flags in printk, page_owner improvements for debugging
@ 2015-12-18  9:03 Vlastimil Babka
  2015-12-18  9:03 ` [PATCH v3 01/14] tracepoints: move trace_print_flags definitions to tracepoint-defs.h Vlastimil Babka
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: Vlastimil Babka @ 2015-12-18  9:03 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Vlastimil Babka,
	Arnaldo Carvalho de Melo, Hugh Dickins, Ingo Molnar, Joonsoo Kim,
	Kirill A. Shutemov, Mel Gorman, Michal Hocko, Michal Hocko,
	Minchan Kim, Peter Zijlstra, Rasmus Villemoes, Sasha Levin,
	Steven Rostedt

After v2 [1] of the page_owner series, I've moved mm-specific flags printing
into printk() and posted it on top of the series. But it makes more sense and
results in less code churn to do the printk() changes first. So this series
is two-part. Patches 1-6 are related to the flags handling in printk() and
tracepoints, and Cc the printk, ftrace and perf maintainers. The rest is
the original page_owner series, CCing only mm people.

The patches are intended to fully replace the v2 in -mm tree, so they can't
simply apply to -next. Furthermore, the first patch needs "tracepoints: Move
struct tracepoint to new tracepoint-defs.h header" from tip. I'm not sure how
the maintainer merging should work here, suggestions welcome.

To apply for testing/review, prepare a tree like this:
git checkout next-20151217
git revert --no-edit 75d89138243d1062acbd20fe2c13fed4889f4438..fcf95d5cb1cbb5c3ae18ae88f8073a8e0e2e57bf

Adapted description of v2:

For page_owner, the main changes are
o Use static key to further reduce overhead when compiled in but not enabled.
o Improve output wrt. page and pageblock migratetypes
o Transfer the info on page migrations and track last migration reason.
o Dump the info as part of dump_page() to hopefully help debugging.

For the last point, Kirill requested a human readable printing of gfp_mask and
migratetype after v1. At that point it probably makes a lot of sense to do the
same for page alloc failure and OOM warnings. The flags have been undergoing
revisions recently, and we might be getting reports from various kernel
versions that differ. The ./scripts/gfp-translate tool needs to be pointed at
the corresponding sources to be accurate.  The downside is potentially breaking
scripts that grep these warnings, but it's not a first change done there over
the years.

Other changes since v1:
o Change placement of page owner migration calls to cover missing cases (Hugh)
o Move dump_page_owner() call up from dump_page_badflags(), so the latter can
  be used for adding debugging prints without page owner info (Kirill)

[1] https://lkml.org/lkml/2015/11/24/342

Vlastimil Babka (14):
  tracepoints: move trace_print_flags definitions to tracepoint-defs.h
  mm, tracing: make show_gfp_flags() up to date
  tools, perf: make gfp_compact_table up to date
  mm, tracing: unify mm flags handling in tracepoints and printk
  mm, printk: introduce new format string for flags
  mm, debug: replace dump_flags() with the new printk formats
  mm, page_alloc: print symbolic gfp_flags on allocation failure
  mm, oom: print symbolic gfp_flags in oom warning
  mm, page_owner: print migratetype of page and pageblock, symbolic
    flags
  mm, page_owner: convert page_owner_inited to static key
  mm, page_owner: copy page owner info during migration
  mm, page_owner: track and print last migrate reason
  mm, page_owner: dump page owner info from dump_page()
  mm, debug: move bad flags printing to bad_page()

 Documentation/printk-formats.txt   |  18 ++++
 Documentation/vm/page_owner.txt    |   9 +-
 include/linux/gfp.h                |   5 ++
 include/linux/migrate.h            |   6 +-
 include/linux/mmdebug.h            |   9 +-
 include/linux/mmzone.h             |   3 +
 include/linux/page_ext.h           |   1 +
 include/linux/page_owner.h         |  50 ++++++++---
 include/linux/trace_events.h       |  10 ---
 include/linux/tracepoint-defs.h    |  14 +++-
 include/trace/events/btrfs.h       |   2 +-
 include/trace/events/compaction.h  |   2 +-
 include/trace/events/gfpflags.h    |  43 ----------
 include/trace/events/huge_memory.h |   2 -
 include/trace/events/kmem.h        |   2 +-
 include/trace/events/mmflags.h     | 161 ++++++++++++++++++++++++++++++++++++
 include/trace/events/vmscan.h      |   2 +-
 lib/test_printf.c                  |  53 ++++++++++++
 lib/vsprintf.c                     |  75 +++++++++++++++++
 mm/debug.c                         | 165 +++++++++----------------------------
 mm/internal.h                      |   6 ++
 mm/migrate.c                       |  13 ++-
 mm/oom_kill.c                      |   7 +-
 mm/page_alloc.c                    |  29 +++++--
 mm/page_owner.c                    | 100 +++++++++++++++++-----
 mm/vmstat.c                        |  15 +---
 tools/perf/builtin-kmem.c          |  13 ++-
 27 files changed, 559 insertions(+), 256 deletions(-)
 delete mode 100644 include/trace/events/gfpflags.h
 create mode 100644 include/trace/events/mmflags.h

-- 
2.6.3


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2016-01-07 13:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18  9:03 [PATCH v3 00/14] mm flags in printk, page_owner improvements for debugging Vlastimil Babka
2015-12-18  9:03 ` [PATCH v3 01/14] tracepoints: move trace_print_flags definitions to tracepoint-defs.h Vlastimil Babka
2015-12-18  9:03 ` [PATCH v3 02/14] mm, tracing: make show_gfp_flags() up to date Vlastimil Babka
2016-01-07  9:29   ` Michal Hocko
2015-12-18  9:03 ` [PATCH v3 03/14] tools, perf: make gfp_compact_table " Vlastimil Babka
2015-12-18  9:03 ` [PATCH v3 04/14] mm, tracing: unify mm flags handling in tracepoints and printk Vlastimil Babka
2016-01-07  9:46   ` Michal Hocko
2015-12-18  9:03 ` [PATCH v3 05/14] mm, printk: introduce new format string for flags Vlastimil Babka
2016-01-07  9:53   ` Michal Hocko
2015-12-18  9:03 ` [PATCH v3 06/14] mm, debug: replace dump_flags() with the new printk formats Vlastimil Babka
2016-01-07  9:57   ` Michal Hocko
2015-12-18  9:03 ` [PATCH v3 07/14] mm, page_alloc: print symbolic gfp_flags on allocation failure Vlastimil Babka
2015-12-18  9:03 ` [PATCH v3 08/14] mm, oom: print symbolic gfp_flags in oom warning Vlastimil Babka
2015-12-18  9:03 ` [PATCH v3 09/14] mm, page_owner: print migratetype of page and pageblock, symbolic flags Vlastimil Babka
2016-01-07 10:06   ` Michal Hocko
2015-12-18  9:03 ` [PATCH v3 10/14] mm, page_owner: convert page_owner_inited to static key Vlastimil Babka
2016-01-07 10:21   ` Michal Hocko
2015-12-18  9:03 ` [PATCH v3 11/14] mm, page_owner: copy page owner info during migration Vlastimil Babka
2016-01-07 10:44   ` Michal Hocko
2015-12-18  9:03 ` [PATCH v3 12/14] mm, page_owner: track and print last migrate reason Vlastimil Babka
2016-01-07 10:54   ` Michal Hocko
2016-01-07 13:17     ` Vlastimil Babka
2015-12-18  9:03 ` [PATCH v3 13/14] mm, page_owner: dump page owner info from dump_page() Vlastimil Babka
2015-12-18  9:03 ` [PATCH v3 14/14] mm, debug: move bad flags printing to bad_page() Vlastimil Babka
2016-01-07 13:10   ` 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).