linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Fangzheng Zhang <fangzheng.zhang@unisoc.com>
To: Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Greg KH <gregkh@linuxfoundation.org>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	<tkjos@google.com>, Fangzheng Zhang <fangzheng.zhang@unisoc.com>,
	Fangzheng Zhang <fangzheng.zhang1003@gmail.com>,
	Yuming Han <yuming.han@unisoc.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>
Subject: [PATCH V2 2/2] Documentation: filesystems: introduce proc/slabinfo to users
Date: Mon, 19 Feb 2024 11:19:11 +0800	[thread overview]
Message-ID: <20240219031911.10372-3-fangzheng.zhang@unisoc.com> (raw)
In-Reply-To: <20240219031911.10372-1-fangzheng.zhang@unisoc.com>

Supplement slabinfo-version 2.2 details in proc.rst, so that
users can have the status of slabinfo at a glance. And mark
the optimization work that will be performed on proc/slabinfo
in the next step.

Signed-off-by: Fangzheng Zhang <fangzheng.zhang@unisoc.com>
---
 Documentation/filesystems/proc.rst | 33 ++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index 104c6d047d9b..89ab92f6be2d 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -892,6 +892,39 @@ Linux uses  slab  pools for memory management above page level in version 2.2.
 Commonly used  objects  have  their  own  slab  pool (such as network buffers,
 directory cache, and so on).
 
+Example output. You can have all of these fields in slabinfo - version: 2.2.
+
+::
+
+    > cat /proc/slabinfo
+
+    slabinfo - version: 2.2
+    # name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail> <slabreclaim>
+    zspage              2240   2240     72   56    1 : tunables    0    0    0 : slabdata     40     40      0      0
+    zs_handle          17408  17408      8  512    1 : tunables    0    0    0 : slabdata     34     34      0      0
+    f2fs_xattr_entry-254:48    312    312    208   39    2 : tunables    0    0    0 : slabdata      8      8      0      1
+    imsbr_flow           102    102     80   51    1 : tunables    0    0    0 : slabdata      2      2      0      0
+    ......
+    ext4_groupinfo_4k    312    312    208   39    2 : tunables    0    0    0 : slabdata      8      8      0      1
+    dm_verity_fec_buffers      8      8   4048    8    8 : tunables    0    0    0 : slabdata      1      1      0      0
+    dm_bufio_buffer       28     28    144   28    1 : tunables    0    0    0 : slabdata      1      1      0      1
+    ......
+    kernfs_iattrs_cache   4010   4116     96   42    1 : tunables    0    0    0 : slabdata     98     98      0      0
+    kernfs_node_cache  67169  67232    128   32    1 : tunables    0    0    0 : slabdata   2101   2101      0      0
+    mnt_cache           5624   5700    320   25    2 : tunables    0    0    0 : slabdata    228    228      0      0
+    filp               15840  17400    320   25    2 : tunables    0    0    0 : slabdata    696    696      0      0
+    ......
+    kmalloc-32         30398  32384     32  128    1 : tunables    0    0    0 : slabdata    253    253      0      0
+    kmalloc-16         31566  31744     16  256    1 : tunables    0    0    0 : slabdata    124    124      0      0
+    kmalloc-8          51623  51712      8  512    1 : tunables    0    0    0 : slabdata    101    101      0      0
+    kmem_cache_node      416    416    128   32    1 : tunables    0    0    0 : slabdata     13     13      0      0
+    kmem_cache           416    416    256   32    2 : tunables    0    0    0 : slabdata     13     13      0      0
+
+Note, <slabreclaim> comes from the collected results in the file
+/sys/kernel/slab/$cache/reclaim_account. Next, we will mark /proc/slabinfo
+as deprecated and recommend the use of either sysfs directly or
+use of the "slabinfo" tool that we have been providing in linux/tools/mm.
+
 ::
 
     > cat /proc/buddyinfo
-- 
2.17.1



  parent reply	other threads:[~2024-02-19  3:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19  3:19 [PATCH V2 0/2] Introduce slabinfo version 2.2 Fangzheng Zhang
2024-02-19  3:19 ` [PATCH V2 1/2] mm/slab: Add slabreclaim flag to slabinfo Fangzheng Zhang
2024-02-19  3:19 ` Fangzheng Zhang [this message]
2024-02-19  4:24   ` [PATCH V2 2/2] Documentation: filesystems: introduce proc/slabinfo to users Matthew Wilcox
     [not found]     ` <CA+kNDJ+C2b520afauSWbfNK=S1XiNHR_zF32_K-3Rf7R6m3n5Q@mail.gmail.com>
2024-02-19  8:09       ` Vlastimil Babka
2024-02-20  8:49         ` zhang fangzheng
2024-02-20  9:21           ` Vlastimil Babka
2024-02-20  9:45             ` zhang fangzheng
2024-02-19 11:29 ` [PATCH V2 0/2] Introduce slabinfo version 2.2 Chengming Zhou
2024-02-20  6:25   ` zhang fangzheng
2024-02-20  7:09     ` Chengming Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240219031911.10372-3-fangzheng.zhang@unisoc.com \
    --to=fangzheng.zhang@unisoc.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=fangzheng.zhang1003@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=tkjos@google.com \
    --cc=vbabka@suse.cz \
    --cc=yuming.han@unisoc.com \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox