.. | .. |
---|
36 | 36 | |
---|
37 | 37 | slub_debug=<Debug-Options> |
---|
38 | 38 | Enable options for all slabs |
---|
39 | | -slub_debug=<Debug-Options>,<slab name> |
---|
40 | | - Enable options only for select slabs |
---|
41 | 39 | |
---|
| 40 | +slub_debug=<Debug-Options>,<slab name1>,<slab name2>,... |
---|
| 41 | + Enable options only for select slabs (no spaces |
---|
| 42 | + after a comma) |
---|
| 43 | + |
---|
| 44 | +Multiple blocks of options for all slabs or selected slabs can be given, with |
---|
| 45 | +blocks of options delimited by ';'. The last of "all slabs" blocks is applied |
---|
| 46 | +to all slabs except those that match one of the "select slabs" block. Options |
---|
| 47 | +of the first "select slabs" blocks that matches the slab's name are applied. |
---|
42 | 48 | |
---|
43 | 49 | Possible debug options are:: |
---|
44 | 50 | |
---|
.. | .. |
---|
48 | 54 | P Poisoning (object and padding) |
---|
49 | 55 | U User tracking (free and alloc) |
---|
50 | 56 | T Trace (please only use on single slabs) |
---|
51 | | - A Toggle failslab filter mark for the cache |
---|
| 57 | + A Enable failslab filter mark for the cache |
---|
52 | 58 | O Switch debugging off for caches that would have |
---|
53 | 59 | caused higher minimum slab orders |
---|
54 | 60 | - Switch all debugging off (useful if the kernel is |
---|
.. | .. |
---|
62 | 68 | |
---|
63 | 69 | slub_debug=,dentry |
---|
64 | 70 | |
---|
65 | | -to only enable debugging on the dentry cache. |
---|
| 71 | +to only enable debugging on the dentry cache. You may use an asterisk at the |
---|
| 72 | +end of the slab name, in order to cover all slabs with the same prefix. For |
---|
| 73 | +example, here's how you can poison the dentry cache as well as all kmalloc |
---|
| 74 | +slabs:: |
---|
| 75 | + |
---|
| 76 | + slub_debug=P,kmalloc-*,dentry |
---|
66 | 77 | |
---|
67 | 78 | Red zoning and tracking may realign the slab. We can just apply sanity checks |
---|
68 | 79 | to the dentry cache with:: |
---|
.. | .. |
---|
77 | 88 | |
---|
78 | 89 | slub_debug=O |
---|
79 | 90 | |
---|
80 | | -In case you forgot to enable debugging on the kernel command line: It is |
---|
81 | | -possible to enable debugging manually when the kernel is up. Look at the |
---|
82 | | -contents of:: |
---|
| 91 | +You can apply different options to different list of slab names, using blocks |
---|
| 92 | +of options. This will enable red zoning for dentry and user tracking for |
---|
| 93 | +kmalloc. All other slabs will not get any debugging enabled:: |
---|
| 94 | + |
---|
| 95 | + slub_debug=Z,dentry;U,kmalloc-* |
---|
| 96 | + |
---|
| 97 | +You can also enable options (e.g. sanity checks and poisoning) for all caches |
---|
| 98 | +except some that are deemed too performance critical and don't need to be |
---|
| 99 | +debugged by specifying global debug options followed by a list of slab names |
---|
| 100 | +with "-" as options:: |
---|
| 101 | + |
---|
| 102 | + slub_debug=FZ;-,zs_handle,zspage |
---|
| 103 | + |
---|
| 104 | +The state of each debug option for a slab can be found in the respective files |
---|
| 105 | +under:: |
---|
83 | 106 | |
---|
84 | 107 | /sys/kernel/slab/<slab name>/ |
---|
85 | 108 | |
---|
86 | | -Look at the writable files. Writing 1 to them will enable the |
---|
87 | | -corresponding debug option. All options can be set on a slab that does |
---|
88 | | -not contain objects. If the slab already contains objects then sanity checks |
---|
89 | | -and tracing may only be enabled. The other options may cause the realignment |
---|
90 | | -of objects. |
---|
| 109 | +If the file contains 1, the option is enabled, 0 means disabled. The debug |
---|
| 110 | +options from the ``slub_debug`` parameter translate to the following files:: |
---|
| 111 | + |
---|
| 112 | + F sanity_checks |
---|
| 113 | + Z red_zone |
---|
| 114 | + P poison |
---|
| 115 | + U store_user |
---|
| 116 | + T trace |
---|
| 117 | + A failslab |
---|
91 | 118 | |
---|
92 | 119 | Careful with tracing: It may spew out lots of information and never stop if |
---|
93 | 120 | used on the wrong slab. |
---|
.. | .. |
---|
135 | 162 | (list_lock) where contention may occur. |
---|
136 | 163 | |
---|
137 | 164 | ``slub_min_order`` |
---|
138 | | - specifies a minim order of slabs. A similar effect like |
---|
| 165 | + specifies a minimum order of slabs. A similar effect like |
---|
139 | 166 | ``slub_min_objects``. |
---|
140 | 167 | |
---|
141 | 168 | ``slub_max_order`` |
---|
.. | .. |
---|
351 | 378 | can go unnoticed. To deal with that, ``slabinfo-gnuplot.sh`` has two |
---|
352 | 379 | options to 'zoom-in'/'zoom-out': |
---|
353 | 380 | |
---|
354 | | - a) ``-s %d,%d`` -- overwrites the default image width and heigh |
---|
| 381 | + a) ``-s %d,%d`` -- overwrites the default image width and height |
---|
355 | 382 | b) ``-r %d,%d`` -- specifies a range of samples to use (for example, |
---|
356 | 383 | in ``slabinfo -X >> FOO_STATS; sleep 1;`` case, using a ``-r |
---|
357 | 384 | 40,60`` range will plot only samples collected between 40th and |
---|