aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/BUG-HUNTING24
-rw-r--r--Documentation/SubmitChecklist6
-rw-r--r--Documentation/SubmittingPatches39
-rw-r--r--Documentation/feature-removal-schedule.txt3
-rw-r--r--Documentation/hrtimer/timer_stats.txt7
-rw-r--r--Documentation/ia64/aliasing-test.c2
-rw-r--r--Documentation/kernel-parameters.txt37
-rw-r--r--Documentation/networking/xfrm_sysctl.txt4
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--Documentation/vm/slub.txt135
10 files changed, 228 insertions, 30 deletions
diff --git a/Documentation/BUG-HUNTING b/Documentation/BUG-HUNTING
index 65b97e1dbf70..35f5bd243336 100644
--- a/Documentation/BUG-HUNTING
+++ b/Documentation/BUG-HUNTING
@@ -191,6 +191,30 @@ e.g. crash dump output as shown by Dave Miller.
191> mov 0x8(%ebp), %ebx ! %ebx = skb->sk 191> mov 0x8(%ebp), %ebx ! %ebx = skb->sk
192> mov 0x13c(%ebx), %eax ! %eax = inet_sk(sk)->opt 192> mov 0x13c(%ebx), %eax ! %eax = inet_sk(sk)->opt
193 193
194In addition, you can use GDB to figure out the exact file and line
195number of the OOPS from the vmlinux file. If you have
196CONFIG_DEBUG_INFO enabled, you can simply copy the EIP value from the
197OOPS:
198
199 EIP: 0060:[<c021e50e>] Not tainted VLI
200
201And use GDB to translate that to human-readable form:
202
203 gdb vmlinux
204 (gdb) l *0xc021e50e
205
206If you don't have CONFIG_DEBUG_INFO enabled, you use the function
207offset from the OOPS:
208
209 EIP is at vt_ioctl+0xda8/0x1482
210
211And recompile the kernel with CONFIG_DEBUG_INFO enabled:
212
213 make vmlinux
214 gdb vmlinux
215 (gdb) p vt_ioctl
216 (gdb) l *(0x<address of vt_ioctl> + 0xda8)
217
194Another very useful option of the Kernel Hacking section in menuconfig is 218Another very useful option of the Kernel Hacking section in menuconfig is
195Debug memory allocations. This will help you see whether data has been 219Debug memory allocations. This will help you see whether data has been
196initialised and not set before use etc. To see the values that get assigned 220initialised and not set before use etc. To see the values that get assigned
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist
index 3af3e65cf43b..6ebffb57e3db 100644
--- a/Documentation/SubmitChecklist
+++ b/Documentation/SubmitChecklist
@@ -84,3 +84,9 @@ kernel patches.
8424: Avoid whitespace damage such as indenting with spaces or whitespace 8424: Avoid whitespace damage such as indenting with spaces or whitespace
85 at the end of lines. You can test this by feeding the patch to 85 at the end of lines. You can test this by feeding the patch to
86 "git apply --check --whitespace=error-all" 86 "git apply --check --whitespace=error-all"
87
8825: Check your patch for general style as detailed in
89 Documentation/CodingStyle. Check for trivial violations with the
90 patch style checker prior to submission (scripts/checkpatch.pl).
91 You should be able to justify all violations that remain in
92 your patch.
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index a417b25fb1aa..d91125ab6f49 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -118,7 +118,20 @@ then only post say 15 or so at a time and wait for review and integration.
118 118
119 119
120 120
1214) Select e-mail destination. 1214) Style check your changes.
122
123Check your patch for basic style violations, details of which can be
124found in Documentation/CodingStyle. Failure to do so simply wastes
125the reviewers time and will get your patch rejected, probabally
126without even being read.
127
128At a minimum you should check your patches with the patch style
129checker prior to submission (scripts/patchcheck.pl). You should
130be able to justify all violations that remain in your patch.
131
132
133
1345) Select e-mail destination.
122 135
123Look through the MAINTAINERS file and the source code, and determine 136Look through the MAINTAINERS file and the source code, and determine
124if your change applies to a specific subsystem of the kernel, with 137if your change applies to a specific subsystem of the kernel, with
@@ -146,7 +159,7 @@ discussed should the patch then be submitted to Linus.
146 159
147 160
148 161
1495) Select your CC (e-mail carbon copy) list. 1626) Select your CC (e-mail carbon copy) list.
150 163
151Unless you have a reason NOT to do so, CC linux-kernel@vger.kernel.org. 164Unless you have a reason NOT to do so, CC linux-kernel@vger.kernel.org.
152 165
@@ -187,8 +200,7 @@ URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/>
187 200
188 201
189 202
190 2037) No MIME, no links, no compression, no attachments. Just plain text.
1916) No MIME, no links, no compression, no attachments. Just plain text.
192 204
193Linus and other kernel developers need to be able to read and comment 205Linus and other kernel developers need to be able to read and comment
194on the changes you are submitting. It is important for a kernel 206on the changes you are submitting. It is important for a kernel
@@ -223,9 +235,9 @@ pref("mailnews.display.disable_format_flowed_support", true);
223 235
224 236
225 237
2267) E-mail size. 2388) E-mail size.
227 239
228When sending patches to Linus, always follow step #6. 240When sending patches to Linus, always follow step #7.
229 241
230Large changes are not appropriate for mailing lists, and some 242Large changes are not appropriate for mailing lists, and some
231maintainers. If your patch, uncompressed, exceeds 40 kB in size, 243maintainers. If your patch, uncompressed, exceeds 40 kB in size,
@@ -234,7 +246,7 @@ server, and provide instead a URL (link) pointing to your patch.
234 246
235 247
236 248
2378) Name your kernel version. 2499) Name your kernel version.
238 250
239It is important to note, either in the subject line or in the patch 251It is important to note, either in the subject line or in the patch
240description, the kernel version to which this patch applies. 252description, the kernel version to which this patch applies.
@@ -244,7 +256,7 @@ Linus will not apply it.
244 256
245 257
246 258
2479) Don't get discouraged. Re-submit. 25910) Don't get discouraged. Re-submit.
248 260
249After you have submitted your change, be patient and wait. If Linus 261After you have submitted your change, be patient and wait. If Linus
250likes your change and applies it, it will appear in the next version 262likes your change and applies it, it will appear in the next version
@@ -270,7 +282,7 @@ When in doubt, solicit comments on linux-kernel mailing list.
270 282
271 283
272 284
27310) Include PATCH in the subject 28511) Include PATCH in the subject
274 286
275Due to high e-mail traffic to Linus, and to linux-kernel, it is common 287Due to high e-mail traffic to Linus, and to linux-kernel, it is common
276convention to prefix your subject line with [PATCH]. This lets Linus 288convention to prefix your subject line with [PATCH]. This lets Linus
@@ -279,7 +291,7 @@ e-mail discussions.
279 291
280 292
281 293
28211) Sign your work 29412) Sign your work
283 295
284To improve tracking of who did what, especially with patches that can 296To improve tracking of who did what, especially with patches that can
285percolate to their final resting place in the kernel through several 297percolate to their final resting place in the kernel through several
@@ -328,7 +340,8 @@ now, but you can do this to mark internal company procedures or just
328point out some special detail about the sign-off. 340point out some special detail about the sign-off.
329 341
330 342
33112) The canonical patch format 343
34413) The canonical patch format
332 345
333The canonical patch subject line is: 346The canonical patch subject line is:
334 347
@@ -427,6 +440,10 @@ section Linus Computer Science 101.
427Nuff said. If your code deviates too much from this, it is likely 440Nuff said. If your code deviates too much from this, it is likely
428to be rejected without further review, and without comment. 441to be rejected without further review, and without comment.
429 442
443Check your patches with the patch style checker prior to submission
444(scripts/checkpatch.pl). You should be able to justify all
445violations that remain in your patch.
446
430 447
431 448
4322) #ifdefs are ugly 4492) #ifdefs are ugly
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 5c8695a3d139..49ae1ea9e868 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -62,7 +62,7 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
62What: old NCR53C9x driver 62What: old NCR53C9x driver
63When: October 2007 63When: October 2007
64Why: Replaced by the much better esp_scsi driver. Actual low-level 64Why: Replaced by the much better esp_scsi driver. Actual low-level
65 driver can ported over almost trivially. 65 driver can be ported over almost trivially.
66Who: David Miller <davem@davemloft.net> 66Who: David Miller <davem@davemloft.net>
67 Christoph Hellwig <hch@lst.de> 67 Christoph Hellwig <hch@lst.de>
68 68
@@ -70,6 +70,7 @@ Who: David Miller <davem@davemloft.net>
70 70
71What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. 71What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
72When: December 2006 72When: December 2006
73Files: include/linux/video_decoder.h
73Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6 74Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
74 series. The old API have lots of drawbacks and don't provide enough 75 series. The old API have lots of drawbacks and don't provide enough
75 means to work with all video and audio standards. The newer API is 76 means to work with all video and audio standards. The newer API is
diff --git a/Documentation/hrtimer/timer_stats.txt b/Documentation/hrtimer/timer_stats.txt
index 27f782e3593f..22b0814d0ad0 100644
--- a/Documentation/hrtimer/timer_stats.txt
+++ b/Documentation/hrtimer/timer_stats.txt
@@ -2,9 +2,10 @@ timer_stats - timer usage statistics
2------------------------------------ 2------------------------------------
3 3
4timer_stats is a debugging facility to make the timer (ab)usage in a Linux 4timer_stats is a debugging facility to make the timer (ab)usage in a Linux
5system visible to kernel and userspace developers. It is not intended for 5system visible to kernel and userspace developers. If enabled in the config
6production usage as it adds significant overhead to the (hr)timer code and the 6but not used it has almost zero runtime overhead, and a relatively small
7(hr)timer data structures. 7data structure overhead. Even if collection is enabled runtime all the
8locking is per-CPU and lookup is hashed.
8 9
9timer_stats should be used by kernel and userspace developers to verify that 10timer_stats should be used by kernel and userspace developers to verify that
10their code does not make unduly use of timers. This helps to avoid unnecessary 11their code does not make unduly use of timers. This helps to avoid unnecessary
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c
index 3153167b41c3..d485256ee1ce 100644
--- a/Documentation/ia64/aliasing-test.c
+++ b/Documentation/ia64/aliasing-test.c
@@ -197,7 +197,7 @@ skip:
197 return rc; 197 return rc;
198} 198}
199 199
200main() 200int main()
201{ 201{
202 int rc; 202 int rc;
203 203
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index aae2282600ca..ce91560229f5 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1132,9 +1132,9 @@ and is between 256 and 4096 characters. It is defined in the file
1132 when set. 1132 when set.
1133 Format: <int> 1133 Format: <int>
1134 1134
1135 noaliencache [MM, NUMA] Disables the allcoation of alien caches in 1135 noaliencache [MM, NUMA, SLAB] Disables the allocation of alien
1136 the slab allocator. Saves per-node memory, but will 1136 caches in the slab allocator. Saves per-node memory,
1137 impact performance on real NUMA hardware. 1137 but will impact performance.
1138 1138
1139 noalign [KNL,ARM] 1139 noalign [KNL,ARM]
1140 1140
@@ -1613,6 +1613,37 @@ and is between 256 and 4096 characters. It is defined in the file
1613 1613
1614 slram= [HW,MTD] 1614 slram= [HW,MTD]
1615 1615
1616 slub_debug [MM, SLUB]
1617 Enabling slub_debug allows one to determine the culprit
1618 if slab objects become corrupted. Enabling slub_debug
1619 creates guard zones around objects and poisons objects
1620 when not in use. Also tracks the last alloc / free.
1621 For more information see Documentation/vm/slub.txt.
1622
1623 slub_max_order= [MM, SLUB]
1624 Determines the maximum allowed order for slabs. Setting
1625 this too high may cause fragmentation.
1626 For more information see Documentation/vm/slub.txt.
1627
1628 slub_min_objects= [MM, SLUB]
1629 The minimum objects per slab. SLUB will increase the
1630 slab order up to slub_max_order to generate a
1631 sufficiently big slab to satisfy the number of objects.
1632 The higher the number of objects the smaller the overhead
1633 of tracking slabs.
1634 For more information see Documentation/vm/slub.txt.
1635
1636 slub_min_order= [MM, SLUB]
1637 Determines the mininum page order for slabs. Must be
1638 lower than slub_max_order
1639 For more information see Documentation/vm/slub.txt.
1640
1641 slub_nomerge [MM, SLUB]
1642 Disable merging of slabs of similar size. May be
1643 necessary if there is some reason to distinguish
1644 allocs to different slabs.
1645 For more information see Documentation/vm/slub.txt.
1646
1616 smart2= [HW] 1647 smart2= [HW]
1617 Format: <io1>[,<io2>[,...,<io8>]] 1648 Format: <io1>[,<io2>[,...,<io8>]]
1618 1649
diff --git a/Documentation/networking/xfrm_sysctl.txt b/Documentation/networking/xfrm_sysctl.txt
new file mode 100644
index 000000000000..5bbd16792fe1
--- /dev/null
+++ b/Documentation/networking/xfrm_sysctl.txt
@@ -0,0 +1,4 @@
1/proc/sys/net/core/xfrm_* Variables:
2
3xfrm_acq_expires - INTEGER
4 default 30 - hard timeout in seconds for acquire requests
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 57b878cc393c..355ff0a2bb7c 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -917,6 +917,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
917 ref Reference board, base config 917 ref Reference board, base config
918 m2-2 Some Gateway MX series laptops 918 m2-2 Some Gateway MX series laptops
919 m6 Some Gateway NX series laptops 919 m6 Some Gateway NX series laptops
920 pa6 Gateway NX860 series
920 921
921 STAC9227/9228/9229/927x 922 STAC9227/9228/9229/927x
922 ref Reference board 923 ref Reference board
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt
index 727c8d81aeaf..1523320abd87 100644
--- a/Documentation/vm/slub.txt
+++ b/Documentation/vm/slub.txt
@@ -1,13 +1,9 @@
1Short users guide for SLUB 1Short users guide for SLUB
2-------------------------- 2--------------------------
3 3
4First of all slub should transparently replace SLAB. If you enable
5SLUB then everything should work the same (Note the word "should".
6There is likely not much value in that word at this point).
7
8The basic philosophy of SLUB is very different from SLAB. SLAB 4The basic philosophy of SLUB is very different from SLAB. SLAB
9requires rebuilding the kernel to activate debug options for all 5requires rebuilding the kernel to activate debug options for all
10SLABS. SLUB always includes full debugging but its off by default. 6slab caches. SLUB always includes full debugging but it is off by default.
11SLUB can enable debugging only for selected slabs in order to avoid 7SLUB can enable debugging only for selected slabs in order to avoid
12an impact on overall system performance which may make a bug more 8an impact on overall system performance which may make a bug more
13difficult to find. 9difficult to find.
@@ -76,13 +72,28 @@ of objects.
76Careful with tracing: It may spew out lots of information and never stop if 72Careful with tracing: It may spew out lots of information and never stop if
77used on the wrong slab. 73used on the wrong slab.
78 74
79SLAB Merging 75Slab merging
80------------ 76------------
81 77
82If no debugging is specified then SLUB may merge similar slabs together 78If no debug options are specified then SLUB may merge similar slabs together
83in order to reduce overhead and increase cache hotness of objects. 79in order to reduce overhead and increase cache hotness of objects.
84slabinfo -a displays which slabs were merged together. 80slabinfo -a displays which slabs were merged together.
85 81
82Slab validation
83---------------
84
85SLUB can validate all object if the kernel was booted with slub_debug. In
86order to do so you must have the slabinfo tool. Then you can do
87
88slabinfo -v
89
90which will test all objects. Output will be generated to the syslog.
91
92This also works in a more limited way if boot was without slab debug.
93In that case slabinfo -v simply tests all reachable objects. Usually
94these are in the cpu slabs and the partial slabs. Full slabs are not
95tracked by SLUB in a non debug situation.
96
86Getting more performance 97Getting more performance
87------------------------ 98------------------------
88 99
@@ -91,9 +102,9 @@ list_lock once in a while to deal with partial slabs. That overhead is
91governed by the order of the allocation for each slab. The allocations 102governed by the order of the allocation for each slab. The allocations
92can be influenced by kernel parameters: 103can be influenced by kernel parameters:
93 104
94slub_min_objects=x (default 8) 105slub_min_objects=x (default 4)
95slub_min_order=x (default 0) 106slub_min_order=x (default 0)
96slub_max_order=x (default 4) 107slub_max_order=x (default 1)
97 108
98slub_min_objects allows to specify how many objects must at least fit 109slub_min_objects allows to specify how many objects must at least fit
99into one slab in order for the allocation order to be acceptable. 110into one slab in order for the allocation order to be acceptable.
@@ -109,5 +120,107 @@ longer be checked. This is useful to avoid SLUB trying to generate
109super large order pages to fit slub_min_objects of a slab cache with 120super large order pages to fit slub_min_objects of a slab cache with
110large object sizes into one high order page. 121large object sizes into one high order page.
111 122
112 123SLUB Debug output
113Christoph Lameter, <clameter@sgi.com>, April 10, 2007 124-----------------
125
126Here is a sample of slub debug output:
127
128*** SLUB kmalloc-8: Redzone Active@0xc90f6d20 slab 0xc528c530 offset=3360 flags=0x400000c3 inuse=61 freelist=0xc90f6d58
129 Bytes b4 0xc90f6d10: 00 00 00 00 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a ........ZZZZZZZZ
130 Object 0xc90f6d20: 31 30 31 39 2e 30 30 35 1019.005
131 Redzone 0xc90f6d28: 00 cc cc cc .
132FreePointer 0xc90f6d2c -> 0xc90f6d58
133Last alloc: get_modalias+0x61/0xf5 jiffies_ago=53 cpu=1 pid=554
134Filler 0xc90f6d50: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ
135 [<c010523d>] dump_trace+0x63/0x1eb
136 [<c01053df>] show_trace_log_lvl+0x1a/0x2f
137 [<c010601d>] show_trace+0x12/0x14
138 [<c0106035>] dump_stack+0x16/0x18
139 [<c017e0fa>] object_err+0x143/0x14b
140 [<c017e2cc>] check_object+0x66/0x234
141 [<c017eb43>] __slab_free+0x239/0x384
142 [<c017f446>] kfree+0xa6/0xc6
143 [<c02e2335>] get_modalias+0xb9/0xf5
144 [<c02e23b7>] dmi_dev_uevent+0x27/0x3c
145 [<c027866a>] dev_uevent+0x1ad/0x1da
146 [<c0205024>] kobject_uevent_env+0x20a/0x45b
147 [<c020527f>] kobject_uevent+0xa/0xf
148 [<c02779f1>] store_uevent+0x4f/0x58
149 [<c027758e>] dev_attr_store+0x29/0x2f
150 [<c01bec4f>] sysfs_write_file+0x16e/0x19c
151 [<c0183ba7>] vfs_write+0xd1/0x15a
152 [<c01841d7>] sys_write+0x3d/0x72
153 [<c0104112>] sysenter_past_esp+0x5f/0x99
154 [<b7f7b410>] 0xb7f7b410
155 =======================
156@@@ SLUB kmalloc-8: Restoring redzone (0xcc) from 0xc90f6d28-0xc90f6d2b
157
158
159
160If SLUB encounters a corrupted object then it will perform the following
161actions:
162
1631. Isolation and report of the issue
164
165This will be a message in the system log starting with
166
167*** SLUB <slab cache affected>: <What went wrong>@<object address>
168offset=<offset of object into slab> flags=<slabflags>
169inuse=<objects in use in this slab> freelist=<first free object in slab>
170
1712. Report on how the problem was dealt with in order to ensure the continued
172operation of the system.
173
174These are messages in the system log beginning with
175
176@@@ SLUB <slab cache affected>: <corrective action taken>
177
178
179In the above sample SLUB found that the Redzone of an active object has
180been overwritten. Here a string of 8 characters was written into a slab that
181has the length of 8 characters. However, a 8 character string needs a
182terminating 0. That zero has overwritten the first byte of the Redzone field.
183After reporting the details of the issue encountered the @@@ SLUB message
184tell us that SLUB has restored the redzone to its proper value and then
185system operations continue.
186
187Various types of lines can follow the @@@ SLUB line:
188
189Bytes b4 <address> : <bytes>
190 Show a few bytes before the object where the problem was detected.
191 Can be useful if the corruption does not stop with the start of the
192 object.
193
194Object <address> : <bytes>
195 The bytes of the object. If the object is inactive then the bytes
196 typically contain poisoning values. Any non-poison value shows a
197 corruption by a write after free.
198
199Redzone <address> : <bytes>
200 The redzone following the object. The redzone is used to detect
201 writes after the object. All bytes should always have the same
202 value. If there is any deviation then it is due to a write after
203 the object boundary.
204
205Freepointer
206 The pointer to the next free object in the slab. May become
207 corrupted if overwriting continues after the red zone.
208
209Last alloc:
210Last free:
211 Shows the address from which the object was allocated/freed last.
212 We note the pid, the time and the CPU that did so. This is usually
213 the most useful information to figure out where things went wrong.
214 Here get_modalias() did an kmalloc(8) instead of a kmalloc(9).
215
216Filler <address> : <bytes>
217 Unused data to fill up the space in order to get the next object
218 properly aligned. In the debug case we make sure that there are
219 at least 4 bytes of filler. This allow for the detection of writes
220 before the object.
221
222Following the filler will be a stackdump. That stackdump describes the
223location where the error was detected. The cause of the corruption is more
224likely to be found by looking at the information about the last alloc / free.
225
226Christoph Lameter, <clameter@sgi.com>, May 23, 2007