<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/tools/vm/slabinfo.c, branch v5.12-rc3</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v5.12-rc3</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v5.12-rc3'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2020-01-31T18:30:38+00:00</updated>
<entry>
<title>tools/vm/slabinfo: fix sanity checks enabling</title>
<updated>2020-01-31T18:30:38+00:00</updated>
<author>
<name>Daniel Wagner</name>
<email>dwagner@suse.de</email>
</author>
<published>2020-01-31T06:14:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e25974aa72a0303a20e9b6a3f3cb32e1873889a8'/>
<id>urn:sha1:e25974aa72a0303a20e9b6a3f3cb32e1873889a8</id>
<content type='text'>
The sysfs file name for enabling sanity checking is called
'sanity_checks' and not 'sanity'.

The name of the file has never changed since the introduction of the
slub allocator.  Obviously, most people turn the checks on via the
command line option and not during runtime using slabinfo.

Link: http://lkml.kernel.org/r/20200116131642.642-1-dwagner@suse.de
Signed-off-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: "Tobin C. Harding" &lt;tobin@kernel.org&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: add sorting info to help menu</title>
<updated>2019-07-12T18:05:46+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-07-12T03:59:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=cbf800d9c7fb38d953ba8ae1bd27a6382114c32e'/>
<id>urn:sha1:cbf800d9c7fb38d953ba8ae1bd27a6382114c32e</id>
<content type='text'>
Passing more than one sorting option has undefined behaviour.

Add an explicit statement as such to the help menu, this also has the
advantage of highlighting all the sorting options.

Link: http://lkml.kernel.org/r/20190426022622.4089-5-tobin@kernel.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Cc: Alexander Duyck &lt;alexander.duyck@gmail.com&gt;
Cc: Brendan Gregg &lt;brendan.d.gregg@gmail.com&gt;,
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Cc: Mel Gorman &lt;mgorman@techsingularity.net&gt;
Cc: Michal Hocko &lt;mhocko@kernel.org&gt;
Cc: Pekka Enberg &lt;penberg@iki.fi&gt;
Cc: Qian Cai &lt;cai@lca.pw&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: add option to sort by partial slabs</title>
<updated>2019-07-12T18:05:46+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-07-12T03:59:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=53a83f9766e33d6bf4e14d5592c1939777fb98db'/>
<id>urn:sha1:53a83f9766e33d6bf4e14d5592c1939777fb98db</id>
<content type='text'>
We would like to get a better view of the level of fragmentation within
the SLUB allocator.  Total number of partial slabs is an indicator of
fragmentation.

Add a command line option (-P | --partial) to sort the slab list by total
number of partial slabs.

Link: http://lkml.kernel.org/r/20190426022622.4089-4-tobin@kernel.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Cc: Alexander Duyck &lt;alexander.duyck@gmail.com&gt;
Cc: Brendan Gregg &lt;brendan.d.gregg@gmail.com&gt;,
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Cc: Mel Gorman &lt;mgorman@techsingularity.net&gt;
Cc: Michal Hocko &lt;mhocko@kernel.org&gt;
Cc: Pekka Enberg &lt;penberg@iki.fi&gt;
Cc: Qian Cai &lt;cai@lca.pw&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: add partial slab listing to -X</title>
<updated>2019-07-12T18:05:46+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-07-12T03:59:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1106b205a3fe034beafad24045b7c00a7eb89669'/>
<id>urn:sha1:1106b205a3fe034beafad24045b7c00a7eb89669</id>
<content type='text'>
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.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Cc: Alexander Duyck &lt;alexander.duyck@gmail.com&gt;
Cc: Brendan Gregg &lt;brendan.d.gregg@gmail.com&gt;,
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Cc: Mel Gorman &lt;mgorman@techsingularity.net&gt;
Cc: Michal Hocko &lt;mhocko@kernel.org&gt;
Cc: Pekka Enberg &lt;penberg@iki.fi&gt;
Cc: Qian Cai &lt;cai@lca.pw&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: order command line options</title>
<updated>2019-07-12T18:05:46+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-07-12T03:59:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d914999689609d45b36db2b0fabb05cf7fc1fa1f'/>
<id>urn:sha1:d914999689609d45b36db2b0fabb05cf7fc1fa1f</id>
<content type='text'>
During recent discussion on LKML over SLAB vs SLUB it was suggested by
Jesper that it would be nice to have a tool to view the current
fragmentation of the slab allocators.  CC list for this set is taken
from that thread.

For SLUB we have all the information for this already exposed by the
kernel and also we have a userspace tool for displaying this info:

	tools/vm/slabinfo.c

Extend slabinfo to improve the fragmentation information by enabling
sorting of caches by number of partial slabs.

Also add cache list sorted in this manner to the output of `slabinfo -X`.

This patch (of 4):

get_opt() has a spurious character within the option string.  Remove it
and reorder the options in alphabetic order so that it is easier to keep
the options correct.  Use the same ordering for command help output and
long option handling code.

Link: http://lkml.kernel.org/r/20190426022622.4089-2-tobin@kernel.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Cc: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Cc: Pekka Enberg &lt;penberg@iki.fi&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Qian Cai &lt;cai@lca.pw&gt;
Cc: Mel Gorman &lt;mgorman@techsingularity.net&gt;
Cc: Alexander Duyck &lt;alexander.duyck@gmail.com&gt;
Cc: Michal Hocko &lt;mhocko@kernel.org&gt;
Cc: Brendan Gregg &lt;brendan.d.gregg@gmail.com&gt;,
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: clean up usage menu debug items</title>
<updated>2019-03-06T05:07:20+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-03-05T23:49:10+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b2f0246d69c0cc909f64469c9117a9616758d9fc'/>
<id>urn:sha1:b2f0246d69c0cc909f64469c9117a9616758d9fc</id>
<content type='text'>
Attempt to make the usage comment for debug options a little cleaner.

Link: http://lkml.kernel.org/r/20190212001219.27769-5-tobin@kernel.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Acked-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: align usage output columns</title>
<updated>2019-03-06T05:07:20+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-03-05T23:49:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3c89ff9aedead8ac48ed8bcd1ad8eb66ba6bd219'/>
<id>urn:sha1:3c89ff9aedead8ac48ed8bcd1ad8eb66ba6bd219</id>
<content type='text'>
Usage message uses spaces not tabspaces, a few tabspaces have snuck in
making the columns not align correctly when output.

Align usage output columns using spaces instead of tabspaces.

Link: http://lkml.kernel.org/r/20190212001219.27769-4-tobin@kernel.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Acked-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: put options in alphabetic order</title>
<updated>2019-03-06T05:07:20+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-03-05T23:49:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b80fd3080317f561a2d84c0f1046ca74afa147ae'/>
<id>urn:sha1:b80fd3080317f561a2d84c0f1046ca74afa147ae</id>
<content type='text'>
Primarily the usage message lists options in alphabetic order however
there are a bunch of the options that are not in alphabetic order.

Put options in alphabetic order.

Link: http://lkml.kernel.org/r/20190212001219.27769-3-tobin@kernel.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Acked-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: update options in usage message</title>
<updated>2019-03-06T05:07:20+00:00</updated>
<author>
<name>Tobin C. Harding</name>
<email>tobin@kernel.org</email>
</author>
<published>2019-03-05T23:48:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=402ad96adcce6b5251de41bee0e336b2cf6b049e'/>
<id>urn:sha1:402ad96adcce6b5251de41bee0e336b2cf6b049e</id>
<content type='text'>
Currently usage message list only a subset of the available options.
should list them all.

Update options in usage massage to include all available options.

Link: http://lkml.kernel.org/r/20190212001219.27769-2-tobin@kernel.org
Signed-off-by: Tobin C. Harding &lt;tobin@kernel.org&gt;
Acked-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo.c: fix sign-compare warning</title>
<updated>2018-09-04T23:45:02+00:00</updated>
<author>
<name>Naoya Horiguchi</name>
<email>n-horiguchi@ah.jp.nec.com</email>
</author>
<published>2018-09-04T22:45:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=904506562e0856f2535d876407d087c9459d345b'/>
<id>urn:sha1:904506562e0856f2535d876407d087c9459d345b</id>
<content type='text'>
Currently we get the following compiler warning:

    slabinfo.c:854:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (s-&gt;object_size &lt; min_objsize)
                          ^

due to the mismatch of signed/unsigned comparison.  -&gt;object_size and
-&gt;slab_size are never expected to be negative, so let's define them as
unsigned int.

[n-horiguchi@ah.jp.nec.com: convert everything - none of these can be negative]
  Link: http://lkml.kernel.org/r/20180826234947.GA9787@hori1.linux.bs1.fc.nec.co.jp
Link: http://lkml.kernel.org/r/1535103134-20239-1-git-send-email-n-horiguchi@ah.jp.nec.com
Signed-off-by: Naoya Horiguchi &lt;n-horiguchi@ah.jp.nec.com&gt;
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
