520 lines · plain
1What: /sys/kernel/slab2Date: May 20073KernelVersion: 2.6.224Contact: Pekka Enberg <penberg@cs.helsinki.fi>,5 Christoph Lameter <cl@linux-foundation.org>6Description:7 The /sys/kernel/slab directory contains a snapshot of the8 internal state of the SLUB allocator for each cache. Certain9 files may be modified to change the behavior of the cache (and10 any cache it aliases, if any).11Users: kernel memory tuning tools12 13What: /sys/kernel/slab/<cache>/aliases14Date: May 200715KernelVersion: 2.6.2216Contact: Pekka Enberg <penberg@cs.helsinki.fi>,17 Christoph Lameter <cl@linux-foundation.org>18Description:19 The aliases file is read-only and specifies how many caches20 have merged into this cache.21 22What: /sys/kernel/slab/<cache>/align23Date: May 200724KernelVersion: 2.6.2225Contact: Pekka Enberg <penberg@cs.helsinki.fi>,26 Christoph Lameter <cl@linux-foundation.org>27Description:28 The align file is read-only and specifies the cache's object29 alignment in bytes.30 31What: /sys/kernel/slab/<cache>/alloc_calls32Date: May 200733KernelVersion: 2.6.2234Contact: Pekka Enberg <penberg@cs.helsinki.fi>,35 Christoph Lameter <cl@linux-foundation.org>36Description:37 The alloc_calls file is read-only and lists the kernel code38 locations from which allocations for this cache were performed.39 The alloc_calls file only contains information if debugging is40 enabled for that cache (see Documentation/mm/slub.rst).41 42What: /sys/kernel/slab/<cache>/alloc_fastpath43Date: February 200844KernelVersion: 2.6.2545Contact: Pekka Enberg <penberg@cs.helsinki.fi>,46 Christoph Lameter <cl@linux-foundation.org>47Description:48 The alloc_fastpath file shows how many objects have been49 allocated using the fast path. It can be written to clear the50 current count.51 Available when CONFIG_SLUB_STATS is enabled.52 53What: /sys/kernel/slab/<cache>/alloc_from_partial54Date: February 200855KernelVersion: 2.6.2556Contact: Pekka Enberg <penberg@cs.helsinki.fi>,57 Christoph Lameter <cl@linux-foundation.org>58Description:59 The alloc_from_partial file shows how many times a cpu slab has60 been full and it has been refilled by using a slab from the list61 of partially used slabs. It can be written to clear the current62 count.63 Available when CONFIG_SLUB_STATS is enabled.64 65What: /sys/kernel/slab/<cache>/alloc_refill66Date: February 200867KernelVersion: 2.6.2568Contact: Pekka Enberg <penberg@cs.helsinki.fi>,69 Christoph Lameter <cl@linux-foundation.org>70Description:71 The alloc_refill file shows how many times the per-cpu freelist72 was empty but there were objects available as the result of73 remote cpu frees. It can be written to clear the current count.74 Available when CONFIG_SLUB_STATS is enabled.75 76What: /sys/kernel/slab/<cache>/alloc_slab77Date: February 200878KernelVersion: 2.6.2579Contact: Pekka Enberg <penberg@cs.helsinki.fi>,80 Christoph Lameter <cl@linux-foundation.org>81Description:82 The alloc_slab file is shows how many times a new slab had to83 be allocated from the page allocator. It can be written to84 clear the current count.85 Available when CONFIG_SLUB_STATS is enabled.86 87What: /sys/kernel/slab/<cache>/alloc_slowpath88Date: February 200889KernelVersion: 2.6.2590Contact: Pekka Enberg <penberg@cs.helsinki.fi>,91 Christoph Lameter <cl@linux-foundation.org>92Description:93 The alloc_slowpath file shows how many objects have been94 allocated using the slow path because of a refill or95 allocation from a partial or new slab. It can be written to96 clear the current count.97 Available when CONFIG_SLUB_STATS is enabled.98 99What: /sys/kernel/slab/<cache>/cache_dma100Date: May 2007101KernelVersion: 2.6.22102Contact: Pekka Enberg <penberg@cs.helsinki.fi>,103 Christoph Lameter <cl@linux-foundation.org>104Description:105 The cache_dma file is read-only and specifies whether objects106 are from ZONE_DMA.107 Available when CONFIG_ZONE_DMA is enabled.108 109What: /sys/kernel/slab/<cache>/cpu_slabs110Date: May 2007111KernelVersion: 2.6.22112Contact: Pekka Enberg <penberg@cs.helsinki.fi>,113 Christoph Lameter <cl@linux-foundation.org>114Description:115 The cpu_slabs file is read-only and displays how many cpu slabs116 are active and their NUMA locality.117 118What: /sys/kernel/slab/<cache>/cpuslab_flush119Date: April 2009120KernelVersion: 2.6.31121Contact: Pekka Enberg <penberg@cs.helsinki.fi>,122 Christoph Lameter <cl@linux-foundation.org>123Description:124 The file cpuslab_flush shows how many times a cache's cpu slabs125 have been flushed as the result of destroying or shrinking a126 cache, a cpu going offline, or as the result of forcing an127 allocation from a certain node. It can be written to clear the128 current count.129 Available when CONFIG_SLUB_STATS is enabled.130 131What: /sys/kernel/slab/<cache>/ctor132Date: May 2007133KernelVersion: 2.6.22134Contact: Pekka Enberg <penberg@cs.helsinki.fi>,135 Christoph Lameter <cl@linux-foundation.org>136Description:137 The ctor file is read-only and specifies the cache's object138 constructor function, which is invoked for each object when a139 new slab is allocated.140 141What: /sys/kernel/slab/<cache>/deactivate_empty142Date: February 2008143KernelVersion: 2.6.25144Contact: Pekka Enberg <penberg@cs.helsinki.fi>,145 Christoph Lameter <cl@linux-foundation.org>146Description:147 The deactivate_empty file shows how many times an empty cpu slab148 was deactivated. It can be written to clear the current count.149 Available when CONFIG_SLUB_STATS is enabled.150 151What: /sys/kernel/slab/<cache>/deactivate_full152Date: February 2008153KernelVersion: 2.6.25154Contact: Pekka Enberg <penberg@cs.helsinki.fi>,155 Christoph Lameter <cl@linux-foundation.org>156Description:157 The deactivate_full file shows how many times a full cpu slab158 was deactivated. It can be written to clear the current count.159 Available when CONFIG_SLUB_STATS is enabled.160 161What: /sys/kernel/slab/<cache>/deactivate_remote_frees162Date: February 2008163KernelVersion: 2.6.25164Contact: Pekka Enberg <penberg@cs.helsinki.fi>,165 Christoph Lameter <cl@linux-foundation.org>166Description:167 The deactivate_remote_frees file shows how many times a cpu slab168 has been deactivated and contained free objects that were freed169 remotely. It can be written to clear the current count.170 Available when CONFIG_SLUB_STATS is enabled.171 172What: /sys/kernel/slab/<cache>/deactivate_to_head173Date: February 2008174KernelVersion: 2.6.25175Contact: Pekka Enberg <penberg@cs.helsinki.fi>,176 Christoph Lameter <cl@linux-foundation.org>177Description:178 The deactivate_to_head file shows how many times a partial cpu179 slab was deactivated and added to the head of its node's partial180 list. It can be written to clear the current count.181 Available when CONFIG_SLUB_STATS is enabled.182 183What: /sys/kernel/slab/<cache>/deactivate_to_tail184Date: February 2008185KernelVersion: 2.6.25186Contact: Pekka Enberg <penberg@cs.helsinki.fi>,187 Christoph Lameter <cl@linux-foundation.org>188Description:189 The deactivate_to_tail file shows how many times a partial cpu190 slab was deactivated and added to the tail of its node's partial191 list. It can be written to clear the current count.192 Available when CONFIG_SLUB_STATS is enabled.193 194What: /sys/kernel/slab/<cache>/destroy_by_rcu195Date: May 2007196KernelVersion: 2.6.22197Contact: Pekka Enberg <penberg@cs.helsinki.fi>,198 Christoph Lameter <cl@linux-foundation.org>199Description:200 The destroy_by_rcu file is read-only and specifies whether201 slabs (not objects) are freed by rcu.202 203What: /sys/kernel/slab/<cache>/free_add_partial204Date: February 2008205KernelVersion: 2.6.25206Contact: Pekka Enberg <penberg@cs.helsinki.fi>,207 Christoph Lameter <cl@linux-foundation.org>208Description:209 The free_add_partial file shows how many times an object has210 been freed in a full slab so that it had to added to its node's211 partial list. It can be written to clear the current count.212 Available when CONFIG_SLUB_STATS is enabled.213 214What: /sys/kernel/slab/<cache>/free_calls215Date: May 2007216KernelVersion: 2.6.22217Contact: Pekka Enberg <penberg@cs.helsinki.fi>,218 Christoph Lameter <cl@linux-foundation.org>219Description:220 The free_calls file is read-only and lists the locations of221 object frees if slab debugging is enabled (see222 Documentation/mm/slub.rst).223 224What: /sys/kernel/slab/<cache>/free_fastpath225Date: February 2008226KernelVersion: 2.6.25227Contact: Pekka Enberg <penberg@cs.helsinki.fi>,228 Christoph Lameter <cl@linux-foundation.org>229Description:230 The free_fastpath file shows how many objects have been freed231 using the fast path because it was an object from the cpu slab.232 It can be written to clear the current count.233 Available when CONFIG_SLUB_STATS is enabled.234 235What: /sys/kernel/slab/<cache>/free_frozen236Date: February 2008237KernelVersion: 2.6.25238Contact: Pekka Enberg <penberg@cs.helsinki.fi>,239 Christoph Lameter <cl@linux-foundation.org>240Description:241 The free_frozen file shows how many objects have been freed to242 a frozen slab (i.e. a remote cpu slab). It can be written to243 clear the current count.244 Available when CONFIG_SLUB_STATS is enabled.245 246What: /sys/kernel/slab/<cache>/free_remove_partial247Date: February 2008248KernelVersion: 2.6.25249Contact: Pekka Enberg <penberg@cs.helsinki.fi>,250 Christoph Lameter <cl@linux-foundation.org>251Description:252 The free_remove_partial file shows how many times an object has253 been freed to a now-empty slab so that it had to be removed from254 its node's partial list. It can be written to clear the current255 count.256 Available when CONFIG_SLUB_STATS is enabled.257 258What: /sys/kernel/slab/<cache>/free_slab259Date: February 2008260KernelVersion: 2.6.25261Contact: Pekka Enberg <penberg@cs.helsinki.fi>,262 Christoph Lameter <cl@linux-foundation.org>263Description:264 The free_slab file shows how many times an empty slab has been265 freed back to the page allocator. It can be written to clear266 the current count.267 Available when CONFIG_SLUB_STATS is enabled.268 269What: /sys/kernel/slab/<cache>/free_slowpath270Date: February 2008271KernelVersion: 2.6.25272Contact: Pekka Enberg <penberg@cs.helsinki.fi>,273 Christoph Lameter <cl@linux-foundation.org>274Description:275 The free_slowpath file shows how many objects have been freed276 using the slow path (i.e. to a full or partial slab). It can277 be written to clear the current count.278 Available when CONFIG_SLUB_STATS is enabled.279 280What: /sys/kernel/slab/<cache>/hwcache_align281Date: May 2007282KernelVersion: 2.6.22283Contact: Pekka Enberg <penberg@cs.helsinki.fi>,284 Christoph Lameter <cl@linux-foundation.org>285Description:286 The hwcache_align file is read-only and specifies whether287 objects are aligned on cachelines.288 289What: /sys/kernel/slab/<cache>/min_partial290Date: February 2009291KernelVersion: 2.6.30292Contact: Pekka Enberg <penberg@cs.helsinki.fi>,293 David Rientjes <rientjes@google.com>294Description:295 The min_partial file specifies how many empty slabs shall296 remain on a node's partial list to avoid the overhead of297 allocating new slabs. Such slabs may be reclaimed by utilizing298 the shrink file.299 300What: /sys/kernel/slab/<cache>/object_size301Date: May 2007302KernelVersion: 2.6.22303Contact: Pekka Enberg <penberg@cs.helsinki.fi>,304 Christoph Lameter <cl@linux-foundation.org>305Description:306 The object_size file is read-only and specifies the cache's307 object size.308 309What: /sys/kernel/slab/<cache>/objects310Date: May 2007311KernelVersion: 2.6.22312Contact: Pekka Enberg <penberg@cs.helsinki.fi>,313 Christoph Lameter <cl@linux-foundation.org>314Description:315 The objects file is read-only and displays how many objects are316 active and from which nodes they are from.317 318What: /sys/kernel/slab/<cache>/objects_partial319Date: April 2008320KernelVersion: 2.6.26321Contact: Pekka Enberg <penberg@cs.helsinki.fi>,322 Christoph Lameter <cl@linux-foundation.org>323Description:324 The objects_partial file is read-only and displays how many325 objects are on partial slabs and from which nodes they are326 from.327 328What: /sys/kernel/slab/<cache>/objs_per_slab329Date: May 2007330KernelVersion: 2.6.22331Contact: Pekka Enberg <penberg@cs.helsinki.fi>,332 Christoph Lameter <cl@linux-foundation.org>333Description:334 The file objs_per_slab is read-only and specifies how many335 objects may be allocated from a single slab of the order336 specified in /sys/kernel/slab/<cache>/order.337 338What: /sys/kernel/slab/<cache>/order339Date: May 2007340KernelVersion: 2.6.22341Contact: Pekka Enberg <penberg@cs.helsinki.fi>,342 Christoph Lameter <cl@linux-foundation.org>343Description:344 The order file specifies the page order at which new slabs are345 allocated. It is writable and can be changed to increase the346 number of objects per slab. If a slab cannot be allocated347 because of fragmentation, SLUB will retry with the minimum order348 possible depending on its characteristics.349 350 When debug_guardpage_minorder=N (N > 0) parameter is specified351 (see Documentation/admin-guide/kernel-parameters.rst), the minimum possible352 order is used and this sysfs entry can not be used to change353 the order at run time.354 355What: /sys/kernel/slab/<cache>/order_fallback356Date: April 2008357KernelVersion: 2.6.26358Contact: Pekka Enberg <penberg@cs.helsinki.fi>,359 Christoph Lameter <cl@linux-foundation.org>360Description:361 The order_fallback file shows how many times an allocation of a362 new slab has not been possible at the cache's order and instead363 fallen back to its minimum possible order. It can be written to364 clear the current count.365 366 Available when CONFIG_SLUB_STATS is enabled.367 368What: /sys/kernel/slab/<cache>/partial369Date: May 2007370KernelVersion: 2.6.22371Contact: Pekka Enberg <penberg@cs.helsinki.fi>,372 Christoph Lameter <cl@linux-foundation.org>373Description:374 The partial file is read-only and displays how long many375 partial slabs there are and how long each node's list is.376 377What: /sys/kernel/slab/<cache>/poison378Date: May 2007379KernelVersion: 2.6.22380Contact: Pekka Enberg <penberg@cs.helsinki.fi>,381 Christoph Lameter <cl@linux-foundation.org>382Description:383 The poison file specifies whether objects should be poisoned384 when a new slab is allocated.385 386What: /sys/kernel/slab/<cache>/reclaim_account387Date: May 2007388KernelVersion: 2.6.22389Contact: Pekka Enberg <penberg@cs.helsinki.fi>,390 Christoph Lameter <cl@linux-foundation.org>391Description:392 The reclaim_account file specifies whether the cache's objects393 are reclaimable (and grouped by their mobility).394 395What: /sys/kernel/slab/<cache>/red_zone396Date: May 2007397KernelVersion: 2.6.22398Contact: Pekka Enberg <penberg@cs.helsinki.fi>,399 Christoph Lameter <cl@linux-foundation.org>400Description:401 The red_zone file specifies whether the cache's objects are red402 zoned.403 404What: /sys/kernel/slab/<cache>/remote_node_defrag_ratio405Date: January 2008406KernelVersion: 2.6.25407Contact: Pekka Enberg <penberg@cs.helsinki.fi>,408 Christoph Lameter <cl@linux-foundation.org>409Description:410 The file remote_node_defrag_ratio specifies the percentage of411 times SLUB will attempt to refill the cpu slab with a partial412 slab from a remote node as opposed to allocating a new slab on413 the local node. This reduces the amount of wasted memory over414 the entire system but can be expensive.415 416 Available when CONFIG_NUMA is enabled.417 418What: /sys/kernel/slab/<cache>/sanity_checks419Date: May 2007420KernelVersion: 2.6.22421Contact: Pekka Enberg <penberg@cs.helsinki.fi>,422 Christoph Lameter <cl@linux-foundation.org>423Description:424 The sanity_checks file specifies whether expensive checks425 should be performed on free and, at minimum, enables double free426 checks. Caches that enable sanity_checks cannot be merged with427 caches that do not.428 429What: /sys/kernel/slab/<cache>/shrink430Date: May 2007431KernelVersion: 2.6.22432Contact: Pekka Enberg <penberg@cs.helsinki.fi>,433 Christoph Lameter <cl@linux-foundation.org>434Description:435 The shrink file is used to reclaim unused slab cache436 memory from a cache. Empty per-cpu or partial slabs437 are freed and the partial list is sorted so the slabs438 with the fewest available objects are used first.439 It only accepts a value of "1" on write for shrinking440 the cache. Other input values are considered invalid.441 Shrinking slab caches might be expensive and can442 adversely impact other running applications. So it443 should be used with care.444 445What: /sys/kernel/slab/<cache>/slab_size446Date: May 2007447KernelVersion: 2.6.22448Contact: Pekka Enberg <penberg@cs.helsinki.fi>,449 Christoph Lameter <cl@linux-foundation.org>450Description:451 The slab_size file is read-only and specifies the object size452 with metadata (debugging information and alignment) in bytes.453 454What: /sys/kernel/slab/<cache>/slabs455Date: May 2007456KernelVersion: 2.6.22457Contact: Pekka Enberg <penberg@cs.helsinki.fi>,458 Christoph Lameter <cl@linux-foundation.org>459Description:460 The slabs file is read-only and displays how long many slabs461 there are (both cpu and partial) and from which nodes they are462 from.463 464What: /sys/kernel/slab/<cache>/store_user465Date: May 2007466KernelVersion: 2.6.22467Contact: Pekka Enberg <penberg@cs.helsinki.fi>,468 Christoph Lameter <cl@linux-foundation.org>469Description:470 The store_user file specifies whether the location of471 allocation or free should be tracked for a cache.472 473What: /sys/kernel/slab/<cache>/total_objects474Date: April 2008475KernelVersion: 2.6.26476Contact: Pekka Enberg <penberg@cs.helsinki.fi>,477 Christoph Lameter <cl@linux-foundation.org>478Description:479 The total_objects file is read-only and displays how many total480 objects a cache has and from which nodes they are from.481 482What: /sys/kernel/slab/<cache>/trace483Date: May 2007484KernelVersion: 2.6.22485Contact: Pekka Enberg <penberg@cs.helsinki.fi>,486 Christoph Lameter <cl@linux-foundation.org>487Description:488 The trace file specifies whether object allocations and frees489 should be traced.490 491What: /sys/kernel/slab/<cache>/validate492Date: May 2007493KernelVersion: 2.6.22494Contact: Pekka Enberg <penberg@cs.helsinki.fi>,495 Christoph Lameter <cl@linux-foundation.org>496Description:497 Writing to the validate file causes SLUB to traverse all of its498 cache's objects and check the validity of metadata.499 500What: /sys/kernel/slab/<cache>/usersize501Date: Jun 2017502Contact: David Windsor <dave@nullcore.net>503Description:504 The usersize file is read-only and contains the usercopy505 region size.506 507What: /sys/kernel/slab/<cache>/slabs_cpu_partial508Date: Aug 2011509Contact: Christoph Lameter <cl@linux.com>510Description:511 This read-only file shows the number of partialli allocated512 frozen slabs.513 514What: /sys/kernel/slab/<cache>/cpu_partial515Date: Aug 2011516Contact: Christoph Lameter <cl@linux.com>517Description:518 This read-only file shows the number of per cpu partial519 pages to keep around.520