blob: d742c6cfdffbe9a58275dded99d8d9a161081b6b [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001What: /sys/kernel/slab
2Date: May 2007
3KernelVersion: 2.6.22
4Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
5 Christoph Lameter <cl@linux-foundation.org>
6Description:
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).
11Users: kernel memory tuning tools
12
13What: /sys/kernel/slab/cache/aliases
14Date: May 2007
15KernelVersion: 2.6.22
16Contact: 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 caches
20 have merged into this cache.
21
22What: /sys/kernel/slab/cache/align
23Date: May 2007
24KernelVersion: 2.6.22
25Contact: 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 object
29 alignment in bytes.
30
31What: /sys/kernel/slab/cache/alloc_calls
32Date: May 2007
33KernelVersion: 2.6.22
34Contact: 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 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.rst).
41
42What: /sys/kernel/slab/cache/alloc_fastpath
43Date: February 2008
44KernelVersion: 2.6.25
45Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
46 Christoph Lameter <cl@linux-foundation.org>
47Description:
48 The alloc_fastpath file shows how many objects have been
49 allocated using the fast path. It can be written to clear the
50 current count.
51 Available when CONFIG_SLUB_STATS is enabled.
52
53What: /sys/kernel/slab/cache/alloc_from_partial
54Date: February 2008
55KernelVersion: 2.6.25
56Contact: 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 has
60 been full and it has been refilled by using a slab from the list
61 of partially used slabs. It can be written to clear the current
62 count.
63 Available when CONFIG_SLUB_STATS is enabled.
64
65What: /sys/kernel/slab/cache/alloc_refill
66Date: February 2008
67KernelVersion: 2.6.25
68Contact: 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 freelist
72 was empty but there were objects available as the result of
73 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_slab
77Date: February 2008
78KernelVersion: 2.6.25
79Contact: 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 to
83 be allocated from the page allocator. It can be written to
84 clear the current count.
85 Available when CONFIG_SLUB_STATS is enabled.
86
87What: /sys/kernel/slab/cache/alloc_slowpath
88Date: February 2008
89KernelVersion: 2.6.25
90Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
91 Christoph Lameter <cl@linux-foundation.org>
92Description:
93 The alloc_slowpath file shows how many objects have been
94 allocated using the slow path because of a refill or
95 allocation from a partial or new slab. It can be written to
96 clear the current count.
97 Available when CONFIG_SLUB_STATS is enabled.
98
99What: /sys/kernel/slab/cache/cache_dma
100Date: May 2007
101KernelVersion: 2.6.22
102Contact: 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 objects
106 are from ZONE_DMA.
107 Available when CONFIG_ZONE_DMA is enabled.
108
109What: /sys/kernel/slab/cache/cache_dma32
110Date: December 2018
111KernelVersion: 4.21
112Contact: Nicolas Boichat <drinkcat@chromium.org>
113Description:
114 The cache_dma32 file is read-only and specifies whether objects
115 are from ZONE_DMA32.
116 Available when CONFIG_ZONE_DMA32 is enabled.
117
118What: /sys/kernel/slab/cache/cpu_slabs
119Date: May 2007
120KernelVersion: 2.6.22
121Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
122 Christoph Lameter <cl@linux-foundation.org>
123Description:
124 The cpu_slabs file is read-only and displays how many cpu slabs
125 are active and their NUMA locality.
126
127What: /sys/kernel/slab/cache/cpuslab_flush
128Date: April 2009
129KernelVersion: 2.6.31
130Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
131 Christoph Lameter <cl@linux-foundation.org>
132Description:
133 The file cpuslab_flush shows how many times a cache's cpu slabs
134 have been flushed as the result of destroying or shrinking a
135 cache, a cpu going offline, or as the result of forcing an
136 allocation from a certain node. It can be written to clear the
137 current count.
138 Available when CONFIG_SLUB_STATS is enabled.
139
140What: /sys/kernel/slab/cache/ctor
141Date: May 2007
142KernelVersion: 2.6.22
143Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
144 Christoph Lameter <cl@linux-foundation.org>
145Description:
146 The ctor file is read-only and specifies the cache's object
147 constructor function, which is invoked for each object when a
148 new slab is allocated.
149
150What: /sys/kernel/slab/cache/deactivate_empty
151Date: February 2008
152KernelVersion: 2.6.25
153Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
154 Christoph Lameter <cl@linux-foundation.org>
155Description:
156 The deactivate_empty file shows how many times an empty cpu slab
157 was deactivated. It can be written to clear the current count.
158 Available when CONFIG_SLUB_STATS is enabled.
159
160What: /sys/kernel/slab/cache/deactivate_full
161Date: February 2008
162KernelVersion: 2.6.25
163Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
164 Christoph Lameter <cl@linux-foundation.org>
165Description:
166 The deactivate_full file shows how many times a full cpu slab
167 was deactivated. It can be written to clear the current count.
168 Available when CONFIG_SLUB_STATS is enabled.
169
170What: /sys/kernel/slab/cache/deactivate_remote_frees
171Date: February 2008
172KernelVersion: 2.6.25
173Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
174 Christoph Lameter <cl@linux-foundation.org>
175Description:
176 The deactivate_remote_frees file shows how many times a cpu slab
177 has been deactivated and contained free objects that were freed
178 remotely. It can be written to clear the current count.
179 Available when CONFIG_SLUB_STATS is enabled.
180
181What: /sys/kernel/slab/cache/deactivate_to_head
182Date: February 2008
183KernelVersion: 2.6.25
184Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
185 Christoph Lameter <cl@linux-foundation.org>
186Description:
187 The deactivate_to_head file shows how many times a partial cpu
188 slab was deactivated and added to the head of its node's partial
189 list. It can be written to clear the current count.
190 Available when CONFIG_SLUB_STATS is enabled.
191
192What: /sys/kernel/slab/cache/deactivate_to_tail
193Date: February 2008
194KernelVersion: 2.6.25
195Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
196 Christoph Lameter <cl@linux-foundation.org>
197Description:
198 The deactivate_to_tail file shows how many times a partial cpu
199 slab was deactivated and added to the tail of its node's partial
200 list. It can be written to clear the current count.
201 Available when CONFIG_SLUB_STATS is enabled.
202
203What: /sys/kernel/slab/cache/destroy_by_rcu
204Date: May 2007
205KernelVersion: 2.6.22
206Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
207 Christoph Lameter <cl@linux-foundation.org>
208Description:
209 The destroy_by_rcu file is read-only and specifies whether
210 slabs (not objects) are freed by rcu.
211
212What: /sys/kernel/slab/cache/free_add_partial
213Date: February 2008
214KernelVersion: 2.6.25
215Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
216 Christoph Lameter <cl@linux-foundation.org>
217Description:
218 The free_add_partial file shows how many times an object has
219 been freed in a full slab so that it had to added to its node's
220 partial list. It can be written to clear the current count.
221 Available when CONFIG_SLUB_STATS is enabled.
222
223What: /sys/kernel/slab/cache/free_calls
224Date: May 2007
225KernelVersion: 2.6.22
226Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
227 Christoph Lameter <cl@linux-foundation.org>
228Description:
229 The free_calls file is read-only and lists the locations of
230 object frees if slab debugging is enabled (see
231 Documentation/vm/slub.rst).
232
233What: /sys/kernel/slab/cache/free_fastpath
234Date: February 2008
235KernelVersion: 2.6.25
236Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
237 Christoph Lameter <cl@linux-foundation.org>
238Description:
239 The free_fastpath file shows how many objects have been freed
240 using the fast path because it was an object from the cpu slab.
241 It can be written to clear the current count.
242 Available when CONFIG_SLUB_STATS is enabled.
243
244What: /sys/kernel/slab/cache/free_frozen
245Date: February 2008
246KernelVersion: 2.6.25
247Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
248 Christoph Lameter <cl@linux-foundation.org>
249Description:
250 The free_frozen file shows how many objects have been freed to
251 a frozen slab (i.e. a remote cpu slab). It can be written to
252 clear the current count.
253 Available when CONFIG_SLUB_STATS is enabled.
254
255What: /sys/kernel/slab/cache/free_remove_partial
256Date: February 2008
257KernelVersion: 2.6.25
258Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
259 Christoph Lameter <cl@linux-foundation.org>
260Description:
261 The free_remove_partial file shows how many times an object has
262 been freed to a now-empty slab so that it had to be removed from
263 its node's partial list. It can be written to clear the current
264 count.
265 Available when CONFIG_SLUB_STATS is enabled.
266
267What: /sys/kernel/slab/cache/free_slab
268Date: February 2008
269KernelVersion: 2.6.25
270Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
271 Christoph Lameter <cl@linux-foundation.org>
272Description:
273 The free_slab file shows how many times an empty slab has been
274 freed back to the page allocator. It can be written to clear
275 the current count.
276 Available when CONFIG_SLUB_STATS is enabled.
277
278What: /sys/kernel/slab/cache/free_slowpath
279Date: February 2008
280KernelVersion: 2.6.25
281Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
282 Christoph Lameter <cl@linux-foundation.org>
283Description:
284 The free_slowpath file shows how many objects have been freed
285 using the slow path (i.e. to a full or partial slab). It can
286 be written to clear the current count.
287 Available when CONFIG_SLUB_STATS is enabled.
288
289What: /sys/kernel/slab/cache/hwcache_align
290Date: May 2007
291KernelVersion: 2.6.22
292Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
293 Christoph Lameter <cl@linux-foundation.org>
294Description:
295 The hwcache_align file is read-only and specifies whether
296 objects are aligned on cachelines.
297
298What: /sys/kernel/slab/cache/min_partial
299Date: February 2009
300KernelVersion: 2.6.30
301Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
302 David Rientjes <rientjes@google.com>
303Description:
304 The min_partial file specifies how many empty slabs shall
305 remain on a node's partial list to avoid the overhead of
306 allocating new slabs. Such slabs may be reclaimed by utilizing
307 the shrink file.
308
309What: /sys/kernel/slab/cache/object_size
310Date: May 2007
311KernelVersion: 2.6.22
312Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
313 Christoph Lameter <cl@linux-foundation.org>
314Description:
315 The object_size file is read-only and specifies the cache's
316 object size.
317
318What: /sys/kernel/slab/cache/objects
319Date: May 2007
320KernelVersion: 2.6.22
321Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
322 Christoph Lameter <cl@linux-foundation.org>
323Description:
324 The objects file is read-only and displays how many objects are
325 active and from which nodes they are from.
326
327What: /sys/kernel/slab/cache/objects_partial
328Date: April 2008
329KernelVersion: 2.6.26
330Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
331 Christoph Lameter <cl@linux-foundation.org>
332Description:
333 The objects_partial file is read-only and displays how many
334 objects are on partial slabs and from which nodes they are
335 from.
336
337What: /sys/kernel/slab/cache/objs_per_slab
338Date: May 2007
339KernelVersion: 2.6.22
340Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
341 Christoph Lameter <cl@linux-foundation.org>
342Description:
343 The file objs_per_slab is read-only and specifies how many
344 objects may be allocated from a single slab of the order
345 specified in /sys/kernel/slab/cache/order.
346
347What: /sys/kernel/slab/cache/order
348Date: May 2007
349KernelVersion: 2.6.22
350Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
351 Christoph Lameter <cl@linux-foundation.org>
352Description:
353 The order file specifies the page order at which new slabs are
354 allocated. It is writable and can be changed to increase the
355 number of objects per slab. If a slab cannot be allocated
356 because of fragmentation, SLUB will retry with the minimum order
357 possible depending on its characteristics.
358 When debug_guardpage_minorder=N (N > 0) parameter is specified
359 (see Documentation/admin-guide/kernel-parameters.rst), the minimum possible
360 order is used and this sysfs entry can not be used to change
361 the order at run time.
362
363What: /sys/kernel/slab/cache/order_fallback
364Date: April 2008
365KernelVersion: 2.6.26
366Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
367 Christoph Lameter <cl@linux-foundation.org>
368Description:
369 The order_fallback file shows how many times an allocation of a
370 new slab has not been possible at the cache's order and instead
371 fallen back to its minimum possible order. It can be written to
372 clear the current count.
373 Available when CONFIG_SLUB_STATS is enabled.
374
375What: /sys/kernel/slab/cache/partial
376Date: May 2007
377KernelVersion: 2.6.22
378Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
379 Christoph Lameter <cl@linux-foundation.org>
380Description:
381 The partial file is read-only and displays how long many
382 partial slabs there are and how long each node's list is.
383
384What: /sys/kernel/slab/cache/poison
385Date: May 2007
386KernelVersion: 2.6.22
387Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
388 Christoph Lameter <cl@linux-foundation.org>
389Description:
390 The poison file specifies whether objects should be poisoned
391 when a new slab is allocated.
392
393What: /sys/kernel/slab/cache/reclaim_account
394Date: May 2007
395KernelVersion: 2.6.22
396Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
397 Christoph Lameter <cl@linux-foundation.org>
398Description:
399 The reclaim_account file specifies whether the cache's objects
400 are reclaimable (and grouped by their mobility).
401
402What: /sys/kernel/slab/cache/red_zone
403Date: May 2007
404KernelVersion: 2.6.22
405Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
406 Christoph Lameter <cl@linux-foundation.org>
407Description:
408 The red_zone file specifies whether the cache's objects are red
409 zoned.
410
411What: /sys/kernel/slab/cache/remote_node_defrag_ratio
412Date: January 2008
413KernelVersion: 2.6.25
414Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
415 Christoph Lameter <cl@linux-foundation.org>
416Description:
417 The file remote_node_defrag_ratio specifies the percentage of
418 times SLUB will attempt to refill the cpu slab with a partial
419 slab from a remote node as opposed to allocating a new slab on
420 the local node. This reduces the amount of wasted memory over
421 the entire system but can be expensive.
422 Available when CONFIG_NUMA is enabled.
423
424What: /sys/kernel/slab/cache/sanity_checks
425Date: May 2007
426KernelVersion: 2.6.22
427Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
428 Christoph Lameter <cl@linux-foundation.org>
429Description:
430 The sanity_checks file specifies whether expensive checks
431 should be performed on free and, at minimum, enables double free
432 checks. Caches that enable sanity_checks cannot be merged with
433 caches that do not.
434
435What: /sys/kernel/slab/cache/shrink
436Date: May 2007
437KernelVersion: 2.6.22
438Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
439 Christoph Lameter <cl@linux-foundation.org>
440Description:
441 The shrink file is written when memory should be reclaimed from
442 a cache. Empty partial slabs are freed and the partial list is
443 sorted so the slabs with the fewest available objects are used
444 first.
445
446What: /sys/kernel/slab/cache/slab_size
447Date: May 2007
448KernelVersion: 2.6.22
449Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
450 Christoph Lameter <cl@linux-foundation.org>
451Description:
452 The slab_size file is read-only and specifies the object size
453 with metadata (debugging information and alignment) in bytes.
454
455What: /sys/kernel/slab/cache/slabs
456Date: May 2007
457KernelVersion: 2.6.22
458Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
459 Christoph Lameter <cl@linux-foundation.org>
460Description:
461 The slabs file is read-only and displays how long many slabs
462 there are (both cpu and partial) and from which nodes they are
463 from.
464
465What: /sys/kernel/slab/cache/store_user
466Date: May 2007
467KernelVersion: 2.6.22
468Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
469 Christoph Lameter <cl@linux-foundation.org>
470Description:
471 The store_user file specifies whether the location of
472 allocation or free should be tracked for a cache.
473
474What: /sys/kernel/slab/cache/total_objects
475Date: April 2008
476KernelVersion: 2.6.26
477Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
478 Christoph Lameter <cl@linux-foundation.org>
479Description:
480 The total_objects file is read-only and displays how many total
481 objects a cache has and from which nodes they are from.
482
483What: /sys/kernel/slab/cache/trace
484Date: May 2007
485KernelVersion: 2.6.22
486Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
487 Christoph Lameter <cl@linux-foundation.org>
488Description:
489 The trace file specifies whether object allocations and frees
490 should be traced.
491
492What: /sys/kernel/slab/cache/validate
493Date: May 2007
494KernelVersion: 2.6.22
495Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
496 Christoph Lameter <cl@linux-foundation.org>
497Description:
498 Writing to the validate file causes SLUB to traverse all of its
499 cache's objects and check the validity of metadata.