[Crash-utility] Adding a new command rbtree

Dave Anderson anderson at redhat.com
Tue May 29 18:57:38 UTC 2012



----- Original Message -----
> 
> 
> ----- Original Message -----
> > At 2012-5-25 3:12, Dave Anderson wrote:
> > > But again, the red-black tree dump should be similar to the radix tree
> > > dump, and both of them should be similar to the "list" command.
> > Fixed. I misunderstood the address printed by list command. I thought I
> > need to print the address of tree node.
> 
> You have fixed the red-black tree issue, but now it seems that the
> radix tree dump no longer works.

As it turns out, the radix tree problem I reported seems to be an issue 
associated with the kernel version.   

With your latest patch, radix tree dumps do work OK on RHEL6 (and later)
kernels.  For example:

crash> sys | grep RELEASE
     RELEASE: 2.6.32-156.el6.x86_64
crash> vtop 400000 | tail -2
      PAGE       PHYSICAL      MAPPING       INDEX CNT FLAGS
ffffea00040d12c0 1284e8000 ffff88012d364de0        0  7 4000000002006c
crash> address_space.page_tree ffff88012d364de0
  page_tree = {
    height = 2, 
    gfp_mask = 32, 
    rnode = 0xffff8801238add71
  }
crash> tree -t radix -r address_space.page_tree ffff88012d364de0
ffffea00040d12c0
ffffea00040d9a60
ffffea00040d9b08
ffffea000407eda8
ffffea0004084288
ffffea00040843a0
ffffea000407d6e8
ffffea0004080a50
ffffea0004084250
ffffea0004084170
ffffea00040dba50
ffffea00040b4b18
...

crash> kmem -p ffffea00040dba50 ffffea00040b4b18
      PAGE       PHYSICAL      MAPPING       INDEX CNT FLAGS
ffffea00040dba50 1287e6000 ffff88012d364de0        a  7 4000000002006c
ffffea00040b4b18 127cc5000 ffff88012d364de0        b  1 40000000020028
crash>

But when I try the same thing on a RHEL5 kernel, it always fails like this:

crash> sys | grep RELEASE
     RELEASE: 2.6.18-146.el5
crash> vtop 400000 | tail -2
      PAGE       PHYSICAL      MAPPING       INDEX CNT FLAGS
ffff810103c06490 11265e000 ffff81012eab2e00        0  3 11010000001020c
crash> address_space.page_tree ffff81012eab2e00
  page_tree = {
    height = 1, 
    gfp_mask = 544, 
    rnode = 0xffff81011f9932e8
  }
crash> tree -t radix -r address_space.page_tree ffff81012eab2e00
radix_tree_node at ffff81011f9932e8
struct radix_tree_node {
  count = 0x6, 
  slots = {0xffff810103c06490, 0xffff810103c1c760, 0xffff810103c58580, 0xffff810103bfb750, 0xffff810103e84cd8, 0xffff810103bf8b5
8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 
  tags = {{0x0}, {0x0}}
}
tree: height 1536 is greater than height_to_maxindex[]                  index 12
crash>

Dave




More information about the Crash-utility mailing list