Skip to content

Commit cb109a9

Browse files
Xiongwei Songtehcaster
authored andcommitted
mm/slub: replace slub_$params with slab_$params in slub.rst
We've unified slab parameters with "slab_$params", then we can use slab_$params in Documentation/mm/slub.rst. Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
1 parent 671776b commit cb109a9

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

Documentation/mm/slub.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SLUB can enable debugging only for selected slabs in order to avoid
99
an impact on overall system performance which may make a bug more
1010
difficult to find.
1111

12-
In order to switch debugging on one can add an option ``slub_debug``
12+
In order to switch debugging on one can add an option ``slab_debug``
1313
to the kernel command line. That will enable full debugging for
1414
all slabs.
1515

@@ -26,16 +26,16 @@ be enabled on the command line. F.e. no tracking information will be
2626
available without debugging on and validation can only partially
2727
be performed if debugging was not switched on.
2828

29-
Some more sophisticated uses of slub_debug:
29+
Some more sophisticated uses of slab_debug:
3030
-------------------------------------------
3131

32-
Parameters may be given to ``slub_debug``. If none is specified then full
32+
Parameters may be given to ``slab_debug``. If none is specified then full
3333
debugging is enabled. Format:
3434

35-
slub_debug=<Debug-Options>
35+
slab_debug=<Debug-Options>
3636
Enable options for all slabs
3737

38-
slub_debug=<Debug-Options>,<slab name1>,<slab name2>,...
38+
slab_debug=<Debug-Options>,<slab name1>,<slab name2>,...
3939
Enable options only for select slabs (no spaces
4040
after a comma)
4141

@@ -60,52 +60,52 @@ Possible debug options are::
6060

6161
F.e. in order to boot just with sanity checks and red zoning one would specify::
6262

63-
slub_debug=FZ
63+
slab_debug=FZ
6464

6565
Trying to find an issue in the dentry cache? Try::
6666

67-
slub_debug=,dentry
67+
slab_debug=,dentry
6868

6969
to only enable debugging on the dentry cache. You may use an asterisk at the
7070
end of the slab name, in order to cover all slabs with the same prefix. For
7171
example, here's how you can poison the dentry cache as well as all kmalloc
7272
slabs::
7373

74-
slub_debug=P,kmalloc-*,dentry
74+
slab_debug=P,kmalloc-*,dentry
7575

7676
Red zoning and tracking may realign the slab. We can just apply sanity checks
7777
to the dentry cache with::
7878

79-
slub_debug=F,dentry
79+
slab_debug=F,dentry
8080

8181
Debugging options may require the minimum possible slab order to increase as
8282
a result of storing the metadata (for example, caches with PAGE_SIZE object
8383
sizes). This has a higher liklihood of resulting in slab allocation errors
8484
in low memory situations or if there's high fragmentation of memory. To
8585
switch off debugging for such caches by default, use::
8686

87-
slub_debug=O
87+
slab_debug=O
8888

8989
You can apply different options to different list of slab names, using blocks
9090
of options. This will enable red zoning for dentry and user tracking for
9191
kmalloc. All other slabs will not get any debugging enabled::
9292

93-
slub_debug=Z,dentry;U,kmalloc-*
93+
slab_debug=Z,dentry;U,kmalloc-*
9494

9595
You can also enable options (e.g. sanity checks and poisoning) for all caches
9696
except some that are deemed too performance critical and don't need to be
9797
debugged by specifying global debug options followed by a list of slab names
9898
with "-" as options::
9999

100-
slub_debug=FZ;-,zs_handle,zspage
100+
slab_debug=FZ;-,zs_handle,zspage
101101

102102
The state of each debug option for a slab can be found in the respective files
103103
under::
104104

105105
/sys/kernel/slab/<slab name>/
106106

107107
If the file contains 1, the option is enabled, 0 means disabled. The debug
108-
options from the ``slub_debug`` parameter translate to the following files::
108+
options from the ``slab_debug`` parameter translate to the following files::
109109

110110
F sanity_checks
111111
Z red_zone
@@ -129,7 +129,7 @@ in order to reduce overhead and increase cache hotness of objects.
129129
Slab validation
130130
===============
131131

132-
SLUB can validate all object if the kernel was booted with slub_debug. In
132+
SLUB can validate all object if the kernel was booted with slab_debug. In
133133
order to do so you must have the ``slabinfo`` tool. Then you can do
134134
::
135135

@@ -150,29 +150,29 @@ list_lock once in a while to deal with partial slabs. That overhead is
150150
governed by the order of the allocation for each slab. The allocations
151151
can be influenced by kernel parameters:
152152

153-
.. slub_min_objects=x (default 4)
154-
.. slub_min_order=x (default 0)
155-
.. slub_max_order=x (default 3 (PAGE_ALLOC_COSTLY_ORDER))
153+
.. slab_min_objects=x (default 4)
154+
.. slab_min_order=x (default 0)
155+
.. slab_max_order=x (default 3 (PAGE_ALLOC_COSTLY_ORDER))
156156
157-
``slub_min_objects``
157+
``slab_min_objects``
158158
allows to specify how many objects must at least fit into one
159159
slab in order for the allocation order to be acceptable. In
160160
general slub will be able to perform this number of
161161
allocations on a slab without consulting centralized resources
162162
(list_lock) where contention may occur.
163163

164-
``slub_min_order``
164+
``slab_min_order``
165165
specifies a minimum order of slabs. A similar effect like
166-
``slub_min_objects``.
166+
``slab_min_objects``.
167167

168-
``slub_max_order``
169-
specified the order at which ``slub_min_objects`` should no
168+
``slab_max_order``
169+
specified the order at which ``slab_min_objects`` should no
170170
longer be checked. This is useful to avoid SLUB trying to
171-
generate super large order pages to fit ``slub_min_objects``
171+
generate super large order pages to fit ``slab_min_objects``
172172
of a slab cache with large object sizes into one high order
173173
page. Setting command line parameter
174174
``debug_guardpage_minorder=N`` (N > 0), forces setting
175-
``slub_max_order`` to 0, what cause minimum possible order of
175+
``slab_max_order`` to 0, what cause minimum possible order of
176176
slabs allocation.
177177

178178
SLUB Debug output
@@ -219,7 +219,7 @@ Here is a sample of slub debug output::
219219
FIX kmalloc-8: Restoring Redzone 0xc90f6d28-0xc90f6d2b=0xcc
220220

221221
If SLUB encounters a corrupted object (full detection requires the kernel
222-
to be booted with slub_debug) then the following output will be dumped
222+
to be booted with slab_debug) then the following output will be dumped
223223
into the syslog:
224224

225225
1. Description of the problem encountered
@@ -239,7 +239,7 @@ into the syslog:
239239
pid=<pid of the process>
240240

241241
(Object allocation / free information is only available if SLAB_STORE_USER is
242-
set for the slab. slub_debug sets that option)
242+
set for the slab. slab_debug sets that option)
243243

244244
2. The object contents if an object was involved.
245245

@@ -262,7 +262,7 @@ into the syslog:
262262
the object boundary.
263263

264264
(Redzone information is only available if SLAB_RED_ZONE is set.
265-
slub_debug sets that option)
265+
slab_debug sets that option)
266266

267267
Padding <address> : <bytes>
268268
Unused data to fill up the space in order to get the next object
@@ -296,7 +296,7 @@ Emergency operations
296296

297297
Minimal debugging (sanity checks alone) can be enabled by booting with::
298298

299-
slub_debug=F
299+
slab_debug=F
300300

301301
This will be generally be enough to enable the resiliency features of slub
302302
which will keep the system running even if a bad kernel component will
@@ -311,13 +311,13 @@ and enabling debugging only for that cache
311311

312312
I.e.::
313313

314-
slub_debug=F,dentry
314+
slab_debug=F,dentry
315315

316316
If the corruption occurs by writing after the end of the object then it
317317
may be advisable to enable a Redzone to avoid corrupting the beginning
318318
of other objects::
319319

320-
slub_debug=FZ,dentry
320+
slab_debug=FZ,dentry
321321

322322
Extended slabinfo mode and plotting
323323
===================================

0 commit comments

Comments
 (0)