0001 What: /sys/kernel/slab
0002 Date: May 2007
0003 KernelVersion: 2.6.22
0004 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0005 Christoph Lameter <cl@linux-foundation.org>
0006 Description:
0007 The /sys/kernel/slab directory contains a snapshot of the
0008 internal state of the SLUB allocator for each cache. Certain
0009 files may be modified to change the behavior of the cache (and
0010 any cache it aliases, if any).
0011 Users: kernel memory tuning tools
0012
0013 What: /sys/kernel/slab/<cache>/aliases
0014 Date: May 2007
0015 KernelVersion: 2.6.22
0016 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0017 Christoph Lameter <cl@linux-foundation.org>
0018 Description:
0019 The aliases file is read-only and specifies how many caches
0020 have merged into this cache.
0021
0022 What: /sys/kernel/slab/<cache>/align
0023 Date: May 2007
0024 KernelVersion: 2.6.22
0025 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0026 Christoph Lameter <cl@linux-foundation.org>
0027 Description:
0028 The align file is read-only and specifies the cache's object
0029 alignment in bytes.
0030
0031 What: /sys/kernel/slab/<cache>/alloc_calls
0032 Date: May 2007
0033 KernelVersion: 2.6.22
0034 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0035 Christoph Lameter <cl@linux-foundation.org>
0036 Description:
0037 The alloc_calls file is read-only and lists the kernel code
0038 locations from which allocations for this cache were performed.
0039 The alloc_calls file only contains information if debugging is
0040 enabled for that cache (see Documentation/mm/slub.rst).
0041
0042 What: /sys/kernel/slab/<cache>/alloc_fastpath
0043 Date: February 2008
0044 KernelVersion: 2.6.25
0045 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0046 Christoph Lameter <cl@linux-foundation.org>
0047 Description:
0048 The alloc_fastpath file shows how many objects have been
0049 allocated using the fast path. It can be written to clear the
0050 current count.
0051 Available when CONFIG_SLUB_STATS is enabled.
0052
0053 What: /sys/kernel/slab/<cache>/alloc_from_partial
0054 Date: February 2008
0055 KernelVersion: 2.6.25
0056 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0057 Christoph Lameter <cl@linux-foundation.org>
0058 Description:
0059 The alloc_from_partial file shows how many times a cpu slab has
0060 been full and it has been refilled by using a slab from the list
0061 of partially used slabs. It can be written to clear the current
0062 count.
0063 Available when CONFIG_SLUB_STATS is enabled.
0064
0065 What: /sys/kernel/slab/<cache>/alloc_refill
0066 Date: February 2008
0067 KernelVersion: 2.6.25
0068 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0069 Christoph Lameter <cl@linux-foundation.org>
0070 Description:
0071 The alloc_refill file shows how many times the per-cpu freelist
0072 was empty but there were objects available as the result of
0073 remote cpu frees. It can be written to clear the current count.
0074 Available when CONFIG_SLUB_STATS is enabled.
0075
0076 What: /sys/kernel/slab/<cache>/alloc_slab
0077 Date: February 2008
0078 KernelVersion: 2.6.25
0079 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0080 Christoph Lameter <cl@linux-foundation.org>
0081 Description:
0082 The alloc_slab file is shows how many times a new slab had to
0083 be allocated from the page allocator. It can be written to
0084 clear the current count.
0085 Available when CONFIG_SLUB_STATS is enabled.
0086
0087 What: /sys/kernel/slab/<cache>/alloc_slowpath
0088 Date: February 2008
0089 KernelVersion: 2.6.25
0090 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0091 Christoph Lameter <cl@linux-foundation.org>
0092 Description:
0093 The alloc_slowpath file shows how many objects have been
0094 allocated using the slow path because of a refill or
0095 allocation from a partial or new slab. It can be written to
0096 clear the current count.
0097 Available when CONFIG_SLUB_STATS is enabled.
0098
0099 What: /sys/kernel/slab/<cache>/cache_dma
0100 Date: May 2007
0101 KernelVersion: 2.6.22
0102 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0103 Christoph Lameter <cl@linux-foundation.org>
0104 Description:
0105 The cache_dma file is read-only and specifies whether objects
0106 are from ZONE_DMA.
0107 Available when CONFIG_ZONE_DMA is enabled.
0108
0109 What: /sys/kernel/slab/<cache>/cpu_slabs
0110 Date: May 2007
0111 KernelVersion: 2.6.22
0112 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0113 Christoph Lameter <cl@linux-foundation.org>
0114 Description:
0115 The cpu_slabs file is read-only and displays how many cpu slabs
0116 are active and their NUMA locality.
0117
0118 What: /sys/kernel/slab/<cache>/cpuslab_flush
0119 Date: April 2009
0120 KernelVersion: 2.6.31
0121 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0122 Christoph Lameter <cl@linux-foundation.org>
0123 Description:
0124 The file cpuslab_flush shows how many times a cache's cpu slabs
0125 have been flushed as the result of destroying or shrinking a
0126 cache, a cpu going offline, or as the result of forcing an
0127 allocation from a certain node. It can be written to clear the
0128 current count.
0129 Available when CONFIG_SLUB_STATS is enabled.
0130
0131 What: /sys/kernel/slab/<cache>/ctor
0132 Date: May 2007
0133 KernelVersion: 2.6.22
0134 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0135 Christoph Lameter <cl@linux-foundation.org>
0136 Description:
0137 The ctor file is read-only and specifies the cache's object
0138 constructor function, which is invoked for each object when a
0139 new slab is allocated.
0140
0141 What: /sys/kernel/slab/<cache>/deactivate_empty
0142 Date: February 2008
0143 KernelVersion: 2.6.25
0144 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0145 Christoph Lameter <cl@linux-foundation.org>
0146 Description:
0147 The deactivate_empty file shows how many times an empty cpu slab
0148 was deactivated. It can be written to clear the current count.
0149 Available when CONFIG_SLUB_STATS is enabled.
0150
0151 What: /sys/kernel/slab/<cache>/deactivate_full
0152 Date: February 2008
0153 KernelVersion: 2.6.25
0154 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0155 Christoph Lameter <cl@linux-foundation.org>
0156 Description:
0157 The deactivate_full file shows how many times a full cpu slab
0158 was deactivated. It can be written to clear the current count.
0159 Available when CONFIG_SLUB_STATS is enabled.
0160
0161 What: /sys/kernel/slab/<cache>/deactivate_remote_frees
0162 Date: February 2008
0163 KernelVersion: 2.6.25
0164 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0165 Christoph Lameter <cl@linux-foundation.org>
0166 Description:
0167 The deactivate_remote_frees file shows how many times a cpu slab
0168 has been deactivated and contained free objects that were freed
0169 remotely. It can be written to clear the current count.
0170 Available when CONFIG_SLUB_STATS is enabled.
0171
0172 What: /sys/kernel/slab/<cache>/deactivate_to_head
0173 Date: February 2008
0174 KernelVersion: 2.6.25
0175 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0176 Christoph Lameter <cl@linux-foundation.org>
0177 Description:
0178 The deactivate_to_head file shows how many times a partial cpu
0179 slab was deactivated and added to the head of its node's partial
0180 list. It can be written to clear the current count.
0181 Available when CONFIG_SLUB_STATS is enabled.
0182
0183 What: /sys/kernel/slab/<cache>/deactivate_to_tail
0184 Date: February 2008
0185 KernelVersion: 2.6.25
0186 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0187 Christoph Lameter <cl@linux-foundation.org>
0188 Description:
0189 The deactivate_to_tail file shows how many times a partial cpu
0190 slab was deactivated and added to the tail of its node's partial
0191 list. It can be written to clear the current count.
0192 Available when CONFIG_SLUB_STATS is enabled.
0193
0194 What: /sys/kernel/slab/<cache>/destroy_by_rcu
0195 Date: May 2007
0196 KernelVersion: 2.6.22
0197 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0198 Christoph Lameter <cl@linux-foundation.org>
0199 Description:
0200 The destroy_by_rcu file is read-only and specifies whether
0201 slabs (not objects) are freed by rcu.
0202
0203 What: /sys/kernel/slab/<cache>/free_add_partial
0204 Date: February 2008
0205 KernelVersion: 2.6.25
0206 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0207 Christoph Lameter <cl@linux-foundation.org>
0208 Description:
0209 The free_add_partial file shows how many times an object has
0210 been freed in a full slab so that it had to added to its node's
0211 partial list. It can be written to clear the current count.
0212 Available when CONFIG_SLUB_STATS is enabled.
0213
0214 What: /sys/kernel/slab/<cache>/free_calls
0215 Date: May 2007
0216 KernelVersion: 2.6.22
0217 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0218 Christoph Lameter <cl@linux-foundation.org>
0219 Description:
0220 The free_calls file is read-only and lists the locations of
0221 object frees if slab debugging is enabled (see
0222 Documentation/mm/slub.rst).
0223
0224 What: /sys/kernel/slab/<cache>/free_fastpath
0225 Date: February 2008
0226 KernelVersion: 2.6.25
0227 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0228 Christoph Lameter <cl@linux-foundation.org>
0229 Description:
0230 The free_fastpath file shows how many objects have been freed
0231 using the fast path because it was an object from the cpu slab.
0232 It can be written to clear the current count.
0233 Available when CONFIG_SLUB_STATS is enabled.
0234
0235 What: /sys/kernel/slab/<cache>/free_frozen
0236 Date: February 2008
0237 KernelVersion: 2.6.25
0238 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0239 Christoph Lameter <cl@linux-foundation.org>
0240 Description:
0241 The free_frozen file shows how many objects have been freed to
0242 a frozen slab (i.e. a remote cpu slab). It can be written to
0243 clear the current count.
0244 Available when CONFIG_SLUB_STATS is enabled.
0245
0246 What: /sys/kernel/slab/<cache>/free_remove_partial
0247 Date: February 2008
0248 KernelVersion: 2.6.25
0249 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0250 Christoph Lameter <cl@linux-foundation.org>
0251 Description:
0252 The free_remove_partial file shows how many times an object has
0253 been freed to a now-empty slab so that it had to be removed from
0254 its node's partial list. It can be written to clear the current
0255 count.
0256 Available when CONFIG_SLUB_STATS is enabled.
0257
0258 What: /sys/kernel/slab/<cache>/free_slab
0259 Date: February 2008
0260 KernelVersion: 2.6.25
0261 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0262 Christoph Lameter <cl@linux-foundation.org>
0263 Description:
0264 The free_slab file shows how many times an empty slab has been
0265 freed back to the page allocator. It can be written to clear
0266 the current count.
0267 Available when CONFIG_SLUB_STATS is enabled.
0268
0269 What: /sys/kernel/slab/<cache>/free_slowpath
0270 Date: February 2008
0271 KernelVersion: 2.6.25
0272 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0273 Christoph Lameter <cl@linux-foundation.org>
0274 Description:
0275 The free_slowpath file shows how many objects have been freed
0276 using the slow path (i.e. to a full or partial slab). It can
0277 be written to clear the current count.
0278 Available when CONFIG_SLUB_STATS is enabled.
0279
0280 What: /sys/kernel/slab/<cache>/hwcache_align
0281 Date: May 2007
0282 KernelVersion: 2.6.22
0283 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0284 Christoph Lameter <cl@linux-foundation.org>
0285 Description:
0286 The hwcache_align file is read-only and specifies whether
0287 objects are aligned on cachelines.
0288
0289 What: /sys/kernel/slab/<cache>/min_partial
0290 Date: February 2009
0291 KernelVersion: 2.6.30
0292 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0293 David Rientjes <rientjes@google.com>
0294 Description:
0295 The min_partial file specifies how many empty slabs shall
0296 remain on a node's partial list to avoid the overhead of
0297 allocating new slabs. Such slabs may be reclaimed by utilizing
0298 the shrink file.
0299
0300 What: /sys/kernel/slab/<cache>/object_size
0301 Date: May 2007
0302 KernelVersion: 2.6.22
0303 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0304 Christoph Lameter <cl@linux-foundation.org>
0305 Description:
0306 The object_size file is read-only and specifies the cache's
0307 object size.
0308
0309 What: /sys/kernel/slab/<cache>/objects
0310 Date: May 2007
0311 KernelVersion: 2.6.22
0312 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0313 Christoph Lameter <cl@linux-foundation.org>
0314 Description:
0315 The objects file is read-only and displays how many objects are
0316 active and from which nodes they are from.
0317
0318 What: /sys/kernel/slab/<cache>/objects_partial
0319 Date: April 2008
0320 KernelVersion: 2.6.26
0321 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0322 Christoph Lameter <cl@linux-foundation.org>
0323 Description:
0324 The objects_partial file is read-only and displays how many
0325 objects are on partial slabs and from which nodes they are
0326 from.
0327
0328 What: /sys/kernel/slab/<cache>/objs_per_slab
0329 Date: May 2007
0330 KernelVersion: 2.6.22
0331 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0332 Christoph Lameter <cl@linux-foundation.org>
0333 Description:
0334 The file objs_per_slab is read-only and specifies how many
0335 objects may be allocated from a single slab of the order
0336 specified in /sys/kernel/slab/<cache>/order.
0337
0338 What: /sys/kernel/slab/<cache>/order
0339 Date: May 2007
0340 KernelVersion: 2.6.22
0341 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0342 Christoph Lameter <cl@linux-foundation.org>
0343 Description:
0344 The order file specifies the page order at which new slabs are
0345 allocated. It is writable and can be changed to increase the
0346 number of objects per slab. If a slab cannot be allocated
0347 because of fragmentation, SLUB will retry with the minimum order
0348 possible depending on its characteristics.
0349
0350 When debug_guardpage_minorder=N (N > 0) parameter is specified
0351 (see Documentation/admin-guide/kernel-parameters.rst), the minimum possible
0352 order is used and this sysfs entry can not be used to change
0353 the order at run time.
0354
0355 What: /sys/kernel/slab/<cache>/order_fallback
0356 Date: April 2008
0357 KernelVersion: 2.6.26
0358 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0359 Christoph Lameter <cl@linux-foundation.org>
0360 Description:
0361 The order_fallback file shows how many times an allocation of a
0362 new slab has not been possible at the cache's order and instead
0363 fallen back to its minimum possible order. It can be written to
0364 clear the current count.
0365
0366 Available when CONFIG_SLUB_STATS is enabled.
0367
0368 What: /sys/kernel/slab/<cache>/partial
0369 Date: May 2007
0370 KernelVersion: 2.6.22
0371 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0372 Christoph Lameter <cl@linux-foundation.org>
0373 Description:
0374 The partial file is read-only and displays how long many
0375 partial slabs there are and how long each node's list is.
0376
0377 What: /sys/kernel/slab/<cache>/poison
0378 Date: May 2007
0379 KernelVersion: 2.6.22
0380 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0381 Christoph Lameter <cl@linux-foundation.org>
0382 Description:
0383 The poison file specifies whether objects should be poisoned
0384 when a new slab is allocated.
0385
0386 What: /sys/kernel/slab/<cache>/reclaim_account
0387 Date: May 2007
0388 KernelVersion: 2.6.22
0389 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0390 Christoph Lameter <cl@linux-foundation.org>
0391 Description:
0392 The reclaim_account file specifies whether the cache's objects
0393 are reclaimable (and grouped by their mobility).
0394
0395 What: /sys/kernel/slab/<cache>/red_zone
0396 Date: May 2007
0397 KernelVersion: 2.6.22
0398 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0399 Christoph Lameter <cl@linux-foundation.org>
0400 Description:
0401 The red_zone file specifies whether the cache's objects are red
0402 zoned.
0403
0404 What: /sys/kernel/slab/<cache>/remote_node_defrag_ratio
0405 Date: January 2008
0406 KernelVersion: 2.6.25
0407 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0408 Christoph Lameter <cl@linux-foundation.org>
0409 Description:
0410 The file remote_node_defrag_ratio specifies the percentage of
0411 times SLUB will attempt to refill the cpu slab with a partial
0412 slab from a remote node as opposed to allocating a new slab on
0413 the local node. This reduces the amount of wasted memory over
0414 the entire system but can be expensive.
0415
0416 Available when CONFIG_NUMA is enabled.
0417
0418 What: /sys/kernel/slab/<cache>/sanity_checks
0419 Date: May 2007
0420 KernelVersion: 2.6.22
0421 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0422 Christoph Lameter <cl@linux-foundation.org>
0423 Description:
0424 The sanity_checks file specifies whether expensive checks
0425 should be performed on free and, at minimum, enables double free
0426 checks. Caches that enable sanity_checks cannot be merged with
0427 caches that do not.
0428
0429 What: /sys/kernel/slab/<cache>/shrink
0430 Date: May 2007
0431 KernelVersion: 2.6.22
0432 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0433 Christoph Lameter <cl@linux-foundation.org>
0434 Description:
0435 The shrink file is used to reclaim unused slab cache
0436 memory from a cache. Empty per-cpu or partial slabs
0437 are freed and the partial list is sorted so the slabs
0438 with the fewest available objects are used first.
0439 It only accepts a value of "1" on write for shrinking
0440 the cache. Other input values are considered invalid.
0441 Shrinking slab caches might be expensive and can
0442 adversely impact other running applications. So it
0443 should be used with care.
0444
0445 What: /sys/kernel/slab/<cache>/slab_size
0446 Date: May 2007
0447 KernelVersion: 2.6.22
0448 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0449 Christoph Lameter <cl@linux-foundation.org>
0450 Description:
0451 The slab_size file is read-only and specifies the object size
0452 with metadata (debugging information and alignment) in bytes.
0453
0454 What: /sys/kernel/slab/<cache>/slabs
0455 Date: May 2007
0456 KernelVersion: 2.6.22
0457 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0458 Christoph Lameter <cl@linux-foundation.org>
0459 Description:
0460 The slabs file is read-only and displays how long many slabs
0461 there are (both cpu and partial) and from which nodes they are
0462 from.
0463
0464 What: /sys/kernel/slab/<cache>/store_user
0465 Date: May 2007
0466 KernelVersion: 2.6.22
0467 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0468 Christoph Lameter <cl@linux-foundation.org>
0469 Description:
0470 The store_user file specifies whether the location of
0471 allocation or free should be tracked for a cache.
0472
0473 What: /sys/kernel/slab/<cache>/total_objects
0474 Date: April 2008
0475 KernelVersion: 2.6.26
0476 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0477 Christoph Lameter <cl@linux-foundation.org>
0478 Description:
0479 The total_objects file is read-only and displays how many total
0480 objects a cache has and from which nodes they are from.
0481
0482 What: /sys/kernel/slab/<cache>/trace
0483 Date: May 2007
0484 KernelVersion: 2.6.22
0485 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0486 Christoph Lameter <cl@linux-foundation.org>
0487 Description:
0488 The trace file specifies whether object allocations and frees
0489 should be traced.
0490
0491 What: /sys/kernel/slab/<cache>/validate
0492 Date: May 2007
0493 KernelVersion: 2.6.22
0494 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
0495 Christoph Lameter <cl@linux-foundation.org>
0496 Description:
0497 Writing to the validate file causes SLUB to traverse all of its
0498 cache's objects and check the validity of metadata.
0499
0500 What: /sys/kernel/slab/<cache>/usersize
0501 Date: Jun 2017
0502 Contact: David Windsor <dave@nullcore.net>
0503 Description:
0504 The usersize file is read-only and contains the usercopy
0505 region size.
0506
0507 What: /sys/kernel/slab/<cache>/slabs_cpu_partial
0508 Date: Aug 2011
0509 Contact: Christoph Lameter <cl@linux.com>
0510 Description:
0511 This read-only file shows the number of partialli allocated
0512 frozen slabs.
0513
0514 What: /sys/kernel/slab/<cache>/cpu_partial
0515 Date: Aug 2011
0516 Contact: Christoph Lameter <cl@linux.com>
0517 Description:
0518 This read-only file shows the number of per cpu partial
0519 pages to keep around.