aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/BUG-HUNTING24
-rw-r--r--Documentation/CodingStyle49
-rw-r--r--Documentation/DocBook/gadget.tmpl2
-rw-r--r--Documentation/DocBook/usb.tmpl28
-rw-r--r--Documentation/HOWTO20
-rw-r--r--Documentation/SubmitChecklist6
-rw-r--r--Documentation/SubmittingPatches39
-rw-r--r--Documentation/block/capability.txt15
-rw-r--r--Documentation/dontdiff42
-rw-r--r--Documentation/feature-removal-schedule.txt3
-rw-r--r--Documentation/filesystems/directory-locking5
-rw-r--r--Documentation/filesystems/porting8
-rw-r--r--Documentation/hrtimer/timer_stats.txt7
-rw-r--r--Documentation/i386/boot.txt32
-rw-r--r--Documentation/ia64/aliasing-test.c2
-rw-r--r--Documentation/initrd.txt74
-rw-r--r--Documentation/kernel-parameters.txt66
-rw-r--r--Documentation/ldm.txt21
-rw-r--r--Documentation/memory-barriers.txt98
-rw-r--r--Documentation/networking/xfrm_sysctl.txt4
-rw-r--r--Documentation/s390/cds.txt82
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--Documentation/spi/spi-summary53
-rw-r--r--Documentation/thinkpad-acpi.txt25
-rw-r--r--Documentation/vm/slub.txt135
25 files changed, 554 insertions, 287 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/CodingStyle b/Documentation/CodingStyle
index afc286775891..b49b92edb396 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -495,29 +495,40 @@ re-formatting you may want to take a look at the man page. But
495remember: "indent" is not a fix for bad programming. 495remember: "indent" is not a fix for bad programming.
496 496
497 497
498 Chapter 10: Configuration-files 498 Chapter 10: Kconfig configuration files
499 499
500For configuration options (arch/xxx/Kconfig, and all the Kconfig files), 500For all of the Kconfig* configuration files throughout the source tree,
501somewhat different indentation is used. 501the indentation is somewhat different. Lines under a "config" definition
502are indented with one tab, while help text is indented an additional two
503spaces. Example:
502 504
503Help text is indented with 2 spaces. 505config AUDIT
504 506 bool "Auditing support"
505if CONFIG_EXPERIMENTAL 507 depends on NET
506 tristate CONFIG_BOOM
507 default n
508 help
509 Apply nitroglycerine inside the keyboard (DANGEROUS)
510 bool CONFIG_CHEER
511 depends on CONFIG_BOOM
512 default y
513 help 508 help
514 Output nice messages when you explode 509 Enable auditing infrastructure that can be used with another
515endif 510 kernel subsystem, such as SELinux (which requires this for
511 logging of avc messages output). Does not do system-call
512 auditing without CONFIG_AUDITSYSCALL.
513
514Features that might still be considered unstable should be defined as
515dependent on "EXPERIMENTAL":
516
517config SLUB
518 depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT
519 bool "SLUB (Unqueued Allocator)"
520 ...
521
522while seriously dangerous features (such as write support for certain
523filesystems) should advertise this prominently in their prompt string:
524
525config ADFS_FS_RW
526 bool "ADFS write support (DANGEROUS)"
527 depends on ADFS_FS
528 ...
516 529
517Generally, CONFIG_EXPERIMENTAL should surround all options not considered 530For full documentation on the configuration files, see the file
518stable. All options that are known to trash data (experimental write- 531Documentation/kbuild/kconfig-language.txt.
519support for file-systems, for instance) should be denoted (DANGEROUS), other
520experimental options should be denoted (EXPERIMENTAL).
521 532
522 533
523 Chapter 11: Data structures 534 Chapter 11: Data structures
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index e7fc96433408..6996d977bf8f 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -52,7 +52,7 @@
52 52
53<toc></toc> 53<toc></toc>
54 54
55<chapter><title>Introduction</title> 55<chapter id="intro"><title>Introduction</title>
56 56
57<para>This document presents a Linux-USB "Gadget" 57<para>This document presents a Linux-USB "Gadget"
58kernel mode 58kernel mode
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl
index a2ebd651b05a..af293606fbe3 100644
--- a/Documentation/DocBook/usb.tmpl
+++ b/Documentation/DocBook/usb.tmpl
@@ -185,7 +185,7 @@
185 185
186 </chapter> 186 </chapter>
187 187
188<chapter><title>USB-Standard Types</title> 188<chapter id="types"><title>USB-Standard Types</title>
189 189
190 <para>In <filename>&lt;linux/usb/ch9.h&gt;</filename> you will find 190 <para>In <filename>&lt;linux/usb/ch9.h&gt;</filename> you will find
191 the USB data types defined in chapter 9 of the USB specification. 191 the USB data types defined in chapter 9 of the USB specification.
@@ -197,7 +197,7 @@
197 197
198 </chapter> 198 </chapter>
199 199
200<chapter><title>Host-Side Data Types and Macros</title> 200<chapter id="hostside"><title>Host-Side Data Types and Macros</title>
201 201
202 <para>The host side API exposes several layers to drivers, some of 202 <para>The host side API exposes several layers to drivers, some of
203 which are more necessary than others. 203 which are more necessary than others.
@@ -211,7 +211,7 @@
211 211
212 </chapter> 212 </chapter>
213 213
214 <chapter><title>USB Core APIs</title> 214 <chapter id="usbcore"><title>USB Core APIs</title>
215 215
216 <para>There are two basic I/O models in the USB API. 216 <para>There are two basic I/O models in the USB API.
217 The most elemental one is asynchronous: drivers submit requests 217 The most elemental one is asynchronous: drivers submit requests
@@ -248,7 +248,7 @@
248!Edrivers/usb/core/hub.c 248!Edrivers/usb/core/hub.c
249 </chapter> 249 </chapter>
250 250
251 <chapter><title>Host Controller APIs</title> 251 <chapter id="hcd"><title>Host Controller APIs</title>
252 252
253 <para>These APIs are only for use by host controller drivers, 253 <para>These APIs are only for use by host controller drivers,
254 most of which implement standard register interfaces such as 254 most of which implement standard register interfaces such as
@@ -285,7 +285,7 @@
285!Idrivers/usb/core/buffer.c 285!Idrivers/usb/core/buffer.c
286 </chapter> 286 </chapter>
287 287
288 <chapter> 288 <chapter id="usbfs">
289 <title>The USB Filesystem (usbfs)</title> 289 <title>The USB Filesystem (usbfs)</title>
290 290
291 <para>This chapter presents the Linux <emphasis>usbfs</emphasis>. 291 <para>This chapter presents the Linux <emphasis>usbfs</emphasis>.
@@ -317,7 +317,7 @@
317 not it has a kernel driver. 317 not it has a kernel driver.
318 </para> 318 </para>
319 319
320 <sect1> 320 <sect1 id="usbfs-files">
321 <title>What files are in "usbfs"?</title> 321 <title>What files are in "usbfs"?</title>
322 322
323 <para>Conventionally mounted at 323 <para>Conventionally mounted at
@@ -356,7 +356,7 @@
356 356
357 </sect1> 357 </sect1>
358 358
359 <sect1> 359 <sect1 id="usbfs-fstab">
360 <title>Mounting and Access Control</title> 360 <title>Mounting and Access Control</title>
361 361
362 <para>There are a number of mount options for usbfs, which will 362 <para>There are a number of mount options for usbfs, which will
@@ -439,7 +439,7 @@
439 439
440 </sect1> 440 </sect1>
441 441
442 <sect1> 442 <sect1 id="usbfs-devices">
443 <title>/proc/bus/usb/devices</title> 443 <title>/proc/bus/usb/devices</title>
444 444
445 <para>This file is handy for status viewing tools in user 445 <para>This file is handy for status viewing tools in user
@@ -473,7 +473,7 @@ for (;;) {
473 </para> 473 </para>
474 </sect1> 474 </sect1>
475 475
476 <sect1> 476 <sect1 id="usbfs-bbbddd">
477 <title>/proc/bus/usb/BBB/DDD</title> 477 <title>/proc/bus/usb/BBB/DDD</title>
478 478
479 <para>Use these files in one of these basic ways: 479 <para>Use these files in one of these basic ways:
@@ -510,7 +510,7 @@ for (;;) {
510 </sect1> 510 </sect1>
511 511
512 512
513 <sect1> 513 <sect1 id="usbfs-lifecycle">
514 <title>Life Cycle of User Mode Drivers</title> 514 <title>Life Cycle of User Mode Drivers</title>
515 515
516 <para>Such a driver first needs to find a device file 516 <para>Such a driver first needs to find a device file
@@ -565,7 +565,7 @@ for (;;) {
565 565
566 </sect1> 566 </sect1>
567 567
568 <sect1><title>The ioctl() Requests</title> 568 <sect1 id="usbfs-ioctl"><title>The ioctl() Requests</title>
569 569
570 <para>To use these ioctls, you need to include the following 570 <para>To use these ioctls, you need to include the following
571 headers in your userspace program: 571 headers in your userspace program:
@@ -604,7 +604,7 @@ for (;;) {
604 </para> 604 </para>
605 605
606 606
607 <sect2> 607 <sect2 id="usbfs-mgmt">
608 <title>Management/Status Requests</title> 608 <title>Management/Status Requests</title>
609 609
610 <para>A number of usbfs requests don't deal very directly 610 <para>A number of usbfs requests don't deal very directly
@@ -736,7 +736,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
736 736
737 </sect2> 737 </sect2>
738 738
739 <sect2> 739 <sect2 id="usbfs-sync">
740 <title>Synchronous I/O Support</title> 740 <title>Synchronous I/O Support</title>
741 741
742 <para>Synchronous requests involve the kernel blocking 742 <para>Synchronous requests involve the kernel blocking
@@ -865,7 +865,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
865 </variablelist> 865 </variablelist>
866 </sect2> 866 </sect2>
867 867
868 <sect2> 868 <sect2 id="usbfs-async">
869 <title>Asynchronous I/O Support</title> 869 <title>Asynchronous I/O Support</title>
870 870
871 <para>As mentioned above, there are situations where it may be 871 <para>As mentioned above, there are situations where it may be
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index 48123dba5e6a..ced9207bedcf 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -396,26 +396,6 @@ bugme-janitor mailing list (every change in the bugzilla is mailed here)
396 396
397 397
398 398
399Managing bug reports
400--------------------
401
402One of the best ways to put into practice your hacking skills is by fixing
403bugs reported by other people. Not only you will help to make the kernel
404more stable, you'll learn to fix real world problems and you will improve
405your skills, and other developers will be aware of your presence. Fixing
406bugs is one of the best ways to get merits among other developers, because
407not many people like wasting time fixing other people's bugs.
408
409To work in the already reported bug reports, go to http://bugzilla.kernel.org.
410If you want to be advised of the future bug reports, you can subscribe to the
411bugme-new mailing list (only new bug reports are mailed here) or to the
412bugme-janitor mailing list (every change in the bugzilla is mailed here)
413
414 http://lists.osdl.org/mailman/listinfo/bugme-new
415 http://lists.osdl.org/mailman/listinfo/bugme-janitors
416
417
418
419Mailing lists 399Mailing lists
420------------- 400-------------
421 401
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/block/capability.txt b/Documentation/block/capability.txt
new file mode 100644
index 000000000000..2f1729424ef4
--- /dev/null
+++ b/Documentation/block/capability.txt
@@ -0,0 +1,15 @@
1Generic Block Device Capability
2===============================================================================
3This file documents the sysfs file block/<disk>/capability
4
5capability is a hex word indicating which capabilities a specific disk
6supports. For more information on bits not listed here, see
7include/linux/genhd.h
8
9Capability Value
10-------------------------------------------------------------------------------
11GENHD_FL_MEDIA_CHANGE_NOTIFY 4
12 When this bit is set, the disk supports Asynchronous Notification
13 of media change events. These events will be broadcast to user
14 space via kernel uevent.
15
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index 64e9f6c4826b..595a5ea4c690 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -10,10 +10,12 @@
10*.grp 10*.grp
11*.gz 11*.gz
12*.html 12*.html
13*.i
13*.jpeg 14*.jpeg
14*.ko 15*.ko
15*.log 16*.log
16*.lst 17*.lst
18*.moc
17*.mod.c 19*.mod.c
18*.o 20*.o
19*.orig 21*.orig
@@ -25,6 +27,9 @@
25*.s 27*.s
26*.sgml 28*.sgml
27*.so 29*.so
30*.symtypes
31*.tab.c
32*.tab.h
28*.tex 33*.tex
29*.ver 34*.ver
30*.xml 35*.xml
@@ -32,9 +37,13 @@
32*_vga16.c 37*_vga16.c
33*cscope* 38*cscope*
34*~ 39*~
40*.9
41*.9.gz
35.* 42.*
36.cscope 43.cscope
3753c700_d.h 4453c700_d.h
4553c7xx_d.h
4653c7xx_u.h
3853c8xx_d.h* 4753c8xx_d.h*
39BitKeeper 48BitKeeper
40COPYING 49COPYING
@@ -70,9 +79,11 @@ bzImage*
70classlist.h* 79classlist.h*
71comp*.log 80comp*.log
72compile.h* 81compile.h*
82conf
73config 83config
74config-* 84config-*
75config_data.h* 85config_data.h*
86config_data.gz*
76conmakehash 87conmakehash
77consolemap_deftbl.c* 88consolemap_deftbl.c*
78crc32table.h* 89crc32table.h*
@@ -81,18 +92,23 @@ defkeymap.c*
81devlist.h* 92devlist.h*
82docproc 93docproc
83dummy_sym.c* 94dummy_sym.c*
95elf2ecoff
84elfconfig.h* 96elfconfig.h*
85filelist 97filelist
86fixdep 98fixdep
87fore200e_mkfirm 99fore200e_mkfirm
88fore200e_pca_fw.c* 100fore200e_pca_fw.c*
101gconf
89gen-devlist 102gen-devlist
90gen-kdb_cmds.c* 103gen-kdb_cmds.c*
91gen_crc32table 104gen_crc32table
92gen_init_cpio 105gen_init_cpio
93genksyms 106genksyms
94gentbl 107gentbl
108*_gray256.c
95ikconfig.h* 109ikconfig.h*
110initramfs_data.cpio
111initramfs_data.cpio.gz
96initramfs_list 112initramfs_list
97kallsyms 113kallsyms
98kconfig 114kconfig
@@ -100,19 +116,30 @@ kconfig.tk
100keywords.c* 116keywords.c*
101ksym.c* 117ksym.c*
102ksym.h* 118ksym.h*
119kxgettext
120lkc_defs.h
103lex.c* 121lex.c*
122lex.*.c
123lk201-map.c
104logo_*.c 124logo_*.c
105logo_*_clut224.c 125logo_*_clut224.c
106logo_*_mono.c 126logo_*_mono.c
107lxdialog 127lxdialog
108mach-types 128mach-types
109mach-types.h 129mach-types.h
130machtypes.h
110make_times_h 131make_times_h
111map 132map
112maui_boot.h 133maui_boot.h
134mconf
135miboot*
113mk_elfconfig 136mk_elfconfig
137mkboot
138mkbugboot
114mkdep 139mkdep
140mkprep
115mktables 141mktables
142mktree
116modpost 143modpost
117modversions.h* 144modversions.h*
118offset.h 145offset.h
@@ -120,18 +147,28 @@ offsets.h
120oui.c* 147oui.c*
121parse.c* 148parse.c*
122parse.h* 149parse.h*
150patches*
151pca200e.bin
152pca200e_ecd.bin2
153piggy.gz
154piggyback
123pnmtologo 155pnmtologo
124ppc_defs.h* 156ppc_defs.h*
125promcon_tbl.c* 157promcon_tbl.c*
126pss_boot.h 158pss_boot.h
159qconf
127raid6altivec*.c 160raid6altivec*.c
128raid6int*.c 161raid6int*.c
129raid6tables.c 162raid6tables.c
163relocs
164series
130setup 165setup
131sim710_d.h* 166sim710_d.h*
167sImage
132sm_tbl* 168sm_tbl*
133split-include 169split-include
134tags 170tags
171tftpboot.img
135times.h* 172times.h*
136tkparse 173tkparse
137trix_boot.h 174trix_boot.h
@@ -139,8 +176,11 @@ utsrelease.h*
139version.h* 176version.h*
140vmlinux 177vmlinux
141vmlinux-* 178vmlinux-*
179vmlinux.aout
142vmlinux.lds 180vmlinux.lds
143vsyscall.lds 181vsyscall.lds
144wanxlfw.inc 182wanxlfw.inc
145uImage 183uImage
146zImage 184unifdef
185zImage*
186zconf.hash.c
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/filesystems/directory-locking b/Documentation/filesystems/directory-locking
index d7099a9266fb..ff7b611abf33 100644
--- a/Documentation/filesystems/directory-locking
+++ b/Documentation/filesystems/directory-locking
@@ -1,5 +1,6 @@
1 Locking scheme used for directory operations is based on two 1 Locking scheme used for directory operations is based on two
2kinds of locks - per-inode (->i_sem) and per-filesystem (->s_vfs_rename_sem). 2kinds of locks - per-inode (->i_mutex) and per-filesystem
3(->s_vfs_rename_mutex).
3 4
4 For our purposes all operations fall in 5 classes: 5 For our purposes all operations fall in 5 classes:
5 6
@@ -63,7 +64,7 @@ objects - A < B iff A is an ancestor of B.
63attempt to acquire some lock and already holds at least one lock. Let's 64attempt to acquire some lock and already holds at least one lock. Let's
64consider the set of contended locks. First of all, filesystem lock is 65consider the set of contended locks. First of all, filesystem lock is
65not contended, since any process blocked on it is not holding any locks. 66not contended, since any process blocked on it is not holding any locks.
66Thus all processes are blocked on ->i_sem. 67Thus all processes are blocked on ->i_mutex.
67 68
68 Non-directory objects are not contended due to (3). Thus link 69 Non-directory objects are not contended due to (3). Thus link
69creation can't be a part of deadlock - it can't be blocked on source 70creation can't be a part of deadlock - it can't be blocked on source
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 5531694059ab..dac45c92d872 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -107,7 +107,7 @@ free to drop it...
107--- 107---
108[informational] 108[informational]
109 109
110->link() callers hold ->i_sem on the object we are linking to. Some of your 110->link() callers hold ->i_mutex on the object we are linking to. Some of your
111problems might be over... 111problems might be over...
112 112
113--- 113---
@@ -130,9 +130,9 @@ went in - and hadn't been documented ;-/). Just remove it from fs_flags
130--- 130---
131[mandatory] 131[mandatory]
132 132
133->setattr() is called without BKL now. Caller _always_ holds ->i_sem, so 133->setattr() is called without BKL now. Caller _always_ holds ->i_mutex, so
134watch for ->i_sem-grabbing code that might be used by your ->setattr(). 134watch for ->i_mutex-grabbing code that might be used by your ->setattr().
135Callers of notify_change() need ->i_sem now. 135Callers of notify_change() need ->i_mutex now.
136 136
137--- 137---
138[recommended] 138[recommended]
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/i386/boot.txt b/Documentation/i386/boot.txt
index 66fa67fec2a7..35985b34d5a6 100644
--- a/Documentation/i386/boot.txt
+++ b/Documentation/i386/boot.txt
@@ -2,7 +2,7 @@
2 ---------------------------- 2 ----------------------------
3 3
4 H. Peter Anvin <hpa@zytor.com> 4 H. Peter Anvin <hpa@zytor.com>
5 Last update 2007-05-16 5 Last update 2007-05-23
6 6
7On the i386 platform, the Linux kernel uses a rather complicated boot 7On the i386 platform, the Linux kernel uses a rather complicated boot
8convention. This has evolved partially due to historical aspects, as 8convention. This has evolved partially due to historical aspects, as
@@ -202,6 +202,8 @@ All general purpose boot loaders should write the fields marked
202nonstandard address should fill in the fields marked (reloc); other 202nonstandard address should fill in the fields marked (reloc); other
203boot loaders can ignore those fields. 203boot loaders can ignore those fields.
204 204
205The byte order of all fields is littleendian (this is x86, after all.)
206
205Field name: setup_secs 207Field name: setup_secs
206Type: read 208Type: read
207Offset/size: 0x1f1/1 209Offset/size: 0x1f1/1
@@ -280,14 +282,16 @@ Type: read
280Offset/size: 0x206/2 282Offset/size: 0x206/2
281Protocol: 2.00+ 283Protocol: 2.00+
282 284
283 Contains the boot protocol version, e.g. 0x0204 for version 2.04. 285 Contains the boot protocol version, in (major << 8)+minor format,
286 e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version
287 10.17.
284 288
285Field name: readmode_swtch 289Field name: readmode_swtch
286Type: modify (optional) 290Type: modify (optional)
287Offset/size: 0x208/4 291Offset/size: 0x208/4
288Protocol: 2.00+ 292Protocol: 2.00+
289 293
290 Boot loader hook (see separate chapter.) 294 Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
291 295
292Field name: start_sys 296Field name: start_sys
293Type: read 297Type: read
@@ -304,10 +308,17 @@ Protocol: 2.00+
304 If set to a nonzero value, contains a pointer to a NUL-terminated 308 If set to a nonzero value, contains a pointer to a NUL-terminated
305 human-readable kernel version number string, less 0x200. This can 309 human-readable kernel version number string, less 0x200. This can
306 be used to display the kernel version to the user. This value 310 be used to display the kernel version to the user. This value
307 should be less than (0x200*setup_sects). For example, if this value 311 should be less than (0x200*setup_sects).
308 is set to 0x1c00, the kernel version number string can be found at 312
309 offset 0x1e00 in the kernel file. This is a valid value if and only 313 For example, if this value is set to 0x1c00, the kernel version
310 if the "setup_sects" field contains the value 14 or higher. 314 number string can be found at offset 0x1e00 in the kernel file.
315 This is a valid value if and only if the "setup_sects" field
316 contains the value 15 or higher, as:
317
318 0x1c00 < 15*0x200 (= 0x1e00) but
319 0x1c00 >= 14*0x200 (= 0x1c00)
320
321 0x1c00 >> 9 = 14, so the minimum value for setup_secs is 15.
311 322
312Field name: type_of_loader 323Field name: type_of_loader
313Type: write (obligatory) 324Type: write (obligatory)
@@ -377,7 +388,7 @@ Protocol: 2.00+
377 388
378 This field can be modified for two purposes: 389 This field can be modified for two purposes:
379 390
380 1. as a boot loader hook (see separate chapter.) 391 1. as a boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
381 392
382 2. if a bootloader which does not install a hook loads a 393 2. if a bootloader which does not install a hook loads a
383 relocatable kernel at a nonstandard address it will have to modify 394 relocatable kernel at a nonstandard address it will have to modify
@@ -715,7 +726,7 @@ switched off, especially if the loaded kernel has the floppy driver as
715a demand-loaded module! 726a demand-loaded module!
716 727
717 728
718**** ADVANCED BOOT TIME HOOKS 729**** ADVANCED BOOT LOADER HOOKS
719 730
720If the boot loader runs in a particularly hostile environment (such as 731If the boot loader runs in a particularly hostile environment (such as
721LOADLIN, which runs under DOS) it may be impossible to follow the 732LOADLIN, which runs under DOS) it may be impossible to follow the
@@ -740,4 +751,5 @@ IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and
740 set them up to BOOT_DS (0x18) yourself. 751 set them up to BOOT_DS (0x18) yourself.
741 752
742 After completing your hook, you should jump to the address 753 After completing your hook, you should jump to the address
743 that was in this field before your boot loader overwrote it. 754 that was in this field before your boot loader overwrote it
755 (relocated, if appropriate.)
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/initrd.txt b/Documentation/initrd.txt
index 15f1b35deb34..d3dc505104da 100644
--- a/Documentation/initrd.txt
+++ b/Documentation/initrd.txt
@@ -27,16 +27,20 @@ When using initrd, the system typically boots as follows:
27 1) the boot loader loads the kernel and the initial RAM disk 27 1) the boot loader loads the kernel and the initial RAM disk
28 2) the kernel converts initrd into a "normal" RAM disk and 28 2) the kernel converts initrd into a "normal" RAM disk and
29 frees the memory used by initrd 29 frees the memory used by initrd
30 3) initrd is mounted read-write as root 30 3) if the root device is not /dev/ram0, the old (deprecated)
31 4) /linuxrc is executed (this can be any valid executable, including 31 change_root procedure is followed. see the "Obsolete root change
32 mechanism" section below.
33 4) root device is mounted. if it is /dev/ram0, the initrd image is
34 then mounted as root
35 5) /sbin/init is executed (this can be any valid executable, including
32 shell scripts; it is run with uid 0 and can do basically everything 36 shell scripts; it is run with uid 0 and can do basically everything
33 init can do) 37 init can do).
34 5) linuxrc mounts the "real" root file system 38 6) init mounts the "real" root file system
35 6) linuxrc places the root file system at the root directory using the 39 7) init places the root file system at the root directory using the
36 pivot_root system call 40 pivot_root system call
37 7) the usual boot sequence (e.g. invocation of /sbin/init) is performed 41 8) init execs the /sbin/init on the new root filesystem, performing
38 on the root file system 42 the usual boot sequence
39 8) the initrd file system is removed 43 9) the initrd file system is removed
40 44
41Note that changing the root directory does not involve unmounting it. 45Note that changing the root directory does not involve unmounting it.
42It is therefore possible to leave processes running on initrd during that 46It is therefore possible to leave processes running on initrd during that
@@ -70,7 +74,7 @@ initrd adds the following new options:
70 root=/dev/ram0 74 root=/dev/ram0
71 75
72 initrd is mounted as root, and the normal boot procedure is followed, 76 initrd is mounted as root, and the normal boot procedure is followed,
73 with the RAM disk still mounted as root. 77 with the RAM disk mounted as root.
74 78
75Compressed cpio images 79Compressed cpio images
76---------------------- 80----------------------
@@ -137,11 +141,11 @@ We'll describe the loopback device method:
137 # mkdir /mnt/dev 141 # mkdir /mnt/dev
138 # mknod /mnt/dev/console c 5 1 142 # mknod /mnt/dev/console c 5 1
139 5) copy all the files that are needed to properly use the initrd 143 5) copy all the files that are needed to properly use the initrd
140 environment. Don't forget the most important file, /linuxrc 144 environment. Don't forget the most important file, /sbin/init
141 Note that /linuxrc's permissions must include "x" (execute). 145 Note that /sbin/init's permissions must include "x" (execute).
142 6) correct operation the initrd environment can frequently be tested 146 6) correct operation the initrd environment can frequently be tested
143 even without rebooting with the command 147 even without rebooting with the command
144 # chroot /mnt /linuxrc 148 # chroot /mnt /sbin/init
145 This is of course limited to initrds that do not interfere with the 149 This is of course limited to initrds that do not interfere with the
146 general system state (e.g. by reconfiguring network interfaces, 150 general system state (e.g. by reconfiguring network interfaces,
147 overwriting mounted devices, trying to start already running demons, 151 overwriting mounted devices, trying to start already running demons,
@@ -154,7 +158,7 @@ We'll describe the loopback device method:
154 # gzip -9 initrd 158 # gzip -9 initrd
155 159
156For experimenting with initrd, you may want to take a rescue floppy and 160For experimenting with initrd, you may want to take a rescue floppy and
157only add a symbolic link from /linuxrc to /bin/sh. Alternatively, you 161only add a symbolic link from /sbin/init to /bin/sh. Alternatively, you
158can try the experimental newlib environment [2] to create a small 162can try the experimental newlib environment [2] to create a small
159initrd. 163initrd.
160 164
@@ -163,15 +167,14 @@ boot loaders support initrd. Since the boot process is still compatible
163with an older mechanism, the following boot command line parameters 167with an older mechanism, the following boot command line parameters
164have to be given: 168have to be given:
165 169
166 root=/dev/ram0 init=/linuxrc rw 170 root=/dev/ram0 rw
167 171
168(rw is only necessary if writing to the initrd file system.) 172(rw is only necessary if writing to the initrd file system.)
169 173
170With LOADLIN, you simply execute 174With LOADLIN, you simply execute
171 175
172 LOADLIN <kernel> initrd=<disk_image> 176 LOADLIN <kernel> initrd=<disk_image>
173e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 177e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 rw
174 init=/linuxrc rw
175 178
176With LILO, you add the option INITRD=<path> to either the global section 179With LILO, you add the option INITRD=<path> to either the global section
177or to the section of the respective kernel in /etc/lilo.conf, and pass 180or to the section of the respective kernel in /etc/lilo.conf, and pass
@@ -179,7 +182,7 @@ the options using APPEND, e.g.
179 182
180 image = /bzImage 183 image = /bzImage
181 initrd = /boot/initrd.gz 184 initrd = /boot/initrd.gz
182 append = "root=/dev/ram0 init=/linuxrc rw" 185 append = "root=/dev/ram0 rw"
183 186
184and run /sbin/lilo 187and run /sbin/lilo
185 188
@@ -191,7 +194,7 @@ Now you can boot and enjoy using initrd.
191Changing the root device 194Changing the root device
192------------------------ 195------------------------
193 196
194When finished with its duties, linuxrc typically changes the root device 197When finished with its duties, init typically changes the root device
195and proceeds with starting the Linux system on the "real" root device. 198and proceeds with starting the Linux system on the "real" root device.
196 199
197The procedure involves the following steps: 200The procedure involves the following steps:
@@ -217,7 +220,7 @@ must exist before calling pivot_root. Example:
217# mkdir initrd 220# mkdir initrd
218# pivot_root . initrd 221# pivot_root . initrd
219 222
220Now, the linuxrc process may still access the old root via its 223Now, the init process may still access the old root via its
221executable, shared libraries, standard input/output/error, and its 224executable, shared libraries, standard input/output/error, and its
222current root directory. All these references are dropped by the 225current root directory. All these references are dropped by the
223following command: 226following command:
@@ -249,10 +252,6 @@ disk can be freed:
249It is also possible to use initrd with an NFS-mounted root, see the 252It is also possible to use initrd with an NFS-mounted root, see the
250pivot_root(8) man page for details. 253pivot_root(8) man page for details.
251 254
252Note: if linuxrc or any program exec'ed from it terminates for some
253reason, the old change_root mechanism is invoked (see section "Obsolete
254root change mechanism").
255
256 255
257Usage scenarios 256Usage scenarios
258--------------- 257---------------
@@ -264,15 +263,15 @@ as follows:
264 1) system boots from floppy or other media with a minimal kernel 263 1) system boots from floppy or other media with a minimal kernel
265 (e.g. support for RAM disks, initrd, a.out, and the Ext2 FS) and 264 (e.g. support for RAM disks, initrd, a.out, and the Ext2 FS) and
266 loads initrd 265 loads initrd
267 2) /linuxrc determines what is needed to (1) mount the "real" root FS 266 2) /sbin/init determines what is needed to (1) mount the "real" root FS
268 (i.e. device type, device drivers, file system) and (2) the 267 (i.e. device type, device drivers, file system) and (2) the
269 distribution media (e.g. CD-ROM, network, tape, ...). This can be 268 distribution media (e.g. CD-ROM, network, tape, ...). This can be
270 done by asking the user, by auto-probing, or by using a hybrid 269 done by asking the user, by auto-probing, or by using a hybrid
271 approach. 270 approach.
272 3) /linuxrc loads the necessary kernel modules 271 3) /sbin/init loads the necessary kernel modules
273 4) /linuxrc creates and populates the root file system (this doesn't 272 4) /sbin/init creates and populates the root file system (this doesn't
274 have to be a very usable system yet) 273 have to be a very usable system yet)
275 5) /linuxrc invokes pivot_root to change the root file system and 274 5) /sbin/init invokes pivot_root to change the root file system and
276 execs - via chroot - a program that continues the installation 275 execs - via chroot - a program that continues the installation
277 6) the boot loader is installed 276 6) the boot loader is installed
278 7) the boot loader is configured to load an initrd with the set of 277 7) the boot loader is configured to load an initrd with the set of
@@ -291,7 +290,7 @@ different hardware configurations in a single administrative domain. In
291such cases, it is desirable to generate only a small set of kernels 290such cases, it is desirable to generate only a small set of kernels
292(ideally only one) and to keep the system-specific part of configuration 291(ideally only one) and to keep the system-specific part of configuration
293information as small as possible. In this case, a common initrd could be 292information as small as possible. In this case, a common initrd could be
294generated with all the necessary modules. Then, only /linuxrc or a file 293generated with all the necessary modules. Then, only /sbin/init or a file
295read by it would have to be different. 294read by it would have to be different.
296 295
297A third scenario are more convenient recovery disks, because information 296A third scenario are more convenient recovery disks, because information
@@ -337,6 +336,25 @@ This old, deprecated mechanism is commonly called "change_root", while
337the new, supported mechanism is called "pivot_root". 336the new, supported mechanism is called "pivot_root".
338 337
339 338
339Mixed change_root and pivot_root mechanism
340------------------------------------------
341
342In case you did not want to use root=/dev/ram0 to trig the pivot_root mechanism,
343you may create both /linuxrc and /sbin/init in your initrd image.
344
345/linuxrc would contain only the following:
346
347#! /bin/sh
348mount -n -t proc proc /proc
349echo 0x0100 >/proc/sys/kernel/real-root-dev
350umount -n /proc
351
352Once linuxrc exited, the kernel would mount again your initrd as root,
353this time executing /sbin/init. Again, it would be duty of this init
354to build the right environment (maybe using the root= device passed on
355the cmdline) before the final execution of the real /sbin/init.
356
357
340Resources 358Resources
341--------- 359---------
342 360
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 09220a1e22d9..5d0283cd3a81 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -170,7 +170,10 @@ and is between 256 and 4096 characters. It is defined in the file
170 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS 170 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
171 Format: To spoof as Windows 98: ="Microsoft Windows" 171 Format: To spoof as Windows 98: ="Microsoft Windows"
172 172
173 acpi_osi= [HW,ACPI] empty param disables _OSI 173 acpi_osi= [HW,ACPI] Modify list of supported OS interface strings
174 acpi_osi="string1" # add string1 -- only one string
175 acpi_osi="!string2" # remove built-in string2
176 acpi_osi= # disable all strings
174 177
175 acpi_serialize [HW,ACPI] force serialization of AML methods 178 acpi_serialize [HW,ACPI] force serialization of AML methods
176 179
@@ -396,6 +399,26 @@ and is between 256 and 4096 characters. It is defined in the file
396 clocksource is not available, it defaults to PIT. 399 clocksource is not available, it defaults to PIT.
397 Format: { pit | tsc | cyclone | pmtmr } 400 Format: { pit | tsc | cyclone | pmtmr }
398 401
402 clocksource= [GENERIC_TIME] Override the default clocksource
403 Format: <string>
404 Override the default clocksource and use the clocksource
405 with the name specified.
406 Some clocksource names to choose from, depending on
407 the platform:
408 [all] jiffies (this is the base, fallback clocksource)
409 [ACPI] acpi_pm
410 [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2,
411 pxa_timer,timer3,32k_counter,timer0_1
412 [AVR32] avr32
413 [IA-32] pit,hpet,tsc,vmi-timer;
414 scx200_hrt on Geode; cyclone on IBM x440
415 [MIPS] MIPS
416 [PARISC] cr16
417 [S390] tod
418 [SH] SuperH
419 [SPARC64] tick
420 [X86-64] hpet,tsc
421
399 code_bytes [IA32] How many bytes of object code to print in an 422 code_bytes [IA32] How many bytes of object code to print in an
400 oops report. 423 oops report.
401 Range: 0 - 8192 424 Range: 0 - 8192
@@ -1112,9 +1135,9 @@ and is between 256 and 4096 characters. It is defined in the file
1112 when set. 1135 when set.
1113 Format: <int> 1136 Format: <int>
1114 1137
1115 noaliencache [MM, NUMA] Disables the allcoation of alien caches in 1138 noaliencache [MM, NUMA, SLAB] Disables the allocation of alien
1116 the slab allocator. Saves per-node memory, but will 1139 caches in the slab allocator. Saves per-node memory,
1117 impact performance on real NUMA hardware. 1140 but will impact performance.
1118 1141
1119 noalign [KNL,ARM] 1142 noalign [KNL,ARM]
1120 1143
@@ -1593,6 +1616,37 @@ and is between 256 and 4096 characters. It is defined in the file
1593 1616
1594 slram= [HW,MTD] 1617 slram= [HW,MTD]
1595 1618
1619 slub_debug [MM, SLUB]
1620 Enabling slub_debug allows one to determine the culprit
1621 if slab objects become corrupted. Enabling slub_debug
1622 creates guard zones around objects and poisons objects
1623 when not in use. Also tracks the last alloc / free.
1624 For more information see Documentation/vm/slub.txt.
1625
1626 slub_max_order= [MM, SLUB]
1627 Determines the maximum allowed order for slabs. Setting
1628 this too high may cause fragmentation.
1629 For more information see Documentation/vm/slub.txt.
1630
1631 slub_min_objects= [MM, SLUB]
1632 The minimum objects per slab. SLUB will increase the
1633 slab order up to slub_max_order to generate a
1634 sufficiently big slab to satisfy the number of objects.
1635 The higher the number of objects the smaller the overhead
1636 of tracking slabs.
1637 For more information see Documentation/vm/slub.txt.
1638
1639 slub_min_order= [MM, SLUB]
1640 Determines the mininum page order for slabs. Must be
1641 lower than slub_max_order
1642 For more information see Documentation/vm/slub.txt.
1643
1644 slub_nomerge [MM, SLUB]
1645 Disable merging of slabs of similar size. May be
1646 necessary if there is some reason to distinguish
1647 allocs to different slabs.
1648 For more information see Documentation/vm/slub.txt.
1649
1596 smart2= [HW] 1650 smart2= [HW]
1597 Format: <io1>[,<io2>[,...,<io8>]] 1651 Format: <io1>[,<io2>[,...,<io8>]]
1598 1652
@@ -1807,10 +1861,6 @@ and is between 256 and 4096 characters. It is defined in the file
1807 1861
1808 time Show timing data prefixed to each printk message line 1862 time Show timing data prefixed to each printk message line
1809 1863
1810 clocksource= [GENERIC_TIME] Override the default clocksource
1811 Override the default clocksource and use the clocksource
1812 with the name specified.
1813
1814 tipar.timeout= [HW,PPT] 1864 tipar.timeout= [HW,PPT]
1815 Set communications timeout in tenths of a second 1865 Set communications timeout in tenths of a second
1816 (default 15). 1866 (default 15).
diff --git a/Documentation/ldm.txt b/Documentation/ldm.txt
index e266e11c19a3..718085bc9f1a 100644
--- a/Documentation/ldm.txt
+++ b/Documentation/ldm.txt
@@ -2,10 +2,13 @@
2 LDM - Logical Disk Manager (Dynamic Disks) 2 LDM - Logical Disk Manager (Dynamic Disks)
3 ------------------------------------------ 3 ------------------------------------------
4 4
5Originally Written by FlatCap - Richard Russon <ldm@flatcap.org>.
6Last Updated by Anton Altaparmakov on 30 March 2007 for Windows Vista.
7
5Overview 8Overview
6-------- 9--------
7 10
8Windows 2000 and XP use a new partitioning scheme. It is a complete 11Windows 2000, XP, and Vista use a new partitioning scheme. It is a complete
9replacement for the MSDOS style partitions. It stores its information in a 12replacement for the MSDOS style partitions. It stores its information in a
101MiB journalled database at the end of the physical disk. The size of 131MiB journalled database at the end of the physical disk. The size of
11partitions is limited only by disk space. The maximum number of partitions is 14partitions is limited only by disk space. The maximum number of partitions is
@@ -23,7 +26,11 @@ Once the LDM driver has divided up the disk, you can use the MD driver to
23assemble any multi-partition volumes, e.g. Stripes, RAID5. 26assemble any multi-partition volumes, e.g. Stripes, RAID5.
24 27
25To prevent legacy applications from repartitioning the disk, the LDM creates a 28To prevent legacy applications from repartitioning the disk, the LDM creates a
26dummy MSDOS partition containing one disk-sized partition. 29dummy MSDOS partition containing one disk-sized partition. This is what is
30supported with the Linux LDM driver.
31
32A newer approach that has been implemented with Vista is to put LDM on top of a
33GPT label disk. This is not supported by the Linux LDM driver yet.
27 34
28 35
29Example 36Example
@@ -88,13 +95,13 @@ and cannot boot from a Dynamic Disk.
88More Documentation 95More Documentation
89------------------ 96------------------
90 97
91There is an Overview of the LDM online together with complete Technical 98There is an Overview of the LDM together with complete Technical Documentation.
92Documentation. It can also be downloaded in html. 99It is available for download.
93 100
94 http://linux-ntfs.sourceforge.net/ldm/index.html 101 http://www.linux-ntfs.org/content/view/19/37/
95 http://linux-ntfs.sourceforge.net/downloads.html
96 102
97If you have any LDM questions that aren't answered on the website, email me. 103If you have any LDM questions that aren't answered in the documentation, email
104me.
98 105
99Cheers, 106Cheers,
100 FlatCap - Richard Russon 107 FlatCap - Richard Russon
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 58408dd023c7..650657c54733 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -24,7 +24,7 @@ Contents:
24 (*) Explicit kernel barriers. 24 (*) Explicit kernel barriers.
25 25
26 - Compiler barrier. 26 - Compiler barrier.
27 - The CPU memory barriers. 27 - CPU memory barriers.
28 - MMIO write barrier. 28 - MMIO write barrier.
29 29
30 (*) Implicit kernel memory barriers. 30 (*) Implicit kernel memory barriers.
@@ -265,7 +265,7 @@ Memory barriers are such interventions. They impose a perceived partial
265ordering over the memory operations on either side of the barrier. 265ordering over the memory operations on either side of the barrier.
266 266
267Such enforcement is important because the CPUs and other devices in a system 267Such enforcement is important because the CPUs and other devices in a system
268can use a variety of tricks to improve performance - including reordering, 268can use a variety of tricks to improve performance, including reordering,
269deferral and combination of memory operations; speculative loads; speculative 269deferral and combination of memory operations; speculative loads; speculative
270branch prediction and various types of caching. Memory barriers are used to 270branch prediction and various types of caching. Memory barriers are used to
271override or suppress these tricks, allowing the code to sanely control the 271override or suppress these tricks, allowing the code to sanely control the
@@ -457,7 +457,7 @@ sequence, Q must be either &A or &B, and that:
457 (Q == &A) implies (D == 1) 457 (Q == &A) implies (D == 1)
458 (Q == &B) implies (D == 4) 458 (Q == &B) implies (D == 4)
459 459
460But! CPU 2's perception of P may be updated _before_ its perception of B, thus 460But! CPU 2's perception of P may be updated _before_ its perception of B, thus
461leading to the following situation: 461leading to the following situation:
462 462
463 (Q == &B) and (D == 2) ???? 463 (Q == &B) and (D == 2) ????
@@ -573,7 +573,7 @@ Basically, the read barrier always has to be there, even though it can be of
573the "weaker" type. 573the "weaker" type.
574 574
575[!] Note that the stores before the write barrier would normally be expected to 575[!] Note that the stores before the write barrier would normally be expected to
576match the loads after the read barrier or data dependency barrier, and vice 576match the loads after the read barrier or the data dependency barrier, and vice
577versa: 577versa:
578 578
579 CPU 1 CPU 2 579 CPU 1 CPU 2
@@ -588,7 +588,7 @@ versa:
588EXAMPLES OF MEMORY BARRIER SEQUENCES 588EXAMPLES OF MEMORY BARRIER SEQUENCES
589------------------------------------ 589------------------------------------
590 590
591Firstly, write barriers act as a partial orderings on store operations. 591Firstly, write barriers act as partial orderings on store operations.
592Consider the following sequence of events: 592Consider the following sequence of events:
593 593
594 CPU 1 594 CPU 1
@@ -608,15 +608,15 @@ STORE B, STORE C } all occurring before the unordered set of { STORE D, STORE E
608 +-------+ : : 608 +-------+ : :
609 | | +------+ 609 | | +------+
610 | |------>| C=3 | } /\ 610 | |------>| C=3 | } /\
611 | | : +------+ }----- \ -----> Events perceptible 611 | | : +------+ }----- \ -----> Events perceptible to
612 | | : | A=1 | } \/ to rest of system 612 | | : | A=1 | } \/ the rest of the system
613 | | : +------+ } 613 | | : +------+ }
614 | CPU 1 | : | B=2 | } 614 | CPU 1 | : | B=2 | }
615 | | +------+ } 615 | | +------+ }
616 | | wwwwwwwwwwwwwwww } <--- At this point the write barrier 616 | | wwwwwwwwwwwwwwww } <--- At this point the write barrier
617 | | +------+ } requires all stores prior to the 617 | | +------+ } requires all stores prior to the
618 | | : | E=5 | } barrier to be committed before 618 | | : | E=5 | } barrier to be committed before
619 | | : +------+ } further stores may be take place. 619 | | : +------+ } further stores may take place
620 | |------>| D=4 | } 620 | |------>| D=4 | }
621 | | +------+ 621 | | +------+
622 +-------+ : : 622 +-------+ : :
@@ -626,7 +626,7 @@ STORE B, STORE C } all occurring before the unordered set of { STORE D, STORE E
626 V 626 V
627 627
628 628
629Secondly, data dependency barriers act as a partial orderings on data-dependent 629Secondly, data dependency barriers act as partial orderings on data-dependent
630loads. Consider the following sequence of events: 630loads. Consider the following sequence of events:
631 631
632 CPU 1 CPU 2 632 CPU 1 CPU 2
@@ -975,7 +975,7 @@ compiler from moving the memory accesses either side of it to the other side:
975 975
976 barrier(); 976 barrier();
977 977
978This a general barrier - lesser varieties of compiler barrier do not exist. 978This is a general barrier - lesser varieties of compiler barrier do not exist.
979 979
980The compiler barrier has no direct effect on the CPU, which may then reorder 980The compiler barrier has no direct effect on the CPU, which may then reorder
981things however it wishes. 981things however it wishes.
@@ -997,7 +997,7 @@ The Linux kernel has eight basic CPU memory barriers:
997All CPU memory barriers unconditionally imply compiler barriers. 997All CPU memory barriers unconditionally imply compiler barriers.
998 998
999SMP memory barriers are reduced to compiler barriers on uniprocessor compiled 999SMP memory barriers are reduced to compiler barriers on uniprocessor compiled
1000systems because it is assumed that a CPU will be appear to be self-consistent, 1000systems because it is assumed that a CPU will appear to be self-consistent,
1001and will order overlapping accesses correctly with respect to itself. 1001and will order overlapping accesses correctly with respect to itself.
1002 1002
1003[!] Note that SMP memory barriers _must_ be used to control the ordering of 1003[!] Note that SMP memory barriers _must_ be used to control the ordering of
@@ -1146,9 +1146,9 @@ for each construct. These operations all imply certain barriers:
1146Therefore, from (1), (2) and (4) an UNLOCK followed by an unconditional LOCK is 1146Therefore, from (1), (2) and (4) an UNLOCK followed by an unconditional LOCK is
1147equivalent to a full barrier, but a LOCK followed by an UNLOCK is not. 1147equivalent to a full barrier, but a LOCK followed by an UNLOCK is not.
1148 1148
1149[!] Note: one of the consequence of LOCKs and UNLOCKs being only one-way 1149[!] Note: one of the consequences of LOCKs and UNLOCKs being only one-way
1150 barriers is that the effects instructions outside of a critical section may 1150 barriers is that the effects of instructions outside of a critical section
1151 seep into the inside of the critical section. 1151 may seep into the inside of the critical section.
1152 1152
1153A LOCK followed by an UNLOCK may not be assumed to be full memory barrier 1153A LOCK followed by an UNLOCK may not be assumed to be full memory barrier
1154because it is possible for an access preceding the LOCK to happen after the 1154because it is possible for an access preceding the LOCK to happen after the
@@ -1239,7 +1239,7 @@ three CPUs; then should the following sequence of events occur:
1239 UNLOCK M UNLOCK Q 1239 UNLOCK M UNLOCK Q
1240 *D = d; *H = h; 1240 *D = d; *H = h;
1241 1241
1242Then there is no guarantee as to what order CPU #3 will see the accesses to *A 1242Then there is no guarantee as to what order CPU 3 will see the accesses to *A
1243through *H occur in, other than the constraints imposed by the separate locks 1243through *H occur in, other than the constraints imposed by the separate locks
1244on the separate CPUs. It might, for example, see: 1244on the separate CPUs. It might, for example, see:
1245 1245
@@ -1269,12 +1269,12 @@ However, if the following occurs:
1269 UNLOCK M [2] 1269 UNLOCK M [2]
1270 *H = h; 1270 *H = h;
1271 1271
1272CPU #3 might see: 1272CPU 3 might see:
1273 1273
1274 *E, LOCK M [1], *C, *B, *A, UNLOCK M [1], 1274 *E, LOCK M [1], *C, *B, *A, UNLOCK M [1],
1275 LOCK M [2], *H, *F, *G, UNLOCK M [2], *D 1275 LOCK M [2], *H, *F, *G, UNLOCK M [2], *D
1276 1276
1277But assuming CPU #1 gets the lock first, it won't see any of: 1277But assuming CPU 1 gets the lock first, CPU 3 won't see any of:
1278 1278
1279 *B, *C, *D, *F, *G or *H preceding LOCK M [1] 1279 *B, *C, *D, *F, *G or *H preceding LOCK M [1]
1280 *A, *B or *C following UNLOCK M [1] 1280 *A, *B or *C following UNLOCK M [1]
@@ -1327,12 +1327,12 @@ spinlock, for example:
1327 mmiowb(); 1327 mmiowb();
1328 spin_unlock(Q); 1328 spin_unlock(Q);
1329 1329
1330this will ensure that the two stores issued on CPU #1 appear at the PCI bridge 1330this will ensure that the two stores issued on CPU 1 appear at the PCI bridge
1331before either of the stores issued on CPU #2. 1331before either of the stores issued on CPU 2.
1332 1332
1333 1333
1334Furthermore, following a store by a load to the same device obviates the need 1334Furthermore, following a store by a load from the same device obviates the need
1335for an mmiowb(), because the load forces the store to complete before the load 1335for the mmiowb(), because the load forces the store to complete before the load
1336is performed: 1336is performed:
1337 1337
1338 CPU 1 CPU 2 1338 CPU 1 CPU 2
@@ -1363,7 +1363,7 @@ circumstances in which reordering definitely _could_ be a problem:
1363 1363
1364 (*) Atomic operations. 1364 (*) Atomic operations.
1365 1365
1366 (*) Accessing devices (I/O). 1366 (*) Accessing devices.
1367 1367
1368 (*) Interrupts. 1368 (*) Interrupts.
1369 1369
@@ -1399,7 +1399,7 @@ To wake up a particular waiter, the up_read() or up_write() functions have to:
1399 (1) read the next pointer from this waiter's record to know as to where the 1399 (1) read the next pointer from this waiter's record to know as to where the
1400 next waiter record is; 1400 next waiter record is;
1401 1401
1402 (4) read the pointer to the waiter's task structure; 1402 (2) read the pointer to the waiter's task structure;
1403 1403
1404 (3) clear the task pointer to tell the waiter it has been given the semaphore; 1404 (3) clear the task pointer to tell the waiter it has been given the semaphore;
1405 1405
@@ -1407,7 +1407,7 @@ To wake up a particular waiter, the up_read() or up_write() functions have to:
1407 1407
1408 (5) release the reference held on the waiter's task struct. 1408 (5) release the reference held on the waiter's task struct.
1409 1409
1410In otherwords, it has to perform this sequence of events: 1410In other words, it has to perform this sequence of events:
1411 1411
1412 LOAD waiter->list.next; 1412 LOAD waiter->list.next;
1413 LOAD waiter->task; 1413 LOAD waiter->task;
@@ -1502,7 +1502,7 @@ operations and adjusting reference counters towards object destruction, and as
1502such the implicit memory barrier effects are necessary. 1502such the implicit memory barrier effects are necessary.
1503 1503
1504 1504
1505The following operation are potential problems as they do _not_ imply memory 1505The following operations are potential problems as they do _not_ imply memory
1506barriers, but might be used for implementing such things as UNLOCK-class 1506barriers, but might be used for implementing such things as UNLOCK-class
1507operations: 1507operations:
1508 1508
@@ -1517,7 +1517,7 @@ With these the appropriate explicit memory barrier should be used if necessary
1517 1517
1518The following also do _not_ imply memory barriers, and so may require explicit 1518The following also do _not_ imply memory barriers, and so may require explicit
1519memory barriers under some circumstances (smp_mb__before_atomic_dec() for 1519memory barriers under some circumstances (smp_mb__before_atomic_dec() for
1520instance)): 1520instance):
1521 1521
1522 atomic_add(); 1522 atomic_add();
1523 atomic_sub(); 1523 atomic_sub();
@@ -1641,8 +1641,8 @@ functions:
1641 indeed have special I/O space access cycles and instructions, but many 1641 indeed have special I/O space access cycles and instructions, but many
1642 CPUs don't have such a concept. 1642 CPUs don't have such a concept.
1643 1643
1644 The PCI bus, amongst others, defines an I/O space concept - which on such 1644 The PCI bus, amongst others, defines an I/O space concept which - on such
1645 CPUs as i386 and x86_64 cpus readily maps to the CPU's concept of I/O 1645 CPUs as i386 and x86_64 - readily maps to the CPU's concept of I/O
1646 space. However, it may also be mapped as a virtual I/O space in the CPU's 1646 space. However, it may also be mapped as a virtual I/O space in the CPU's
1647 memory map, particularly on those CPUs that don't support alternate I/O 1647 memory map, particularly on those CPUs that don't support alternate I/O
1648 spaces. 1648 spaces.
@@ -1664,7 +1664,7 @@ functions:
1664 i386 architecture machines, for example, this is controlled by way of the 1664 i386 architecture machines, for example, this is controlled by way of the
1665 MTRR registers. 1665 MTRR registers.
1666 1666
1667 Ordinarily, these will be guaranteed to be fully ordered and uncombined,, 1667 Ordinarily, these will be guaranteed to be fully ordered and uncombined,
1668 provided they're not accessing a prefetchable device. 1668 provided they're not accessing a prefetchable device.
1669 1669
1670 However, intermediary hardware (such as a PCI bridge) may indulge in 1670 However, intermediary hardware (such as a PCI bridge) may indulge in
@@ -1689,7 +1689,7 @@ functions:
1689 1689
1690 (*) ioreadX(), iowriteX() 1690 (*) ioreadX(), iowriteX()
1691 1691
1692 These will perform as appropriate for the type of access they're actually 1692 These will perform appropriately for the type of access they're actually
1693 doing, be it inX()/outX() or readX()/writeX(). 1693 doing, be it inX()/outX() or readX()/writeX().
1694 1694
1695 1695
@@ -1705,7 +1705,7 @@ of arch-specific code.
1705 1705
1706This means that it must be considered that the CPU will execute its instruction 1706This means that it must be considered that the CPU will execute its instruction
1707stream in any order it feels like - or even in parallel - provided that if an 1707stream in any order it feels like - or even in parallel - provided that if an
1708instruction in the stream depends on the an earlier instruction, then that 1708instruction in the stream depends on an earlier instruction, then that
1709earlier instruction must be sufficiently complete[*] before the later 1709earlier instruction must be sufficiently complete[*] before the later
1710instruction may proceed; in other words: provided that the appearance of 1710instruction may proceed; in other words: provided that the appearance of
1711causality is maintained. 1711causality is maintained.
@@ -1795,8 +1795,8 @@ eventually become visible on all CPUs, there's no guarantee that they will
1795become apparent in the same order on those other CPUs. 1795become apparent in the same order on those other CPUs.
1796 1796
1797 1797
1798Consider dealing with a system that has pair of CPUs (1 & 2), each of which has 1798Consider dealing with a system that has a pair of CPUs (1 & 2), each of which
1799a pair of parallel data caches (CPU 1 has A/B, and CPU 2 has C/D): 1799has a pair of parallel data caches (CPU 1 has A/B, and CPU 2 has C/D):
1800 1800
1801 : 1801 :
1802 : +--------+ 1802 : +--------+
@@ -1835,7 +1835,7 @@ Imagine the system has the following properties:
1835 1835
1836 (*) the coherency queue is not flushed by normal loads to lines already 1836 (*) the coherency queue is not flushed by normal loads to lines already
1837 present in the cache, even though the contents of the queue may 1837 present in the cache, even though the contents of the queue may
1838 potentially effect those loads. 1838 potentially affect those loads.
1839 1839
1840Imagine, then, that two writes are made on the first CPU, with a write barrier 1840Imagine, then, that two writes are made on the first CPU, with a write barrier
1841between them to guarantee that they will appear to reach that CPU's caches in 1841between them to guarantee that they will appear to reach that CPU's caches in
@@ -1845,7 +1845,7 @@ the requisite order:
1845 =============== =============== ======================================= 1845 =============== =============== =======================================
1846 u == 0, v == 1 and p == &u, q == &u 1846 u == 0, v == 1 and p == &u, q == &u
1847 v = 2; 1847 v = 2;
1848 smp_wmb(); Make sure change to v visible before 1848 smp_wmb(); Make sure change to v is visible before
1849 change to p 1849 change to p
1850 <A:modify v=2> v is now in cache A exclusively 1850 <A:modify v=2> v is now in cache A exclusively
1851 p = &v; 1851 p = &v;
@@ -1853,7 +1853,7 @@ the requisite order:
1853 1853
1854The write memory barrier forces the other CPUs in the system to perceive that 1854The write memory barrier forces the other CPUs in the system to perceive that
1855the local CPU's caches have apparently been updated in the correct order. But 1855the local CPU's caches have apparently been updated in the correct order. But
1856now imagine that the second CPU that wants to read those values: 1856now imagine that the second CPU wants to read those values:
1857 1857
1858 CPU 1 CPU 2 COMMENT 1858 CPU 1 CPU 2 COMMENT
1859 =============== =============== ======================================= 1859 =============== =============== =======================================
@@ -1861,7 +1861,7 @@ now imagine that the second CPU that wants to read those values:
1861 q = p; 1861 q = p;
1862 x = *q; 1862 x = *q;
1863 1863
1864The above pair of reads may then fail to happen in expected order, as the 1864The above pair of reads may then fail to happen in the expected order, as the
1865cacheline holding p may get updated in one of the second CPU's caches whilst 1865cacheline holding p may get updated in one of the second CPU's caches whilst
1866the update to the cacheline holding v is delayed in the other of the second 1866the update to the cacheline holding v is delayed in the other of the second
1867CPU's caches by some other cache event: 1867CPU's caches by some other cache event:
@@ -1916,7 +1916,7 @@ access depends on a read, not all do, so it may not be relied on.
1916 1916
1917Other CPUs may also have split caches, but must coordinate between the various 1917Other CPUs may also have split caches, but must coordinate between the various
1918cachelets for normal memory accesses. The semantics of the Alpha removes the 1918cachelets for normal memory accesses. The semantics of the Alpha removes the
1919need for coordination in absence of memory barriers. 1919need for coordination in the absence of memory barriers.
1920 1920
1921 1921
1922CACHE COHERENCY VS DMA 1922CACHE COHERENCY VS DMA
@@ -1931,10 +1931,10 @@ invalidate them as well).
1931 1931
1932In addition, the data DMA'd to RAM by a device may be overwritten by dirty 1932In addition, the data DMA'd to RAM by a device may be overwritten by dirty
1933cache lines being written back to RAM from a CPU's cache after the device has 1933cache lines being written back to RAM from a CPU's cache after the device has
1934installed its own data, or cache lines simply present in a CPUs cache may 1934installed its own data, or cache lines present in the CPU's cache may simply
1935simply obscure the fact that RAM has been updated, until at such time as the 1935obscure the fact that RAM has been updated, until at such time as the cacheline
1936cacheline is discarded from the CPU's cache and reloaded. To deal with this, 1936is discarded from the CPU's cache and reloaded. To deal with this, the
1937the appropriate part of the kernel must invalidate the overlapping bits of the 1937appropriate part of the kernel must invalidate the overlapping bits of the
1938cache on each CPU. 1938cache on each CPU.
1939 1939
1940See Documentation/cachetlb.txt for more information on cache management. 1940See Documentation/cachetlb.txt for more information on cache management.
@@ -1944,7 +1944,7 @@ CACHE COHERENCY VS MMIO
1944----------------------- 1944-----------------------
1945 1945
1946Memory mapped I/O usually takes place through memory locations that are part of 1946Memory mapped I/O usually takes place through memory locations that are part of
1947a window in the CPU's memory space that have different properties assigned than 1947a window in the CPU's memory space that has different properties assigned than
1948the usual RAM directed window. 1948the usual RAM directed window.
1949 1949
1950Amongst these properties is usually the fact that such accesses bypass the 1950Amongst these properties is usually the fact that such accesses bypass the
@@ -1960,7 +1960,7 @@ THE THINGS CPUS GET UP TO
1960========================= 1960=========================
1961 1961
1962A programmer might take it for granted that the CPU will perform memory 1962A programmer might take it for granted that the CPU will perform memory
1963operations in exactly the order specified, so that if a CPU is, for example, 1963operations in exactly the order specified, so that if the CPU is, for example,
1964given the following piece of code to execute: 1964given the following piece of code to execute:
1965 1965
1966 a = *A; 1966 a = *A;
@@ -1969,7 +1969,7 @@ given the following piece of code to execute:
1969 d = *D; 1969 d = *D;
1970 *E = e; 1970 *E = e;
1971 1971
1972They would then expect that the CPU will complete the memory operation for each 1972they would then expect that the CPU will complete the memory operation for each
1973instruction before moving on to the next one, leading to a definite sequence of 1973instruction before moving on to the next one, leading to a definite sequence of
1974operations as seen by external observers in the system: 1974operations as seen by external observers in the system:
1975 1975
@@ -1986,8 +1986,8 @@ assumption doesn't hold because:
1986 (*) loads may be done speculatively, and the result discarded should it prove 1986 (*) loads may be done speculatively, and the result discarded should it prove
1987 to have been unnecessary; 1987 to have been unnecessary;
1988 1988
1989 (*) loads may be done speculatively, leading to the result having being 1989 (*) loads may be done speculatively, leading to the result having been fetched
1990 fetched at the wrong time in the expected sequence of events; 1990 at the wrong time in the expected sequence of events;
1991 1991
1992 (*) the order of the memory accesses may be rearranged to promote better use 1992 (*) the order of the memory accesses may be rearranged to promote better use
1993 of the CPU buses and caches; 1993 of the CPU buses and caches;
@@ -2069,12 +2069,12 @@ AND THEN THERE'S THE ALPHA
2069 2069
2070The DEC Alpha CPU is one of the most relaxed CPUs there is. Not only that, 2070The DEC Alpha CPU is one of the most relaxed CPUs there is. Not only that,
2071some versions of the Alpha CPU have a split data cache, permitting them to have 2071some versions of the Alpha CPU have a split data cache, permitting them to have
2072two semantically related cache lines updating at separate times. This is where 2072two semantically-related cache lines updated at separate times. This is where
2073the data dependency barrier really becomes necessary as this synchronises both 2073the data dependency barrier really becomes necessary as this synchronises both
2074caches with the memory coherence system, thus making it seem like pointer 2074caches with the memory coherence system, thus making it seem like pointer
2075changes vs new data occur in the right order. 2075changes vs new data occur in the right order.
2076 2076
2077The Alpha defines the Linux's kernel's memory barrier model. 2077The Alpha defines the Linux kernel's memory barrier model.
2078 2078
2079See the subsection on "Cache Coherency" above. 2079See the subsection on "Cache Coherency" above.
2080 2080
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/s390/cds.txt b/Documentation/s390/cds.txt
index 05a2b4f7e38f..58919d6a593a 100644
--- a/Documentation/s390/cds.txt
+++ b/Documentation/s390/cds.txt
@@ -51,13 +51,8 @@ The major changes are:
51* The interrupt handlers must be adapted to use a ccw_device as argument. 51* The interrupt handlers must be adapted to use a ccw_device as argument.
52 Moreover, they don't return a devstat, but an irb. 52 Moreover, they don't return a devstat, but an irb.
53* Before initiating an io, the options must be set via ccw_device_set_options(). 53* Before initiating an io, the options must be set via ccw_device_set_options().
54 54* Instead of calling read_dev_chars()/read_conf_data(), the driver issues
55read_dev_chars() 55 the channel program and handles the interrupt itself.
56 read device characteristics
57
58read_conf_data()
59read_conf_data_lpm()
60 read configuration data.
61 56
62ccw_device_get_ciw() 57ccw_device_get_ciw()
63 get commands from extended sense data. 58 get commands from extended sense data.
@@ -130,11 +125,6 @@ present their hardware status by the same (shared) IRQ, the operating system
130has to call every single device driver registered on this IRQ in order to 125has to call every single device driver registered on this IRQ in order to
131determine the device driver owning the device that raised the interrupt. 126determine the device driver owning the device that raised the interrupt.
132 127
133In order not to introduce a new I/O concept to the common Linux code,
134Linux/390 preserves the IRQ concept and semantically maps the ESA/390
135subchannels to Linux as IRQs. This allows Linux/390 to support up to 64k
136different IRQs, uniquely representing a single device each.
137
138Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel). 128Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel).
139For internal use of the common I/O layer, these are still there. However, 129For internal use of the common I/O layer, these are still there. However,
140device drivers should use the new calling interface via the ccw_device only. 130device drivers should use the new calling interface via the ccw_device only.
@@ -151,9 +141,8 @@ information during their initialization step to recognize the devices they
151support using the information saved in the struct ccw_device given to them. 141support using the information saved in the struct ccw_device given to them.
152This methods implies that Linux/390 doesn't require to probe for free (not 142This methods implies that Linux/390 doesn't require to probe for free (not
153armed) interrupt request lines (IRQs) to drive its devices with. Where 143armed) interrupt request lines (IRQs) to drive its devices with. Where
154applicable, the device drivers can use the read_dev_chars() to retrieve device 144applicable, the device drivers can use issue the READ DEVICE CHARACTERISTICS
155characteristics. This can be done without having to request device ownership 145ccw to retrieve device characteristics in its online routine.
156previously.
157 146
158In order to allow for easy I/O initiation the CDS layer provides a 147In order to allow for easy I/O initiation the CDS layer provides a
159ccw_device_start() interface that takes a device specific channel program (one 148ccw_device_start() interface that takes a device specific channel program (one
@@ -170,69 +159,6 @@ SUBCHANNEL (HSCH) command without having pending I/O requests. This function is
170also covered by ccw_device_halt(). 159also covered by ccw_device_halt().
171 160
172 161
173read_dev_chars() - Read Device Characteristics
174
175This routine returns the characteristics for the device specified.
176
177The function is meant to be called with the device already enabled; that is,
178at earliest during set_online() processing.
179
180The ccw_device must not be locked prior to calling read_dev_chars().
181
182The function may be called enabled or disabled.
183
184int read_dev_chars(struct ccw_device *cdev, void **buffer, int length );
185
186cdev - the ccw_device the information is requested for.
187buffer - pointer to a buffer pointer. The buffer pointer itself
188 must contain a valid buffer area.
189length - length of the buffer provided.
190
191The read_dev_chars() function returns :
192
193 0 - successful completion
194-ENODEV - cdev invalid
195-EINVAL - an invalid parameter was detected, or the function was called early.
196-EBUSY - an irrecoverable I/O error occurred or the device is not
197 operational.
198
199
200read_conf_data(), read_conf_data_lpm() - Read Configuration Data
201
202Retrieve the device dependent configuration data. Please have a look at your
203device dependent I/O commands for the device specific layout of the node
204descriptor elements. read_conf_data_lpm() will retrieve the configuration data
205for a specific path.
206
207The function is meant to be called with the device already enabled; that is,
208at earliest during set_online() processing.
209
210The function may be called enabled or disabled, but the device must not be
211locked
212
213int read_conf_data(struct ccw_device, void **buffer, int *length);
214int read_conf_data_lpm(struct ccw_device, void **buffer, int *length, __u8 lpm);
215
216cdev - the ccw_device the data is requested for.
217buffer - Pointer to a buffer pointer. The read_conf_data() routine
218 will allocate a buffer and initialize the buffer pointer
219 accordingly. It's the device driver's responsibility to
220 release the kernel memory if no longer needed.
221length - Length of the buffer allocated and retrieved.
222lpm - Logical path mask to be used for retrieving the data. If
223 zero the data is retrieved on the next path available.
224
225The read_conf_data() function returns :
226 0 - Successful completion
227-ENODEV - cdev invalid.
228-EINVAL - An invalid parameter was detected, or the function was called early.
229-EIO - An irrecoverable I/O error occurred or the device is
230 not operational.
231-ENOMEM - The read_conf_data() routine couldn't obtain storage.
232-EOPNOTSUPP - The device doesn't support the read configuration
233 data command.
234
235
236get_ciw() - get command information word 162get_ciw() - get command information word
237 163
238This call enables a device driver to get information about supported commands 164This call enables a device driver to get information about supported commands
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/spi/spi-summary b/Documentation/spi/spi-summary
index 795fbb48ffa7..76ea6c837be5 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -1,26 +1,30 @@
1Overview of Linux kernel SPI support 1Overview of Linux kernel SPI support
2==================================== 2====================================
3 3
402-Dec-2005 421-May-2007
5 5
6What is SPI? 6What is SPI?
7------------ 7------------
8The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial 8The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial
9link used to connect microcontrollers to sensors, memory, and peripherals. 9link used to connect microcontrollers to sensors, memory, and peripherals.
10It's a simple "de facto" standard, not complicated enough to acquire a
11standardization body. SPI uses a master/slave configuration.
10 12
11The three signal wires hold a clock (SCK, often on the order of 10 MHz), 13The three signal wires hold a clock (SCK, often on the order of 10 MHz),
12and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In, 14and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In,
13Slave Out" (MISO) signals. (Other names are also used.) There are four 15Slave Out" (MISO) signals. (Other names are also used.) There are four
14clocking modes through which data is exchanged; mode-0 and mode-3 are most 16clocking modes through which data is exchanged; mode-0 and mode-3 are most
15commonly used. Each clock cycle shifts data out and data in; the clock 17commonly used. Each clock cycle shifts data out and data in; the clock
16doesn't cycle except when there is data to shift. 18doesn't cycle except when there is a data bit to shift. Not all data bits
19are used though; not every protocol uses those full duplex capabilities.
17 20
18SPI masters may use a "chip select" line to activate a given SPI slave 21SPI masters use a fourth "chip select" line to activate a given SPI slave
19device, so those three signal wires may be connected to several chips 22device, so those three signal wires may be connected to several chips
20in parallel. All SPI slaves support chipselects. Some devices have 23in parallel. All SPI slaves support chipselects; they are usually active
24low signals, labeled nCSx for slave 'x' (e.g. nCS0). Some devices have
21other signals, often including an interrupt to the master. 25other signals, often including an interrupt to the master.
22 26
23Unlike serial busses like USB or SMBUS, even low level protocols for 27Unlike serial busses like USB or SMBus, even low level protocols for
24SPI slave functions are usually not interoperable between vendors 28SPI slave functions are usually not interoperable between vendors
25(except for commodities like SPI memory chips). 29(except for commodities like SPI memory chips).
26 30
@@ -33,6 +37,11 @@ SPI slave functions are usually not interoperable between vendors
33 - Some devices may use eight bit words. Others may different word 37 - Some devices may use eight bit words. Others may different word
34 lengths, such as streams of 12-bit or 20-bit digital samples. 38 lengths, such as streams of 12-bit or 20-bit digital samples.
35 39
40 - Words are usually sent with their most significant bit (MSB) first,
41 but sometimes the least significant bit (LSB) goes first instead.
42
43 - Sometimes SPI is used to daisy-chain devices, like shift registers.
44
36In the same way, SPI slaves will only rarely support any kind of automatic 45In the same way, SPI slaves will only rarely support any kind of automatic
37discovery/enumeration protocol. The tree of slave devices accessible from 46discovery/enumeration protocol. The tree of slave devices accessible from
38a given SPI master will normally be set up manually, with configuration 47a given SPI master will normally be set up manually, with configuration
@@ -44,6 +53,14 @@ half-duplex SPI, for request/response protocols), SSP ("Synchronous
44Serial Protocol"), PSP ("Programmable Serial Protocol"), and other 53Serial Protocol"), PSP ("Programmable Serial Protocol"), and other
45related protocols. 54related protocols.
46 55
56Some chips eliminate a signal line by combining MOSI and MISO, and
57limiting themselves to half-duplex at the hardware level. In fact
58some SPI chips have this signal mode as a strapping option. These
59can be accessed using the same programming interface as SPI, but of
60course they won't handle full duplex transfers. You may find such
61chips described as using "three wire" signaling: SCK, data, nCSx.
62(That data line is sometimes called MOMI or SISO.)
63
47Microcontrollers often support both master and slave sides of the SPI 64Microcontrollers often support both master and slave sides of the SPI
48protocol. This document (and Linux) currently only supports the master 65protocol. This document (and Linux) currently only supports the master
49side of SPI interactions. 66side of SPI interactions.
@@ -74,6 +91,32 @@ interfaces with SPI modes. Given SPI support, they could use MMC or SD
74cards without needing a special purpose MMC/SD/SDIO controller. 91cards without needing a special purpose MMC/SD/SDIO controller.
75 92
76 93
94I'm confused. What are these four SPI "clock modes"?
95-----------------------------------------------------
96It's easy to be confused here, and the vendor documentation you'll
97find isn't necessarily helpful. The four modes combine two mode bits:
98
99 - CPOL indicates the initial clock polarity. CPOL=0 means the
100 clock starts low, so the first (leading) edge is rising, and
101 the second (trailing) edge is falling. CPOL=1 means the clock
102 starts high, so the first (leading) edge is falling.
103
104 - CPHA indicates the clock phase used to sample data; CPHA=0 says
105 sample on the leading edge, CPHA=1 means the trailing edge.
106
107 Since the signal needs to stablize before it's sampled, CPHA=0
108 implies that its data is written half a clock before the first
109 clock edge. The chipselect may have made it become available.
110
111Chip specs won't always say "uses SPI mode X" in as many words,
112but their timing diagrams will make the CPOL and CPHA modes clear.
113
114In the SPI mode number, CPOL is the high order bit and CPHA is the
115low order bit. So when a chip's timing diagram shows the clock
116starting low (CPOL=0) and data stabilized for sampling during the
117trailing clock edge (CPHA=1), that's SPI mode 1.
118
119
77How do these driver programming interfaces work? 120How do these driver programming interfaces work?
78------------------------------------------------ 121------------------------------------------------
79The <linux/spi/spi.h> header file includes kerneldoc, as does the 122The <linux/spi/spi.h> header file includes kerneldoc, as does the
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index 2d4803359a04..9e6b94face4b 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
@@ -138,7 +138,7 @@ Hot keys
138-------- 138--------
139 139
140procfs: /proc/acpi/ibm/hotkey 140procfs: /proc/acpi/ibm/hotkey
141sysfs device attribute: hotkey/* 141sysfs device attribute: hotkey_*
142 142
143Without this driver, only the Fn-F4 key (sleep button) generates an 143Without this driver, only the Fn-F4 key (sleep button) generates an
144ACPI event. With the driver loaded, the hotkey feature enabled and the 144ACPI event. With the driver loaded, the hotkey feature enabled and the
@@ -196,10 +196,7 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file:
196 196
197sysfs notes: 197sysfs notes:
198 198
199 The hot keys attributes are in a hotkey/ subdirectory off the 199 hotkey_bios_enabled:
200 thinkpad device.
201
202 bios_enabled:
203 Returns the status of the hot keys feature when 200 Returns the status of the hot keys feature when
204 thinkpad-acpi was loaded. Upon module unload, the hot 201 thinkpad-acpi was loaded. Upon module unload, the hot
205 key feature status will be restored to this value. 202 key feature status will be restored to this value.
@@ -207,19 +204,19 @@ sysfs notes:
207 0: hot keys were disabled 204 0: hot keys were disabled
208 1: hot keys were enabled 205 1: hot keys were enabled
209 206
210 bios_mask: 207 hotkey_bios_mask:
211 Returns the hot keys mask when thinkpad-acpi was loaded. 208 Returns the hot keys mask when thinkpad-acpi was loaded.
212 Upon module unload, the hot keys mask will be restored 209 Upon module unload, the hot keys mask will be restored
213 to this value. 210 to this value.
214 211
215 enable: 212 hotkey_enable:
216 Enables/disables the hot keys feature, and reports 213 Enables/disables the hot keys feature, and reports
217 current status of the hot keys feature. 214 current status of the hot keys feature.
218 215
219 0: disables the hot keys feature / feature disabled 216 0: disables the hot keys feature / feature disabled
220 1: enables the hot keys feature / feature enabled 217 1: enables the hot keys feature / feature enabled
221 218
222 mask: 219 hotkey_mask:
223 bit mask to enable ACPI event generation for each hot 220 bit mask to enable ACPI event generation for each hot
224 key (see above). Returns the current status of the hot 221 key (see above). Returns the current status of the hot
225 keys mask, and allows one to modify it. 222 keys mask, and allows one to modify it.
@@ -229,7 +226,7 @@ Bluetooth
229--------- 226---------
230 227
231procfs: /proc/acpi/ibm/bluetooth 228procfs: /proc/acpi/ibm/bluetooth
232sysfs device attribute: bluetooth/enable 229sysfs device attribute: bluetooth_enable
233 230
234This feature shows the presence and current state of a ThinkPad 231This feature shows the presence and current state of a ThinkPad
235Bluetooth device in the internal ThinkPad CDC slot. 232Bluetooth device in the internal ThinkPad CDC slot.
@@ -244,7 +241,7 @@ If Bluetooth is installed, the following commands can be used:
244Sysfs notes: 241Sysfs notes:
245 242
246 If the Bluetooth CDC card is installed, it can be enabled / 243 If the Bluetooth CDC card is installed, it can be enabled /
247 disabled through the "bluetooth/enable" thinkpad-acpi device 244 disabled through the "bluetooth_enable" thinkpad-acpi device
248 attribute, and its current status can also be queried. 245 attribute, and its current status can also be queried.
249 246
250 enable: 247 enable:
@@ -252,7 +249,7 @@ Sysfs notes:
252 1: enables Bluetooth / Bluetooth is enabled. 249 1: enables Bluetooth / Bluetooth is enabled.
253 250
254 Note: this interface will be probably be superseeded by the 251 Note: this interface will be probably be superseeded by the
255 generic rfkill class. 252 generic rfkill class, so it is NOT to be considered stable yet.
256 253
257Video output control -- /proc/acpi/ibm/video 254Video output control -- /proc/acpi/ibm/video
258-------------------------------------------- 255--------------------------------------------
@@ -898,7 +895,7 @@ EXPERIMENTAL: WAN
898----------------- 895-----------------
899 896
900procfs: /proc/acpi/ibm/wan 897procfs: /proc/acpi/ibm/wan
901sysfs device attribute: wwan/enable 898sysfs device attribute: wwan_enable
902 899
903This feature is marked EXPERIMENTAL because the implementation 900This feature is marked EXPERIMENTAL because the implementation
904directly accesses hardware registers and may not work as expected. USE 901directly accesses hardware registers and may not work as expected. USE
@@ -921,7 +918,7 @@ If the W-WAN card is installed, the following commands can be used:
921Sysfs notes: 918Sysfs notes:
922 919
923 If the W-WAN card is installed, it can be enabled / 920 If the W-WAN card is installed, it can be enabled /
924 disabled through the "wwan/enable" thinkpad-acpi device 921 disabled through the "wwan_enable" thinkpad-acpi device
925 attribute, and its current status can also be queried. 922 attribute, and its current status can also be queried.
926 923
927 enable: 924 enable:
@@ -929,7 +926,7 @@ Sysfs notes:
929 1: enables WWAN card / WWAN card is enabled. 926 1: enables WWAN card / WWAN card is enabled.
930 927
931 Note: this interface will be probably be superseeded by the 928 Note: this interface will be probably be superseeded by the
932 generic rfkill class. 929 generic rfkill class, so it is NOT to be considered stable yet.
933 930
934Multiple Commands, Module Parameters 931Multiple Commands, Module Parameters
935------------------------------------ 932------------------------------------
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