xref: /linux/Documentation/ABI/testing/sysfs-kernel-slab (revision e8d780dcd957d80725ad5dd00bab53b856429bc0)
1What:		/sys/kernel/slab
2Date:		May 2007
3KernelVersion:	2.6.22
4Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
5		Christoph Lameter <cl@gentwo.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@gentwo.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@gentwo.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@gentwo.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
41		Documentation/admin-guide/mm/slab.rst).
42
43What:		/sys/kernel/slab/<cache>/alloc_fastpath
44Date:		February 2008
45KernelVersion:	2.6.25
46Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
47		Christoph Lameter <cl@gentwo.org>
48Description:
49		The alloc_fastpath file shows how many objects have been
50		allocated using the fast path.  It can be written to clear the
51		current count.
52		Available when CONFIG_SLUB_STATS is enabled.
53
54What:		/sys/kernel/slab/<cache>/alloc_from_partial
55Date:		February 2008
56KernelVersion:	2.6.25
57Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
58		Christoph Lameter <cl@gentwo.org>
59Description:
60		The alloc_from_partial file shows how many times a cpu slab has
61		been full and it has been refilled by using a slab from the list
62		of partially used slabs.  It can be written to clear the current
63		count.
64		Available when CONFIG_SLUB_STATS is enabled.
65
66What:		/sys/kernel/slab/<cache>/alloc_refill
67Date:		February 2008
68KernelVersion:	2.6.25
69Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
70		Christoph Lameter <cl@gentwo.org>
71Description:
72		The alloc_refill file shows how many times the per-cpu freelist
73		was empty but there were objects available as the result of
74		remote cpu frees.  It can be written to clear the current count.
75		Available when CONFIG_SLUB_STATS is enabled.
76
77What:		/sys/kernel/slab/<cache>/alloc_slab
78Date:		February 2008
79KernelVersion:	2.6.25
80Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
81		Christoph Lameter <cl@gentwo.org>
82Description:
83		The alloc_slab file is shows how many times a new slab had to
84		be allocated from the page allocator.  It can be written to
85		clear the current count.
86		Available when CONFIG_SLUB_STATS is enabled.
87
88What:		/sys/kernel/slab/<cache>/alloc_slowpath
89Date:		February 2008
90KernelVersion:	2.6.25
91Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
92		Christoph Lameter <cl@gentwo.org>
93Description:
94		The alloc_slowpath file shows how many objects have been
95		allocated using the slow path because of a refill or
96		allocation from a partial or new slab.  It can be written to
97		clear the current count.
98		Available when CONFIG_SLUB_STATS is enabled.
99
100What:		/sys/kernel/slab/<cache>/cache_dma
101Date:		May 2007
102KernelVersion:	2.6.22
103Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
104		Christoph Lameter <cl@gentwo.org>
105Description:
106		The cache_dma file is read-only and specifies whether objects
107		are from ZONE_DMA.
108		Available when CONFIG_ZONE_DMA is enabled.
109
110What:		/sys/kernel/slab/<cache>/cpu_slabs
111Date:		May 2007
112KernelVersion:	2.6.22
113Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
114		Christoph Lameter <cl@gentwo.org>
115Description:
116		The cpu_slabs file is read-only and displays how many cpu slabs
117		are active and their NUMA locality.
118
119What:		/sys/kernel/slab/<cache>/cpuslab_flush
120Date:		April 2009
121KernelVersion:	2.6.31
122Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
123		Christoph Lameter <cl@gentwo.org>
124Description:
125		The file cpuslab_flush shows how many times a cache's cpu slabs
126		have been flushed as the result of destroying or shrinking a
127		cache, a cpu going offline, or as the result of forcing an
128		allocation from a certain node.  It can be written to clear the
129		current count.
130		Available when CONFIG_SLUB_STATS is enabled.
131
132What:		/sys/kernel/slab/<cache>/ctor
133Date:		May 2007
134KernelVersion:	2.6.22
135Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
136		Christoph Lameter <cl@gentwo.org>
137Description:
138		The ctor file is read-only and specifies the cache's object
139		constructor function, which is invoked for each object when a
140		new slab is allocated.
141
142What:		/sys/kernel/slab/<cache>/deactivate_empty
143Date:		February 2008
144KernelVersion:	2.6.25
145Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
146		Christoph Lameter <cl@gentwo.org>
147Description:
148		The deactivate_empty file shows how many times an empty cpu slab
149		was deactivated.  It can be written to clear the current count.
150		Available when CONFIG_SLUB_STATS is enabled.
151
152What:		/sys/kernel/slab/<cache>/deactivate_full
153Date:		February 2008
154KernelVersion:	2.6.25
155Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
156		Christoph Lameter <cl@gentwo.org>
157Description:
158		The deactivate_full file shows how many times a full cpu slab
159		was deactivated.  It can be written to clear the current count.
160		Available when CONFIG_SLUB_STATS is enabled.
161
162What:		/sys/kernel/slab/<cache>/deactivate_remote_frees
163Date:		February 2008
164KernelVersion:	2.6.25
165Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
166		Christoph Lameter <cl@gentwo.org>
167Description:
168		The deactivate_remote_frees file shows how many times a cpu slab
169		has been deactivated and contained free objects that were freed
170		remotely.  It can be written to clear the current count.
171		Available when CONFIG_SLUB_STATS is enabled.
172
173What:		/sys/kernel/slab/<cache>/deactivate_to_head
174Date:		February 2008
175KernelVersion:	2.6.25
176Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
177		Christoph Lameter <cl@gentwo.org>
178Description:
179		The deactivate_to_head file shows how many times a partial cpu
180		slab was deactivated and added to the head of its node's partial
181		list.  It can be written to clear the current count.
182		Available when CONFIG_SLUB_STATS is enabled.
183
184What:		/sys/kernel/slab/<cache>/deactivate_to_tail
185Date:		February 2008
186KernelVersion:	2.6.25
187Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
188		Christoph Lameter <cl@gentwo.org>
189Description:
190		The deactivate_to_tail file shows how many times a partial cpu
191		slab was deactivated and added to the tail of its node's partial
192		list.  It can be written to clear the current count.
193		Available when CONFIG_SLUB_STATS is enabled.
194
195What:		/sys/kernel/slab/<cache>/destroy_by_rcu
196Date:		May 2007
197KernelVersion:	2.6.22
198Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
199		Christoph Lameter <cl@gentwo.org>
200Description:
201		The destroy_by_rcu file is read-only and specifies whether
202		slabs (not objects) are freed by rcu.
203
204What:		/sys/kernel/slab/<cache>/free_add_partial
205Date:		February 2008
206KernelVersion:	2.6.25
207Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
208		Christoph Lameter <cl@gentwo.org>
209Description:
210		The free_add_partial file shows how many times an object has
211		been freed in a full slab so that it had to added to its node's
212		partial list.  It can be written to clear the current count.
213		Available when CONFIG_SLUB_STATS is enabled.
214
215What:		/sys/kernel/slab/<cache>/free_calls
216Date:		May 2007
217KernelVersion:	2.6.22
218Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
219		Christoph Lameter <cl@gentwo.org>
220Description:
221		The free_calls file is read-only and lists the locations of
222		object frees if slab debugging is enabled (see
223		Documentation/admin-guide/mm/slab.rst).
224
225What:		/sys/kernel/slab/<cache>/free_fastpath
226Date:		February 2008
227KernelVersion:	2.6.25
228Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
229		Christoph Lameter <cl@gentwo.org>
230Description:
231		The free_fastpath file shows how many objects have been freed
232		using the fast path because it was an object from the cpu slab.
233		It can be written to clear the current count.
234		Available when CONFIG_SLUB_STATS is enabled.
235
236What:		/sys/kernel/slab/<cache>/free_frozen
237Date:		February 2008
238KernelVersion:	2.6.25
239Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
240		Christoph Lameter <cl@gentwo.org>
241Description:
242		The free_frozen file shows how many objects have been freed to
243		a frozen slab (i.e. a remote cpu slab).  It can be written to
244		clear the current count.
245		Available when CONFIG_SLUB_STATS is enabled.
246
247What:		/sys/kernel/slab/<cache>/free_remove_partial
248Date:		February 2008
249KernelVersion:	2.6.25
250Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
251		Christoph Lameter <cl@gentwo.org>
252Description:
253		The free_remove_partial file shows how many times an object has
254		been freed to a now-empty slab so that it had to be removed from
255		its node's partial list.  It can be written to clear the current
256		count.
257		Available when CONFIG_SLUB_STATS is enabled.
258
259What:		/sys/kernel/slab/<cache>/free_slab
260Date:		February 2008
261KernelVersion:	2.6.25
262Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
263		Christoph Lameter <cl@gentwo.org>
264Description:
265		The free_slab file shows how many times an empty slab has been
266		freed back to the page allocator.  It can be written to clear
267		the current count.
268		Available when CONFIG_SLUB_STATS is enabled.
269
270What:		/sys/kernel/slab/<cache>/free_slowpath
271Date:		February 2008
272KernelVersion:	2.6.25
273Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
274		Christoph Lameter <cl@gentwo.org>
275Description:
276		The free_slowpath file shows how many objects have been freed
277		using the slow path (i.e. to a full or partial slab).  It can
278		be written to clear the current count.
279		Available when CONFIG_SLUB_STATS is enabled.
280
281What:		/sys/kernel/slab/<cache>/hwcache_align
282Date:		May 2007
283KernelVersion:	2.6.22
284Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
285		Christoph Lameter <cl@gentwo.org>
286Description:
287		The hwcache_align file is read-only and specifies whether
288		objects are aligned on cachelines.
289
290What:		/sys/kernel/slab/<cache>/min_partial
291Date:		February 2009
292KernelVersion:	2.6.30
293Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
294		David Rientjes <rientjes@google.com>
295Description:
296		The min_partial file specifies how many empty slabs shall
297		remain on a node's partial list to avoid the overhead of
298		allocating new slabs.  Such slabs may be reclaimed by utilizing
299		the shrink file.
300
301What:		/sys/kernel/slab/<cache>/object_size
302Date:		May 2007
303KernelVersion:	2.6.22
304Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
305		Christoph Lameter <cl@gentwo.org>
306Description:
307		The object_size file is read-only and specifies the cache's
308		object size.
309
310What:		/sys/kernel/slab/<cache>/objects
311Date:		May 2007
312KernelVersion:	2.6.22
313Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
314		Christoph Lameter <cl@gentwo.org>
315Description:
316		The objects file is read-only and displays how many objects are
317		active and from which nodes they are from.
318
319What:		/sys/kernel/slab/<cache>/objects_partial
320Date:		April 2008
321KernelVersion:	2.6.26
322Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
323		Christoph Lameter <cl@gentwo.org>
324Description:
325		The objects_partial file is read-only and displays how many
326		objects are on partial slabs and from which nodes they are
327		from.
328
329What:		/sys/kernel/slab/<cache>/objs_per_slab
330Date:		May 2007
331KernelVersion:	2.6.22
332Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
333		Christoph Lameter <cl@gentwo.org>
334Description:
335		The file objs_per_slab is read-only and specifies how many
336		objects may be allocated from a single slab of the order
337		specified in /sys/kernel/slab/<cache>/order.
338
339What:		/sys/kernel/slab/<cache>/order
340Date:		May 2007
341KernelVersion:	2.6.22
342Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
343		Christoph Lameter <cl@gentwo.org>
344Description:
345		The order file specifies the page order at which new slabs are
346		allocated.  It is writable and can be changed to increase the
347		number of objects per slab.  If a slab cannot be allocated
348		because of fragmentation, SLUB will retry with the minimum order
349		possible depending on its characteristics.
350
351		When debug_guardpage_minorder=N (N > 0) parameter is specified
352		(see Documentation/admin-guide/kernel-parameters.rst), the minimum possible
353		order is used and this sysfs entry can not be used to change
354		the order at run time.
355
356What:		/sys/kernel/slab/<cache>/order_fallback
357Date:		April 2008
358KernelVersion:	2.6.26
359Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
360		Christoph Lameter <cl@gentwo.org>
361Description:
362		The order_fallback file shows how many times an allocation of a
363		new slab has not been possible at the cache's order and instead
364		fallen back to its minimum possible order.  It can be written to
365		clear the current count.
366
367		Available when CONFIG_SLUB_STATS is enabled.
368
369What:		/sys/kernel/slab/<cache>/partial
370Date:		May 2007
371KernelVersion:	2.6.22
372Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
373		Christoph Lameter <cl@gentwo.org>
374Description:
375		The partial file is read-only and displays how long many
376		partial slabs there are and how long each node's list is.
377
378What:		/sys/kernel/slab/<cache>/poison
379Date:		May 2007
380KernelVersion:	2.6.22
381Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
382		Christoph Lameter <cl@gentwo.org>
383Description:
384		The poison file specifies whether objects should be poisoned
385		when a new slab is allocated.
386
387What:		/sys/kernel/slab/<cache>/reclaim_account
388Date:		May 2007
389KernelVersion:	2.6.22
390Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
391		Christoph Lameter <cl@gentwo.org>
392Description:
393		The reclaim_account file specifies whether the cache's objects
394		are reclaimable (and grouped by their mobility).
395
396What:		/sys/kernel/slab/<cache>/red_zone
397Date:		May 2007
398KernelVersion:	2.6.22
399Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
400		Christoph Lameter <cl@gentwo.org>
401Description:
402		The red_zone file specifies whether the cache's objects are red
403		zoned.
404
405What:		/sys/kernel/slab/<cache>/remote_node_defrag_ratio
406Date:		January 2008
407KernelVersion:	2.6.25
408Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
409		Christoph Lameter <cl@gentwo.org>
410Description:
411		The file remote_node_defrag_ratio specifies the percentage of
412		times SLUB will attempt to refill the cpu slab with a partial
413		slab from a remote node as opposed to allocating a new slab on
414		the local node.  This reduces the amount of wasted memory over
415		the entire system but can be expensive.
416
417		Available when CONFIG_NUMA is enabled.
418
419What:		/sys/kernel/slab/<cache>/sanity_checks
420Date:		May 2007
421KernelVersion:	2.6.22
422Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
423		Christoph Lameter <cl@gentwo.org>
424Description:
425		The sanity_checks file specifies whether expensive checks
426		should be performed on free and, at minimum, enables double free
427		checks.  Caches that enable sanity_checks cannot be merged with
428		caches that do not.
429
430What:		/sys/kernel/slab/<cache>/shrink
431Date:		May 2007
432KernelVersion:	2.6.22
433Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
434		Christoph Lameter <cl@gentwo.org>
435Description:
436		The shrink file is used to reclaim unused slab cache
437		memory from a cache.  Empty per-cpu or partial slabs
438		are freed and the partial list is sorted so the slabs
439		with the fewest available objects are used first.
440		It only accepts a value of "1" on write for shrinking
441		the cache. Other input values are considered invalid.
442		Shrinking slab caches might be expensive and can
443		adversely impact other running applications.  So it
444		should be used with care.
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@gentwo.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@gentwo.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@gentwo.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@gentwo.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@gentwo.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@gentwo.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.
500
501What:		/sys/kernel/slab/<cache>/usersize
502Date:		Jun 2017
503Contact:	David Windsor <dave@nullcore.net>
504Description:
505		The usersize file is read-only and contains the usercopy
506		region size.
507
508What:		/sys/kernel/slab/<cache>/slabs_cpu_partial
509Date:		Aug 2011
510Contact:	Christoph Lameter <cl@gentwo.org>
511Description:
512		This read-only file shows the number of partialli allocated
513		frozen slabs.
514
515What:		/sys/kernel/slab/<cache>/cpu_partial
516Date:		Aug 2011
517Contact:	Christoph Lameter <cl@gentwo.org>
518Description:
519		This read-only file shows the number of per cpu partial
520		pages to keep around.
521