mbox series

[v2,0/3] mm, vsprintf: dump full information of page flags in pGp

Message ID 20210201115610.87808-1-laoar.shao@gmail.com (mailing list archive)
Headers show
Series mm, vsprintf: dump full information of page flags in pGp | expand

Message

Yafang Shao Feb. 1, 2021, 11:56 a.m. UTC
Currently the pGp only shows the names of page flags, rather than
the full information including section, node, zone, last cpupid and
kasan tag. While it is not easy to parse these information manually
because there're so many flavors. Let's interpret them in pGp as well.

This patchset also includes some code cleanup in mm/slub.c.

Below is the example of the output in mm/slub.c.
- Before the patchset
[ 6155.716018] INFO: Slab 0x000000004027dd4f objects=33 used=3 fp=0x000000008cd1579c flags=0x17ffffc0010200

- After the patchset
[ 6871.296131] Slab 0x00000000c0e19a37 objects=33 used=3 fp=0x00000000c4902159 flags=0x17ffffc0010200(Node 0,Zone 2,Lastcpupid 0x1fffff,slab|head)

The documentation and test cases of pGp are also updated. 

Below is the result of the test_printf,
[ 5091.307308] test_printf: loaded.
[ 5091.308285] test_printf: all 388 tests passed
[ 5091.309105] test_printf: unloaded.

v2:
- various coding improvement, per Joe, Miaohe, Vlastimil and Andy
- remove the prefix completely in patch #2, per Vlastimil
- Update the test cases, per Andy

Yafang Shao (3):
  mm, slub: use pGp to print page flags
  mm, slub: don't combine pr_err with INFO
  vsprintf: dump full information of page flags in pGp

 Documentation/core-api/printk-formats.rst |  2 +-
 lib/test_printf.c                         | 65 ++++++++++++++++++-----
 lib/vsprintf.c                            | 58 +++++++++++++++++++-
 mm/slub.c                                 | 13 ++---
 4 files changed, 116 insertions(+), 22 deletions(-)