projects/linux·blob master · refs

526 lines · 18.1 KiB

1What: /sys/kernel/slab
2Date: May 2007
3KernelVersion: 2.6.22
4Contact: Pekka Enberg <[email protected]>,
5 Christoph Lameter <[email protected]>
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 <[email protected]>,
17 Christoph Lameter <[email protected]>
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 <[email protected]>,
26 Christoph Lameter <[email protected]>
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 <[email protected]>,
35 Christoph Lameter <[email protected]>
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 <[email protected]>,
47 Christoph Lameter <[email protected]>
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 <[email protected]>,
58 Christoph Lameter <[email protected]>
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 <[email protected]>,
70 Christoph Lameter <[email protected]>
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 <[email protected]>,
81 Christoph Lameter <[email protected]>
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 <[email protected]>,
92 Christoph Lameter <[email protected]>
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 <[email protected]>,
104 Christoph Lameter <[email protected]>
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 <[email protected]>,
114 Christoph Lameter <[email protected]>
115Description:
116 The cpu_slabs file is read-only. It is deprecated and always
117 reads "0" since the removal of per-cpu slabs in Linux 7.0. It
118 previously displayed how many cpu slabs were active and their
119 NUMA locality. The file is kept for backwards compatibility.
120
121What: /sys/kernel/slab/<cache>/cpuslab_flush
122Date: April 2009
123KernelVersion: 2.6.31
124Contact: Pekka Enberg <[email protected]>,
125 Christoph Lameter <[email protected]>
126Description:
127 The file cpuslab_flush shows how many times a cache's cpu slabs
128 have been flushed as the result of destroying or shrinking a
129 cache, a cpu going offline, or as the result of forcing an
130 allocation from a certain node. It can be written to clear the
131 current count.
132 Available when CONFIG_SLUB_STATS is enabled.
133
134What: /sys/kernel/slab/<cache>/ctor
135Date: May 2007
136KernelVersion: 2.6.22
137Contact: Pekka Enberg <[email protected]>,
138 Christoph Lameter <[email protected]>
139Description:
140 The ctor file is read-only and specifies the cache's object
141 constructor function, which is invoked for each object when a
142 new slab is allocated.
143
144What: /sys/kernel/slab/<cache>/deactivate_empty
145Date: February 2008
146KernelVersion: 2.6.25
147Contact: Pekka Enberg <[email protected]>,
148 Christoph Lameter <[email protected]>
149Description:
150 The deactivate_empty file shows how many times an empty cpu slab
151 was deactivated. It can be written to clear the current count.
152 Available when CONFIG_SLUB_STATS is enabled.
153
154What: /sys/kernel/slab/<cache>/deactivate_full
155Date: February 2008
156KernelVersion: 2.6.25
157Contact: Pekka Enberg <[email protected]>,
158 Christoph Lameter <[email protected]>
159Description:
160 The deactivate_full file shows how many times a full cpu slab
161 was deactivated. It can be written to clear the current count.
162 Available when CONFIG_SLUB_STATS is enabled.
163
164What: /sys/kernel/slab/<cache>/deactivate_remote_frees
165Date: February 2008
166KernelVersion: 2.6.25
167Contact: Pekka Enberg <[email protected]>,
168 Christoph Lameter <[email protected]>
169Description:
170 The deactivate_remote_frees file shows how many times a cpu slab
171 has been deactivated and contained free objects that were freed
172 remotely. It can be written to clear the current count.
173 Available when CONFIG_SLUB_STATS is enabled.
174
175What: /sys/kernel/slab/<cache>/deactivate_to_head
176Date: February 2008
177KernelVersion: 2.6.25
178Contact: Pekka Enberg <[email protected]>,
179 Christoph Lameter <[email protected]>
180Description:
181 The deactivate_to_head file shows how many times a partial cpu
182 slab was deactivated and added to the head of its node's partial
183 list. It can be written to clear the current count.
184 Available when CONFIG_SLUB_STATS is enabled.
185
186What: /sys/kernel/slab/<cache>/deactivate_to_tail
187Date: February 2008
188KernelVersion: 2.6.25
189Contact: Pekka Enberg <[email protected]>,
190 Christoph Lameter <[email protected]>
191Description:
192 The deactivate_to_tail file shows how many times a partial cpu
193 slab was deactivated and added to the tail of its node's partial
194 list. It can be written to clear the current count.
195 Available when CONFIG_SLUB_STATS is enabled.
196
197What: /sys/kernel/slab/<cache>/destroy_by_rcu
198Date: May 2007
199KernelVersion: 2.6.22
200Contact: Pekka Enberg <[email protected]>,
201 Christoph Lameter <[email protected]>
202Description:
203 The destroy_by_rcu file is read-only and specifies whether
204 slabs (not objects) are freed by rcu.
205
206What: /sys/kernel/slab/<cache>/free_add_partial
207Date: February 2008
208KernelVersion: 2.6.25
209Contact: Pekka Enberg <[email protected]>,
210 Christoph Lameter <[email protected]>
211Description:
212 The free_add_partial file shows how many times an object has
213 been freed in a full slab so that it had to added to its node's
214 partial list. It can be written to clear the current count.
215 Available when CONFIG_SLUB_STATS is enabled.
216
217What: /sys/kernel/slab/<cache>/free_calls
218Date: May 2007
219KernelVersion: 2.6.22
220Contact: Pekka Enberg <[email protected]>,
221 Christoph Lameter <[email protected]>
222Description:
223 The free_calls file is read-only and lists the locations of
224 object frees if slab debugging is enabled (see
225 Documentation/admin-guide/mm/slab.rst).
226
227What: /sys/kernel/slab/<cache>/free_fastpath
228Date: February 2008
229KernelVersion: 2.6.25
230Contact: Pekka Enberg <[email protected]>,
231 Christoph Lameter <[email protected]>
232Description:
233 The free_fastpath file shows how many objects have been freed
234 using the fast path because it was an object from the cpu slab.
235 It can be written to clear the current count.
236 Available when CONFIG_SLUB_STATS is enabled.
237
238What: /sys/kernel/slab/<cache>/free_frozen
239Date: February 2008
240KernelVersion: 2.6.25
241Contact: Pekka Enberg <[email protected]>,
242 Christoph Lameter <[email protected]>
243Description:
244 The free_frozen file shows how many objects have been freed to
245 a frozen slab (i.e. a remote cpu slab). It can be written to
246 clear the current count.
247 Available when CONFIG_SLUB_STATS is enabled.
248
249What: /sys/kernel/slab/<cache>/free_remove_partial
250Date: February 2008
251KernelVersion: 2.6.25
252Contact: Pekka Enberg <[email protected]>,
253 Christoph Lameter <[email protected]>
254Description:
255 The free_remove_partial file shows how many times an object has
256 been freed to a now-empty slab so that it had to be removed from
257 its node's partial list. It can be written to clear the current
258 count.
259 Available when CONFIG_SLUB_STATS is enabled.
260
261What: /sys/kernel/slab/<cache>/free_slab
262Date: February 2008
263KernelVersion: 2.6.25
264Contact: Pekka Enberg <[email protected]>,
265 Christoph Lameter <[email protected]>
266Description:
267 The free_slab file shows how many times an empty slab has been
268 freed back to the page allocator. It can be written to clear
269 the current count.
270 Available when CONFIG_SLUB_STATS is enabled.
271
272What: /sys/kernel/slab/<cache>/free_slowpath
273Date: February 2008
274KernelVersion: 2.6.25
275Contact: Pekka Enberg <[email protected]>,
276 Christoph Lameter <[email protected]>
277Description:
278 The free_slowpath file shows how many objects have been freed
279 using the slow path (i.e. to a full or partial slab). It can
280 be written to clear the current count.
281 Available when CONFIG_SLUB_STATS is enabled.
282
283What: /sys/kernel/slab/<cache>/hwcache_align
284Date: May 2007
285KernelVersion: 2.6.22
286Contact: Pekka Enberg <[email protected]>,
287 Christoph Lameter <[email protected]>
288Description:
289 The hwcache_align file is read-only and specifies whether
290 objects are aligned on cachelines.
291
292What: /sys/kernel/slab/<cache>/min_partial
293Date: February 2009
294KernelVersion: 2.6.30
295Contact: Pekka Enberg <[email protected]>,
296 David Rientjes <[email protected]>
297Description:
298 The min_partial file specifies how many empty slabs shall
299 remain on a node's partial list to avoid the overhead of
300 allocating new slabs. Such slabs may be reclaimed by utilizing
301 the shrink file.
302
303What: /sys/kernel/slab/<cache>/object_size
304Date: May 2007
305KernelVersion: 2.6.22
306Contact: Pekka Enberg <[email protected]>,
307 Christoph Lameter <[email protected]>
308Description:
309 The object_size file is read-only and specifies the cache's
310 object size.
311
312What: /sys/kernel/slab/<cache>/objects
313Date: May 2007
314KernelVersion: 2.6.22
315Contact: Pekka Enberg <[email protected]>,
316 Christoph Lameter <[email protected]>
317Description:
318 The objects file is read-only and displays how many objects are
319 active and from which nodes they are from.
320
321What: /sys/kernel/slab/<cache>/objects_partial
322Date: April 2008
323KernelVersion: 2.6.26
324Contact: Pekka Enberg <[email protected]>,
325 Christoph Lameter <[email protected]>
326Description:
327 The objects_partial file is read-only and displays how many
328 objects are on partial slabs and from which nodes they are
329 from.
330
331What: /sys/kernel/slab/<cache>/objs_per_slab
332Date: May 2007
333KernelVersion: 2.6.22
334Contact: Pekka Enberg <[email protected]>,
335 Christoph Lameter <[email protected]>
336Description:
337 The file objs_per_slab is read-only and specifies how many
338 objects may be allocated from a single slab of the order
339 specified in /sys/kernel/slab/<cache>/order.
340
341What: /sys/kernel/slab/<cache>/order
342Date: May 2007
343KernelVersion: 2.6.22
344Contact: Pekka Enberg <[email protected]>,
345 Christoph Lameter <[email protected]>
346Description:
347 The order file specifies the page order at which new slabs are
348 allocated. It is writable and can be changed to increase the
349 number of objects per slab. If a slab cannot be allocated
350 because of fragmentation, SLUB will retry with the minimum order
351 possible depending on its characteristics.
352
353 When debug_guardpage_minorder=N (N > 0) parameter is specified
354 (see Documentation/admin-guide/kernel-parameters.rst), the minimum possible
355 order is used and this sysfs entry can not be used to change
356 the order at run time.
357
358What: /sys/kernel/slab/<cache>/order_fallback
359Date: April 2008
360KernelVersion: 2.6.26
361Contact: Pekka Enberg <[email protected]>,
362 Christoph Lameter <[email protected]>
363Description:
364 The order_fallback file shows how many times an allocation of a
365 new slab has not been possible at the cache's order and instead
366 fallen back to its minimum possible order. It can be written to
367 clear the current count.
368
369 Available when CONFIG_SLUB_STATS is enabled.
370
371What: /sys/kernel/slab/<cache>/partial
372Date: May 2007
373KernelVersion: 2.6.22
374Contact: Pekka Enberg <[email protected]>,
375 Christoph Lameter <[email protected]>
376Description:
377 The partial file is read-only and displays how long many
378 partial slabs there are and how long each node's list is.
379
380What: /sys/kernel/slab/<cache>/poison
381Date: May 2007
382KernelVersion: 2.6.22
383Contact: Pekka Enberg <[email protected]>,
384 Christoph Lameter <[email protected]>
385Description:
386 The poison file specifies whether objects should be poisoned
387 when a new slab is allocated.
388
389What: /sys/kernel/slab/<cache>/reclaim_account
390Date: May 2007
391KernelVersion: 2.6.22
392Contact: Pekka Enberg <[email protected]>,
393 Christoph Lameter <[email protected]>
394Description:
395 The reclaim_account file specifies whether the cache's objects
396 are reclaimable (and grouped by their mobility).
397
398What: /sys/kernel/slab/<cache>/red_zone
399Date: May 2007
400KernelVersion: 2.6.22
401Contact: Pekka Enberg <[email protected]>,
402 Christoph Lameter <[email protected]>
403Description:
404 The red_zone file specifies whether the cache's objects are red
405 zoned.
406
407What: /sys/kernel/slab/<cache>/remote_node_defrag_ratio
408Date: January 2008
409KernelVersion: 2.6.25
410Contact: Pekka Enberg <[email protected]>,
411 Christoph Lameter <[email protected]>
412Description:
413 The file remote_node_defrag_ratio specifies the percentage of
414 times SLUB will attempt to refill the cpu slab with a partial
415 slab from a remote node as opposed to allocating a new slab on
416 the local node. This reduces the amount of wasted memory over
417 the entire system but can be expensive.
418
419 Available when CONFIG_NUMA is enabled.
420
421What: /sys/kernel/slab/<cache>/sanity_checks
422Date: May 2007
423KernelVersion: 2.6.22
424Contact: Pekka Enberg <[email protected]>,
425 Christoph Lameter <[email protected]>
426Description:
427 The sanity_checks file specifies whether expensive checks
428 should be performed on free and, at minimum, enables double free
429 checks. Caches that enable sanity_checks cannot be merged with
430 caches that do not.
431
432What: /sys/kernel/slab/<cache>/shrink
433Date: May 2007
434KernelVersion: 2.6.22
435Contact: Pekka Enberg <[email protected]>,
436 Christoph Lameter <[email protected]>
437Description:
438 The shrink file is used to reclaim unused slab cache
439 memory from a cache. Empty per-cpu or partial slabs
440 are freed and the partial list is sorted so the slabs
441 with the fewest available objects are used first.
442 It only accepts a value of "1" on write for shrinking
443 the cache. Other input values are considered invalid.
444 Shrinking slab caches might be expensive and can
445 adversely impact other running applications. So it
446 should be used with care.
447
448What: /sys/kernel/slab/<cache>/slab_size
449Date: May 2007
450KernelVersion: 2.6.22
451Contact: Pekka Enberg <[email protected]>,
452 Christoph Lameter <[email protected]>
453Description:
454 The slab_size file is read-only and specifies the object size
455 with metadata (debugging information and alignment) in bytes.
456
457What: /sys/kernel/slab/<cache>/slabs
458Date: May 2007
459KernelVersion: 2.6.22
460Contact: Pekka Enberg <[email protected]>,
461 Christoph Lameter <[email protected]>
462Description:
463 The slabs file is read-only and displays how long many slabs
464 there are (both cpu and partial) and from which nodes they are
465 from.
466
467What: /sys/kernel/slab/<cache>/store_user
468Date: May 2007
469KernelVersion: 2.6.22
470Contact: Pekka Enberg <[email protected]>,
471 Christoph Lameter <[email protected]>
472Description:
473 The store_user file specifies whether the location of
474 allocation or free should be tracked for a cache.
475
476What: /sys/kernel/slab/<cache>/total_objects
477Date: April 2008
478KernelVersion: 2.6.26
479Contact: Pekka Enberg <[email protected]>,
480 Christoph Lameter <[email protected]>
481Description:
482 The total_objects file is read-only and displays how many total
483 objects a cache has and from which nodes they are from.
484
485What: /sys/kernel/slab/<cache>/trace
486Date: May 2007
487KernelVersion: 2.6.22
488Contact: Pekka Enberg <[email protected]>,
489 Christoph Lameter <[email protected]>
490Description:
491 The trace file specifies whether object allocations and frees
492 should be traced.
493
494What: /sys/kernel/slab/<cache>/validate
495Date: May 2007
496KernelVersion: 2.6.22
497Contact: Pekka Enberg <[email protected]>,
498 Christoph Lameter <[email protected]>
499Description:
500 Writing to the validate file causes SLUB to traverse all of its
501 cache's objects and check the validity of metadata.
502
503What: /sys/kernel/slab/<cache>/usersize
504Date: Jun 2017
505Contact: David Windsor <[email protected]>
506Description:
507 The usersize file is read-only and contains the usercopy
508 region size.
509
510What: /sys/kernel/slab/<cache>/slabs_cpu_partial
511Date: Aug 2011
512Contact: Christoph Lameter <[email protected]>
513Description:
514 This read-only file is deprecated and always reads "0(0)" since
515 the removal of per-cpu partial slabs in Linux 7.0. It previously
516 showed the number of partially allocated frozen slabs. The file
517 is kept for backwards compatibility.
518
519What: /sys/kernel/slab/<cache>/cpu_partial
520Date: Aug 2011
521Contact: Christoph Lameter <[email protected]>
522Description:
523 This file is deprecated and always reads "0" since the removal of
524 per-cpu partial slabs in Linux 7.0. It previously showed the
525 number of per-cpu partial pages to keep around. The file is kept
526 for backwards compatibility.