1What:		/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/cpu_slabs
110Date:		May 2007
111KernelVersion:	2.6.22
112Contact:	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 slabs
116		are active and their NUMA locality.
117
118What:		/sys/kernel/slab/cache/cpuslab_flush
119Date:		April 2009
120KernelVersion:	2.6.31
121Contact:	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 slabs
125		have been flushed as the result of destroying or shrinking a
126		cache, a cpu going offline, or as the result of forcing an
127		allocation from a certain node.  It can be written to clear the
128		current count.
129		Available when CONFIG_SLUB_STATS is enabled.
130
131What:		/sys/kernel/slab/cache/ctor
132Date:		May 2007
133KernelVersion:	2.6.22
134Contact:	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 object
138		constructor function, which is invoked for each object when a
139		new slab is allocated.
140
141What:		/sys/kernel/slab/cache/deactivate_empty
142Date:		February 2008
143KernelVersion:	2.6.25
144Contact:	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 slab
148		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_full
152Date:		February 2008
153KernelVersion:	2.6.25
154Contact:	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 slab
158		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_frees
162Date:		February 2008
163KernelVersion:	2.6.25
164Contact:	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 slab
168		has been deactivated and contained free objects that were freed
169		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_head
173Date:		February 2008
174KernelVersion:	2.6.25
175Contact:	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 cpu
179		slab was deactivated and added to the head of its node's partial
180		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_tail
184Date:		February 2008
185KernelVersion:	2.6.25
186Contact:	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 cpu
190		slab was deactivated and added to the tail of its node's partial
191		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_rcu
195Date:		May 2007
196KernelVersion:	2.6.22
197Contact:	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 whether
201		slabs (not objects) are freed by rcu.
202
203What:		/sys/kernel/slab/cache/free_add_partial
204Date:		February 2008
205KernelVersion:	2.6.25
206Contact:	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 has
210		been freed in a full slab so that it had to added to its node's
211		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_calls
215Date:		May 2007
216KernelVersion:	2.6.22
217Contact:	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 of
221		object frees if slab debugging is enabled (see
222		Documentation/vm/slub.rst).
223
224What:		/sys/kernel/slab/cache/free_fastpath
225Date:		February 2008
226KernelVersion:	2.6.25
227Contact:	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 freed
231		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_frozen
236Date:		February 2008
237KernelVersion:	2.6.25
238Contact:	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 to
242		a frozen slab (i.e. a remote cpu slab).  It can be written to
243		clear the current count.
244		Available when CONFIG_SLUB_STATS is enabled.
245
246What:		/sys/kernel/slab/cache/free_remove_partial
247Date:		February 2008
248KernelVersion:	2.6.25
249Contact:	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 has
253		been freed to a now-empty slab so that it had to be removed from
254		its node's partial list.  It can be written to clear the current
255		count.
256		Available when CONFIG_SLUB_STATS is enabled.
257
258What:		/sys/kernel/slab/cache/free_slab
259Date:		February 2008
260KernelVersion:	2.6.25
261Contact:	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 been
265		freed back to the page allocator.  It can be written to clear
266		the current count.
267		Available when CONFIG_SLUB_STATS is enabled.
268
269What:		/sys/kernel/slab/cache/free_slowpath
270Date:		February 2008
271KernelVersion:	2.6.25
272Contact:	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 freed
276		using the slow path (i.e. to a full or partial slab).  It can
277		be written to clear the current count.
278		Available when CONFIG_SLUB_STATS is enabled.
279
280What:		/sys/kernel/slab/cache/hwcache_align
281Date:		May 2007
282KernelVersion:	2.6.22
283Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
284		Christoph Lameter <cl@linux-foundation.org>
285Description:
286		The hwcache_align file is read-only and specifies whether
287		objects are aligned on cachelines.
288
289What:		/sys/kernel/slab/cache/min_partial
290Date:		February 2009
291KernelVersion:	2.6.30
292Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
293		David Rientjes <rientjes@google.com>
294Description:
295		The min_partial file specifies how many empty slabs shall
296		remain on a node's partial list to avoid the overhead of
297		allocating new slabs.  Such slabs may be reclaimed by utilizing
298		the shrink file.
299
300What:		/sys/kernel/slab/cache/object_size
301Date:		May 2007
302KernelVersion:	2.6.22
303Contact:	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's
307		object size.
308
309What:		/sys/kernel/slab/cache/objects
310Date:		May 2007
311KernelVersion:	2.6.22
312Contact:	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 are
316		active and from which nodes they are from.
317
318What:		/sys/kernel/slab/cache/objects_partial
319Date:		April 2008
320KernelVersion:	2.6.26
321Contact:	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 many
325		objects are on partial slabs and from which nodes they are
326		from.
327
328What:		/sys/kernel/slab/cache/objs_per_slab
329Date:		May 2007
330KernelVersion:	2.6.22
331Contact:	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 many
335		objects may be allocated from a single slab of the order
336		specified in /sys/kernel/slab/cache/order.
337
338What:		/sys/kernel/slab/cache/order
339Date:		May 2007
340KernelVersion:	2.6.22
341Contact:	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 are
345		allocated.  It is writable and can be changed to increase the
346		number of objects per slab.  If a slab cannot be allocated
347		because of fragmentation, SLUB will retry with the minimum order
348		possible depending on its characteristics.
349		When debug_guardpage_minorder=N (N > 0) parameter is specified
350		(see Documentation/admin-guide/kernel-parameters.rst), the minimum possible
351		order is used and this sysfs entry can not be used to change
352		the order at run time.
353
354What:		/sys/kernel/slab/cache/order_fallback
355Date:		April 2008
356KernelVersion:	2.6.26
357Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
358		Christoph Lameter <cl@linux-foundation.org>
359Description:
360		The order_fallback file shows how many times an allocation of a
361		new slab has not been possible at the cache's order and instead
362		fallen back to its minimum possible order.  It can be written to
363		clear the current count.
364		Available when CONFIG_SLUB_STATS is enabled.
365
366What:		/sys/kernel/slab/cache/partial
367Date:		May 2007
368KernelVersion:	2.6.22
369Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
370		Christoph Lameter <cl@linux-foundation.org>
371Description:
372		The partial file is read-only and displays how long many
373		partial slabs there are and how long each node's list is.
374
375What:		/sys/kernel/slab/cache/poison
376Date:		May 2007
377KernelVersion:	2.6.22
378Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
379		Christoph Lameter <cl@linux-foundation.org>
380Description:
381		The poison file specifies whether objects should be poisoned
382		when a new slab is allocated.
383
384What:		/sys/kernel/slab/cache/reclaim_account
385Date:		May 2007
386KernelVersion:	2.6.22
387Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
388		Christoph Lameter <cl@linux-foundation.org>
389Description:
390		The reclaim_account file specifies whether the cache's objects
391		are reclaimable (and grouped by their mobility).
392
393What:		/sys/kernel/slab/cache/red_zone
394Date:		May 2007
395KernelVersion:	2.6.22
396Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
397		Christoph Lameter <cl@linux-foundation.org>
398Description:
399		The red_zone file specifies whether the cache's objects are red
400		zoned.
401
402What:		/sys/kernel/slab/cache/remote_node_defrag_ratio
403Date:		January 2008
404KernelVersion:	2.6.25
405Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
406		Christoph Lameter <cl@linux-foundation.org>
407Description:
408		The file remote_node_defrag_ratio specifies the percentage of
409		times SLUB will attempt to refill the cpu slab with a partial
410		slab from a remote node as opposed to allocating a new slab on
411		the local node.  This reduces the amount of wasted memory over
412		the entire system but can be expensive.
413		Available when CONFIG_NUMA is enabled.
414
415What:		/sys/kernel/slab/cache/sanity_checks
416Date:		May 2007
417KernelVersion:	2.6.22
418Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
419		Christoph Lameter <cl@linux-foundation.org>
420Description:
421		The sanity_checks file specifies whether expensive checks
422		should be performed on free and, at minimum, enables double free
423		checks.  Caches that enable sanity_checks cannot be merged with
424		caches that do not.
425
426What:		/sys/kernel/slab/cache/shrink
427Date:		May 2007
428KernelVersion:	2.6.22
429Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
430		Christoph Lameter <cl@linux-foundation.org>
431Description:
432		The shrink file is used to reclaim unused slab cache
433		memory from a cache.  Empty per-cpu or partial slabs
434		are freed and the partial list is sorted so the slabs
435		with the fewest available objects are used first.
436		It only accepts a value of "1" on write for shrinking
437		the cache. Other input values are considered invalid.
438		Shrinking slab caches might be expensive and can
439		adversely impact other running applications.  So it
440		should be used with care.
441
442What:		/sys/kernel/slab/cache/slab_size
443Date:		May 2007
444KernelVersion:	2.6.22
445Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
446		Christoph Lameter <cl@linux-foundation.org>
447Description:
448		The slab_size file is read-only and specifies the object size
449		with metadata (debugging information and alignment) in bytes.
450
451What:		/sys/kernel/slab/cache/slabs
452Date:		May 2007
453KernelVersion:	2.6.22
454Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
455		Christoph Lameter <cl@linux-foundation.org>
456Description:
457		The slabs file is read-only and displays how long many slabs
458		there are (both cpu and partial) and from which nodes they are
459		from.
460
461What:		/sys/kernel/slab/cache/store_user
462Date:		May 2007
463KernelVersion:	2.6.22
464Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
465		Christoph Lameter <cl@linux-foundation.org>
466Description:
467		The store_user file specifies whether the location of
468		allocation or free should be tracked for a cache.
469
470What:		/sys/kernel/slab/cache/total_objects
471Date:		April 2008
472KernelVersion:	2.6.26
473Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
474		Christoph Lameter <cl@linux-foundation.org>
475Description:
476		The total_objects file is read-only and displays how many total
477		objects a cache has and from which nodes they are from.
478
479What:		/sys/kernel/slab/cache/trace
480Date:		May 2007
481KernelVersion:	2.6.22
482Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
483		Christoph Lameter <cl@linux-foundation.org>
484Description:
485		The trace file specifies whether object allocations and frees
486		should be traced.
487
488What:		/sys/kernel/slab/cache/validate
489Date:		May 2007
490KernelVersion:	2.6.22
491Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
492		Christoph Lameter <cl@linux-foundation.org>
493Description:
494		Writing to the validate file causes SLUB to traverse all of its
495		cache's objects and check the validity of metadata.
496