[PATCH v3 00/14] mm flags in printk, page_owner improvements for debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]