• Tobin C. Harding's avatar
    tools/vm/slabinfo: add partial slab listing to -X · 1106b205
    Tobin C. Harding authored
    We would like to see how fragmented the SLUB allocator is, one window into
    fragmentation is the total number of partial slabs.
    
    Currently `slabinfo -X` shows slabs sorted by loss and by size.  We can
    use this option to also show slabs sorted by number of partial slabs.
    
    Option '-X' can be used in conjunction with '-N' to control the number of
    slabs shown e.g.  list of top 5 slabs:
    
    	slabinfo -X -N5
    
    Add list of slabs ordered by number of partial slabs to output of
    `slabinfo -X`.
    
    Link: http://lkml.kernel.org/r/20190426022622.4089-3-tobin@kernel.orgSigned-off-by: default avatarTobin C. Harding <tobin@kernel.org>
    Cc: Alexander Duyck <alexander.duyck@gmail.com>
    Cc: Brendan Gregg <brendan.d.gregg@gmail.com>,
    Cc: Christoph Lameter <cl@linux.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Jesper Dangaard Brouer <brouer@redhat.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Pekka Enberg <penberg@iki.fi>
    Cc: Qian Cai <cai@lca.pw>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    1106b205
slabinfo.c 36.8 KB