mbox series

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

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

Message

Yafang Shao Jan. 28, 2021, 2:19 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
[ 6315.235783] ERR: Slab 0x000000006d1133b9 objects=33 used=3 fp=0x000000006d0779d1 flags=0x17ffffc0010200(Node 0x0,Zone 0x2,Lastcpupid 0x1fffff,slab|head)

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

 lib/vsprintf.c | 42 +++++++++++++++++++++++++++++++++++++++++-
 mm/slub.c      | 13 +++++++------
 2 files changed, 48 insertions(+), 7 deletions(-)

Comments

Andy Shevchenko Jan. 28, 2021, 12:12 p.m. UTC | #1
On Thu, Jan 28, 2021 at 10:19:44AM +0800, Yafang Shao wrote:
> 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
> [ 6315.235783] ERR: Slab 0x000000006d1133b9 objects=33 used=3 fp=0x000000006d0779d1 flags=0x17ffffc0010200(Node 0x0,Zone 0x2,Lastcpupid 0x1fffff,slab|head)


Please, add a corresponding test cases to test_printf.c. W/o test cases NAK.
Yafang Shao Jan. 28, 2021, 1:19 p.m. UTC | #2
On Thu, Jan 28, 2021 at 8:12 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Jan 28, 2021 at 10:19:44AM +0800, Yafang Shao wrote:
> > 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
> > [ 6315.235783] ERR: Slab 0x000000006d1133b9 objects=33 used=3 fp=0x000000006d0779d1 flags=0x17ffffc0010200(Node 0x0,Zone 0x2,Lastcpupid 0x1fffff,slab|head)
>
>
> Please, add a corresponding test cases to test_printf.c. W/o test cases NAK.
>

Sure. Will add the test cases in the next version.