[Crash-utility] [PATCH v2] Add -m option to kmem

Dave Anderson anderson at redhat.com
Wed Mar 27 15:48:43 UTC 2013



----- Original Message -----
> kmem -m|-M is used for displaying information of all ksm pages or
> some ksm pages for specified ksm stable tree node addresses
> 
> for example:
> crash> kmem -m
> STABLE_NODE     : ffff88083fc927e0
> PAGE            : ffffea000e667998
> PHYSICAL ADDRESS: 41d475000
> 
>              PID: 2967 MAPPING: 3
> 
> STABLE_NODE     : ffff88083fc84a10
> PAGE            : ffffea000e3dd5d8
> PHYSICAL ADDRESS: 411aad000
> 
>              PID: 2967 MAPPING: 7
> 
> STABLE_NODE     : ffff88041980dda8
> PAGE            : ffffea000e335568
> PHYSICAL ADDRESS: 40eaab000
> 
>              PID: 2967 MAPPING: 8
> ...
> 
> STABLE_NODE     : ffff880841ea43f8
> PAGE            : ffffea000f62de38
> PHYSICAL ADDRESS: 465641000
> 
>              PID: 2967 MAPPING: 729
>              PID: 3017 MAPPING: 499
> 
> P.S.
> This patch is based on the patch from Qiao(qiaonuohan at cn.fujitsu.com)
>     0001-make-rbtree-manipulation-functions-global.patch
> Because this patch also uses rb_tree operations.

I cannot test this because all of my sample dumps either return:

  crash> kmem -m
  kmem: -m option not supported or applicable on this architecture or kernel
  crash> 

or:

  crash> kmem -m
  ksm may not be enabled
  crash>

which, by the way, is not a very helpful error message.

Do you have a reasonably-sized vmcore that I can download and test?

Also, I have a question about the help message:

 crash> help kmem
 
 NAME
   kmem - kernel memory
 
 SYNOPSIS
   kmem [-f|-F|-p|-c|-C|-i|-s|-S|-v|-V|-n|-z|-o|-m|-M] [slab] [[-P] address]
        [-g [flags]
 
 DESCRIPTION
 ... [ cut ] ... 
         -m  displays information of ksm pages.
         -M  same as -m, but also dumps virtual addresses that mapping the
             ksm pages.
 ... [ cut ] ...
    address  when used with -m or -M, the address can be either a ksm stable
             tree node address, a page's physical address, or a page pointer,
             the information of the ksm page (if it is) is displayed.
  ... [ cut ] ...
 
  Display information of ksm pages:
 
     crash> kmem -m ffff88086f22eec0 ffff8803573964c0
     STABLE_NODE     : ffff88083fc927e0
     PAGE            : ffffea000e667998
     PHYSICAL ADDRESS: 41d475000
 
                  PID: 2967 MAPPING: 3
 
     STABLE_NODE     : ffff88083fc84a10
     PAGE            : ffffea000e3dd5d8
     PHYSICAL ADDRESS: 411aad000
 
                  PID: 2967 MAPPING: 7
 
     STABLE_NODE     : ffff88041980dda8
     PAGE            : ffffea000e335568
     PHYSICAL ADDRESS: 40eaab000
 
                  PID: 2967 MAPPING: 8
 
     ......
 
     STABLE_NODE     : ffff880841ea43f8
     PAGE            : ffffea000f62de38
     PHYSICAL ADDRESS: 465641000
 
                  PID: 2967 MAPPING: 729
                  PID: 3017 MAPPING: 499

  crash>

Please tell me how the two address arguments ffff88086f22eec0 and
ffff8803573964c0 have any relationship to the subsequent display?

Dave





More information about the Crash-utility mailing list