<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/vm/slabinfo.c, branch linux-6.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-08-05T23:32:45+00:00</updated>
<entry>
<title>Merge tag 'mm-stable-2022-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
<updated>2022-08-05T23:32:45+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-08-05T23:32:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6614a3c3164a5df2b54abb0b3559f51041cf705b'/>
<id>urn:sha1:6614a3c3164a5df2b54abb0b3559f51041cf705b</id>
<content type='text'>
Pull MM updates from Andrew Morton:
 "Most of the MM queue. A few things are still pending.

  Liam's maple tree rework didn't make it. This has resulted in a few
  other minor patch series being held over for next time.

  Multi-gen LRU still isn't merged as we were waiting for mapletree to
  stabilize. The current plan is to merge MGLRU into -mm soon and to
  later reintroduce mapletree, with a view to hopefully getting both
  into 6.1-rc1.

  Summary:

   - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe
     Lin, Yang Shi, Anshuman Khandual and Mike Rapoport

   - Some kmemleak fixes from Patrick Wang and Waiman Long

   - DAMON updates from SeongJae Park

   - memcg debug/visibility work from Roman Gushchin

   - vmalloc speedup from Uladzislau Rezki

   - more folio conversion work from Matthew Wilcox

   - enhancements for coherent device memory mapping from Alex Sierra

   - addition of shared pages tracking and CoW support for fsdax, from
     Shiyang Ruan

   - hugetlb optimizations from Mike Kravetz

   - Mel Gorman has contributed some pagealloc changes to improve
     latency and realtime behaviour.

   - mprotect soft-dirty checking has been improved by Peter Xu

   - Many other singleton patches all over the place"

 [ XFS merge from hell as per Darrick Wong in

   https://lore.kernel.org/all/YshKnxb4VwXycPO8@magnolia/ ]

* tag 'mm-stable-2022-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (282 commits)
  tools/testing/selftests/vm/hmm-tests.c: fix build
  mm: Kconfig: fix typo
  mm: memory-failure: convert to pr_fmt()
  mm: use is_zone_movable_page() helper
  hugetlbfs: fix inaccurate comment in hugetlbfs_statfs()
  hugetlbfs: cleanup some comments in inode.c
  hugetlbfs: remove unneeded header file
  hugetlbfs: remove unneeded hugetlbfs_ops forward declaration
  hugetlbfs: use helper macro SZ_1{K,M}
  mm: cleanup is_highmem()
  mm/hmm: add a test for cross device private faults
  selftests: add soft-dirty into run_vmtests.sh
  selftests: soft-dirty: add test for mprotect
  mm/mprotect: fix soft-dirty check in can_change_pte_writable()
  mm: memcontrol: fix potential oom_lock recursion deadlock
  mm/gup.c: fix formatting in check_and_migrate_movable_page()
  xfs: fail dax mount if reflink is enabled on a partition
  mm/memcontrol.c: remove the redundant updating of stats_flush_threshold
  userfaultfd: don't fail on unrecognized features
  hugetlb_cgroup: fix wrong hugetlb cgroup numa stat
  ...
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: Handle files in debugfs</title>
<updated>2022-07-04T15:10:15+00:00</updated>
<author>
<name>Stéphane Graber</name>
<email>stgraber@ubuntu.com</email>
</author>
<published>2022-06-23T21:45:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c7e0d699ef1430d7f4cf12b4b1d097af58b5515'/>
<id>urn:sha1:0c7e0d699ef1430d7f4cf12b4b1d097af58b5515</id>
<content type='text'>
Commit 64dd68497be76 relocated and renamed the alloc_calls and
free_calls files from /sys/kernel/slab/NAME/*_calls over to
/sys/kernel/debug/slab/NAME/*_calls but didn't update the slabinfo tool
with the new location.

This change will now have slabinfo look at the new location (and filenames)
with a fallback to the prior files.

Fixes: 64dd68497be76 ("mm: slub: move sysfs slab alloc/free interfaces to debugfs")
Cc: stable@vger.kernel.org
Signed-off-by: Stéphane Graber &lt;stgraber@ubuntu.com&gt;
Tested-by: Stéphane Graber &lt;stgraber@ubuntu.com&gt;
Signed-off-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
</content>
</entry>
<entry>
<title>tools/vm/slabinfo: use alphabetic order when two values are equal</title>
<updated>2022-06-17T02:48:27+00:00</updated>
<author>
<name>Yuanzheng Song</name>
<email>songyuanzheng@huawei.com</email>
</author>
<published>2022-05-28T06:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f5ceb8851f0081af54313abbf56de1615911faf'/>
<id>urn:sha1:4f5ceb8851f0081af54313abbf56de1615911faf</id>
<content type='text'>
When the number of partial slabs in each cache is the same (e.g., the
value are 0), the results of the `slabinfo -X -N5` and `slabinfo -P -N5`
are different.

/ # slabinfo -X -N5
...
Slabs sorted by number of partial slabs
---------------------------------------
Name                   Objects Objsize           Space Slabs/Part/Cpu  O/S O %Fr %Ef Flg
inode_cache              15180     392         6217728        758/0/1   20 1   0  95 a
kernfs_node_cache        22494      88         2002944        488/0/1   46 0   0  98
shmem_inode_cache          663     464          319488         38/0/1   17 1   0  96
biovec-max                  50    3072          163840          4/0/1   10 3   0  93 A
dentry                   19050     136         2600960        633/0/2   30 0   0  99 a

/ # slabinfo -P -N5
Name                   Objects Objsize           Space Slabs/Part/Cpu  O/S O %Fr %Ef Flg
bdev_cache                  32     984           32.7K          1/0/1   16 2   0  96 Aa
ext4_inode_cache            42     752           32.7K          1/0/1   21 2   0  96 a
dentry                   19050     136            2.6M        633/0/2   30 0   0  99 a
TCPv6                       17    1840           32.7K          0/0/1   17 3   0  95 A
RAWv6                       18     856           16.3K          0/0/1   18 2   0  94 A

This problem is caused by the sort_slabs().  So let's use alphabetic order
when two values are equal in the sort_slabs().

By the way, the content of the `slabinfo -h` is not aligned because the

`-P|--partial Sort by number of partial slabs`

uses tabs instead of spaces.  So let's use spaces instead of tabs to fix
it.

Link: https://lkml.kernel.org/r/20220528063117.935158-1-songyuanzheng@huawei.com
Fixes: 1106b205a3fe ("tools/vm/slabinfo: add partial slab listing to -X")
Signed-off-by: Yuanzheng Song &lt;songyuanzheng@huawei.com&gt;
Cc: "Tobin C. Harding" &lt;tobin@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<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='https://git.radix-linux.su/kernel/linux.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='https://git.radix-linux.su/kernel/linux.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='https://git.radix-linux.su/kernel/linux.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='https://git.radix-linux.su/kernel/linux.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='https://git.radix-linux.su/kernel/linux.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='https://git.radix-linux.su/kernel/linux.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='https://git.radix-linux.su/kernel/linux.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>
</feed>
