4 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
5 Christoph Lameter <cl@linux-foundation.org>
7 The /sys/kernel/slab directory contains a snapshot of the
8 internal state of the SLUB allocator for each cache. Certain
9 files may be modified to change the behavior of the cache (and
10 any cache it aliases, if any).
11 Users: kernel memory tuning tools
13 What: /sys/kernel/slab/cache/aliases
16 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
17 Christoph Lameter <cl@linux-foundation.org>
19 The aliases file is read-only and specifies how many caches
20 have merged into this cache.
22 What: /sys/kernel/slab/cache/align
25 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
26 Christoph Lameter <cl@linux-foundation.org>
28 The align file is read-only and specifies the cache's object
31 What: /sys/kernel/slab/cache/alloc_calls
34 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
35 Christoph Lameter <cl@linux-foundation.org>
37 The alloc_calls file is read-only and lists the kernel code
38 locations from which allocations for this cache were performed.
39 The alloc_calls file only contains information if debugging is
40 enabled for that cache (see Documentation/vm/slub.txt).
42 What: /sys/kernel/slab/cache/alloc_fastpath
45 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
46 Christoph Lameter <cl@linux-foundation.org>
48 The alloc_fastpath file is read-only and specifies how many
49 objects have been allocated using the fast path.
50 Available when CONFIG_SLUB_STATS is enabled.
52 What: /sys/kernel/slab/cache/alloc_from_partial
55 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
56 Christoph Lameter <cl@linux-foundation.org>
58 The alloc_from_partial file is read-only and specifies how
59 many times a cpu slab has been full and it has been refilled
60 by using a slab from the list of partially used slabs.
61 Available when CONFIG_SLUB_STATS is enabled.
63 What: /sys/kernel/slab/cache/alloc_refill
66 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
67 Christoph Lameter <cl@linux-foundation.org>
69 The alloc_refill file is read-only and specifies how many
70 times the per-cpu freelist was empty but there were objects
71 available as the result of remote cpu frees.
72 Available when CONFIG_SLUB_STATS is enabled.
74 What: /sys/kernel/slab/cache/alloc_slab
77 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
78 Christoph Lameter <cl@linux-foundation.org>
80 The alloc_slab file is read-only and specifies how many times
81 a new slab had to be allocated from the page allocator.
82 Available when CONFIG_SLUB_STATS is enabled.
84 What: /sys/kernel/slab/cache/alloc_slowpath
87 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
88 Christoph Lameter <cl@linux-foundation.org>
90 The alloc_slowpath file is read-only and specifies how many
91 objects have been allocated using the slow path because of a
92 refill or allocation from a partial or new slab.
93 Available when CONFIG_SLUB_STATS is enabled.
95 What: /sys/kernel/slab/cache/cache_dma
98 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
99 Christoph Lameter <cl@linux-foundation.org>
101 The cache_dma file is read-only and specifies whether objects
103 Available when CONFIG_ZONE_DMA is enabled.
105 What: /sys/kernel/slab/cache/cpu_slabs
107 KernelVersion: 2.6.22
108 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
109 Christoph Lameter <cl@linux-foundation.org>
111 The cpu_slabs file is read-only and displays how many cpu slabs
112 are active and their NUMA locality.
114 What: /sys/kernel/slab/cache/cpuslab_flush
116 KernelVersion: 2.6.31
117 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
118 Christoph Lameter <cl@linux-foundation.org>
120 The file cpuslab_flush is read-only and specifies how many
121 times a cache's cpu slabs have been flushed as the result of
122 destroying or shrinking a cache, a cpu going offline, or as
123 the result of forcing an allocation from a certain node.
124 Available when CONFIG_SLUB_STATS is enabled.
126 What: /sys/kernel/slab/cache/ctor
128 KernelVersion: 2.6.22
129 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
130 Christoph Lameter <cl@linux-foundation.org>
132 The ctor file is read-only and specifies the cache's object
133 constructor function, which is invoked for each object when a
134 new slab is allocated.
136 What: /sys/kernel/slab/cache/deactivate_empty
138 KernelVersion: 2.6.25
139 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
140 Christoph Lameter <cl@linux-foundation.org>
142 The file deactivate_empty is read-only and specifies how many
143 times an empty cpu slab was deactivated.
144 Available when CONFIG_SLUB_STATS is enabled.
146 What: /sys/kernel/slab/cache/deactivate_full
148 KernelVersion: 2.6.25
149 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
150 Christoph Lameter <cl@linux-foundation.org>
152 The file deactivate_full is read-only and specifies how many
153 times a full cpu slab was deactivated.
154 Available when CONFIG_SLUB_STATS is enabled.
156 What: /sys/kernel/slab/cache/deactivate_remote_frees
158 KernelVersion: 2.6.25
159 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
160 Christoph Lameter <cl@linux-foundation.org>
162 The file deactivate_remote_frees is read-only and specifies how
163 many times a cpu slab has been deactivated and contained free
164 objects that were freed remotely.
165 Available when CONFIG_SLUB_STATS is enabled.
167 What: /sys/kernel/slab/cache/deactivate_to_head
169 KernelVersion: 2.6.25
170 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
171 Christoph Lameter <cl@linux-foundation.org>
173 The file deactivate_to_head is read-only and specifies how
174 many times a partial cpu slab was deactivated and added to the
175 head of its node's partial list.
176 Available when CONFIG_SLUB_STATS is enabled.
178 What: /sys/kernel/slab/cache/deactivate_to_tail
180 KernelVersion: 2.6.25
181 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
182 Christoph Lameter <cl@linux-foundation.org>
184 The file deactivate_to_tail is read-only and specifies how
185 many times a partial cpu slab was deactivated and added to the
186 tail of its node's partial list.
187 Available when CONFIG_SLUB_STATS is enabled.
189 What: /sys/kernel/slab/cache/destroy_by_rcu
191 KernelVersion: 2.6.22
192 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
193 Christoph Lameter <cl@linux-foundation.org>
195 The destroy_by_rcu file is read-only and specifies whether
196 slabs (not objects) are freed by rcu.
198 What: /sys/kernel/slab/cache/free_add_partial
200 KernelVersion: 2.6.25
201 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
202 Christoph Lameter <cl@linux-foundation.org>
204 The file free_add_partial is read-only and specifies how many
205 times an object has been freed in a full slab so that it had to
206 added to its node's partial list.
207 Available when CONFIG_SLUB_STATS is enabled.
209 What: /sys/kernel/slab/cache/free_calls
211 KernelVersion: 2.6.22
212 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
213 Christoph Lameter <cl@linux-foundation.org>
215 The free_calls file is read-only and lists the locations of
216 object frees if slab debugging is enabled (see
217 Documentation/vm/slub.txt).
219 What: /sys/kernel/slab/cache/free_fastpath
221 KernelVersion: 2.6.25
222 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
223 Christoph Lameter <cl@linux-foundation.org>
225 The free_fastpath file is read-only and specifies how many
226 objects have been freed using the fast path because it was an
227 object from the cpu slab.
228 Available when CONFIG_SLUB_STATS is enabled.
230 What: /sys/kernel/slab/cache/free_frozen
232 KernelVersion: 2.6.25
233 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
234 Christoph Lameter <cl@linux-foundation.org>
236 The free_frozen file is read-only and specifies how many
237 objects have been freed to a frozen slab (i.e. a remote cpu
239 Available when CONFIG_SLUB_STATS is enabled.
241 What: /sys/kernel/slab/cache/free_remove_partial
243 KernelVersion: 2.6.25
244 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
245 Christoph Lameter <cl@linux-foundation.org>
247 The file free_remove_partial is read-only and specifies how
248 many times an object has been freed to a now-empty slab so
249 that it had to be removed from its node's partial list.
250 Available when CONFIG_SLUB_STATS is enabled.
252 What: /sys/kernel/slab/cache/free_slab
254 KernelVersion: 2.6.25
255 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
256 Christoph Lameter <cl@linux-foundation.org>
258 The free_slab file is read-only and specifies how many times an
259 empty slab has been freed back to the page allocator.
260 Available when CONFIG_SLUB_STATS is enabled.
262 What: /sys/kernel/slab/cache/free_slowpath
264 KernelVersion: 2.6.25
265 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
266 Christoph Lameter <cl@linux-foundation.org>
268 The free_slowpath file is read-only and specifies how many
269 objects have been freed using the slow path (i.e. to a full or
271 Available when CONFIG_SLUB_STATS is enabled.
273 What: /sys/kernel/slab/cache/hwcache_align
275 KernelVersion: 2.6.22
276 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
277 Christoph Lameter <cl@linux-foundation.org>
279 The hwcache_align file is read-only and specifies whether
280 objects are aligned on cachelines.
282 What: /sys/kernel/slab/cache/min_partial
284 KernelVersion: 2.6.30
285 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
286 David Rientjes <rientjes@google.com>
288 The min_partial file specifies how many empty slabs shall
289 remain on a node's partial list to avoid the overhead of
290 allocating new slabs. Such slabs may be reclaimed by utilizing
293 What: /sys/kernel/slab/cache/object_size
295 KernelVersion: 2.6.22
296 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
297 Christoph Lameter <cl@linux-foundation.org>
299 The object_size file is read-only and specifies the cache's
302 What: /sys/kernel/slab/cache/objects
304 KernelVersion: 2.6.22
305 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
306 Christoph Lameter <cl@linux-foundation.org>
308 The objects file is read-only and displays how many objects are
309 active and from which nodes they are from.
311 What: /sys/kernel/slab/cache/objects_partial
313 KernelVersion: 2.6.26
314 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
315 Christoph Lameter <cl@linux-foundation.org>
317 The objects_partial file is read-only and displays how many
318 objects are on partial slabs and from which nodes they are
321 What: /sys/kernel/slab/cache/objs_per_slab
323 KernelVersion: 2.6.22
324 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
325 Christoph Lameter <cl@linux-foundation.org>
327 The file objs_per_slab is read-only and specifies how many
328 objects may be allocated from a single slab of the order
329 specified in /sys/kernel/slab/cache/order.
331 What: /sys/kernel/slab/cache/order
333 KernelVersion: 2.6.22
334 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
335 Christoph Lameter <cl@linux-foundation.org>
337 The order file specifies the page order at which new slabs are
338 allocated. It is writable and can be changed to increase the
339 number of objects per slab. If a slab cannot be allocated
340 because of fragmentation, SLUB will retry with the minimum order
341 possible depending on its characteristics.
343 What: /sys/kernel/slab/cache/order_fallback
345 KernelVersion: 2.6.26
346 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
347 Christoph Lameter <cl@linux-foundation.org>
349 The file order_fallback is read-only and specifies how many
350 times an allocation of a new slab has not been possible at the
351 cache's order and instead fallen back to its minimum possible
353 Available when CONFIG_SLUB_STATS is enabled.
355 What: /sys/kernel/slab/cache/partial
357 KernelVersion: 2.6.22
358 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
359 Christoph Lameter <cl@linux-foundation.org>
361 The partial file is read-only and displays how long many
362 partial slabs there are and how long each node's list is.
364 What: /sys/kernel/slab/cache/poison
366 KernelVersion: 2.6.22
367 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
368 Christoph Lameter <cl@linux-foundation.org>
370 The poison file specifies whether objects should be poisoned
371 when a new slab is allocated.
373 What: /sys/kernel/slab/cache/reclaim_account
375 KernelVersion: 2.6.22
376 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
377 Christoph Lameter <cl@linux-foundation.org>
379 The reclaim_account file specifies whether the cache's objects
380 are reclaimable (and grouped by their mobility).
382 What: /sys/kernel/slab/cache/red_zone
384 KernelVersion: 2.6.22
385 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
386 Christoph Lameter <cl@linux-foundation.org>
388 The red_zone file specifies whether the cache's objects are red
391 What: /sys/kernel/slab/cache/remote_node_defrag_ratio
393 KernelVersion: 2.6.25
394 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
395 Christoph Lameter <cl@linux-foundation.org>
397 The file remote_node_defrag_ratio specifies the percentage of
398 times SLUB will attempt to refill the cpu slab with a partial
399 slab from a remote node as opposed to allocating a new slab on
400 the local node. This reduces the amount of wasted memory over
401 the entire system but can be expensive.
402 Available when CONFIG_NUMA is enabled.
404 What: /sys/kernel/slab/cache/sanity_checks
406 KernelVersion: 2.6.22
407 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
408 Christoph Lameter <cl@linux-foundation.org>
410 The sanity_checks file specifies whether expensive checks
411 should be performed on free and, at minimum, enables double free
412 checks. Caches that enable sanity_checks cannot be merged with
415 What: /sys/kernel/slab/cache/shrink
417 KernelVersion: 2.6.22
418 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
419 Christoph Lameter <cl@linux-foundation.org>
421 The shrink file is written when memory should be reclaimed from
422 a cache. Empty partial slabs are freed and the partial list is
423 sorted so the slabs with the fewest available objects are used
426 What: /sys/kernel/slab/cache/slab_size
428 KernelVersion: 2.6.22
429 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
430 Christoph Lameter <cl@linux-foundation.org>
432 The slab_size file is read-only and specifies the object size
433 with metadata (debugging information and alignment) in bytes.
435 What: /sys/kernel/slab/cache/slabs
437 KernelVersion: 2.6.22
438 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
439 Christoph Lameter <cl@linux-foundation.org>
441 The slabs file is read-only and displays how long many slabs
442 there are (both cpu and partial) and from which nodes they are
445 What: /sys/kernel/slab/cache/store_user
447 KernelVersion: 2.6.22
448 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
449 Christoph Lameter <cl@linux-foundation.org>
451 The store_user file specifies whether the location of
452 allocation or free should be tracked for a cache.
454 What: /sys/kernel/slab/cache/total_objects
456 KernelVersion: 2.6.26
457 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
458 Christoph Lameter <cl@linux-foundation.org>
460 The total_objects file is read-only and displays how many total
461 objects a cache has and from which nodes they are from.
463 What: /sys/kernel/slab/cache/trace
465 KernelVersion: 2.6.22
466 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
467 Christoph Lameter <cl@linux-foundation.org>
469 The trace file specifies whether object allocations and frees
472 What: /sys/kernel/slab/cache/validate
474 KernelVersion: 2.6.22
475 Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
476 Christoph Lameter <cl@linux-foundation.org>
478 Writing to the validate file causes SLUB to traverse all of its
479 cache's objects and check the validity of metadata.