diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-11 17:31:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-11 17:31:52 -0400 |
commit | 0d5959723e1db3fd7323c198a50c16cecf96c7a9 (patch) | |
tree | 802b623fff261ebcbbddadf84af5524398364a18 /Documentation | |
parent | 62fdac5913f71f8f200bd2c9bd59a02e9a1498e9 (diff) | |
parent | 512626a04e72aca60effe111fa0333ed0b195d21 (diff) |
Merge branch 'linus' into x86/mce3
Conflicts:
arch/x86/kernel/cpu/mcheck/mce_64.c
arch/x86/kernel/irq.c
Merge reason: Resolve the conflicts above.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation')
23 files changed, 1034 insertions, 75 deletions
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block index 44f52a4f590..cbbd3e06994 100644 --- a/Documentation/ABI/testing/sysfs-block +++ b/Documentation/ABI/testing/sysfs-block | |||
@@ -60,3 +60,62 @@ Description: | |||
60 | Indicates whether the block layer should automatically | 60 | Indicates whether the block layer should automatically |
61 | generate checksums for write requests bound for | 61 | generate checksums for write requests bound for |
62 | devices that support receiving integrity metadata. | 62 | devices that support receiving integrity metadata. |
63 | |||
64 | What: /sys/block/<disk>/alignment_offset | ||
65 | Date: April 2009 | ||
66 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
67 | Description: | ||
68 | Storage devices may report a physical block size that is | ||
69 | bigger than the logical block size (for instance a drive | ||
70 | with 4KB physical sectors exposing 512-byte logical | ||
71 | blocks to the operating system). This parameter | ||
72 | indicates how many bytes the beginning of the device is | ||
73 | offset from the disk's natural alignment. | ||
74 | |||
75 | What: /sys/block/<disk>/<partition>/alignment_offset | ||
76 | Date: April 2009 | ||
77 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
78 | Description: | ||
79 | Storage devices may report a physical block size that is | ||
80 | bigger than the logical block size (for instance a drive | ||
81 | with 4KB physical sectors exposing 512-byte logical | ||
82 | blocks to the operating system). This parameter | ||
83 | indicates how many bytes the beginning of the partition | ||
84 | is offset from the disk's natural alignment. | ||
85 | |||
86 | What: /sys/block/<disk>/queue/logical_block_size | ||
87 | Date: May 2009 | ||
88 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
89 | Description: | ||
90 | This is the smallest unit the storage device can | ||
91 | address. It is typically 512 bytes. | ||
92 | |||
93 | What: /sys/block/<disk>/queue/physical_block_size | ||
94 | Date: May 2009 | ||
95 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
96 | Description: | ||
97 | This is the smallest unit the storage device can write | ||
98 | without resorting to read-modify-write operation. It is | ||
99 | usually the same as the logical block size but may be | ||
100 | bigger. One example is SATA drives with 4KB sectors | ||
101 | that expose a 512-byte logical block size to the | ||
102 | operating system. | ||
103 | |||
104 | What: /sys/block/<disk>/queue/minimum_io_size | ||
105 | Date: April 2009 | ||
106 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
107 | Description: | ||
108 | Storage devices may report a preferred minimum I/O size, | ||
109 | which is the smallest request the device can perform | ||
110 | without incurring a read-modify-write penalty. For disk | ||
111 | drives this is often the physical block size. For RAID | ||
112 | arrays it is often the stripe chunk size. | ||
113 | |||
114 | What: /sys/block/<disk>/queue/optimal_io_size | ||
115 | Date: April 2009 | ||
116 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
117 | Description: | ||
118 | Storage devices may report an optimal I/O size, which is | ||
119 | the device's preferred unit of receiving I/O. This is | ||
120 | rarely reported for disk drives. For RAID devices it is | ||
121 | usually the stripe width or the internal block size. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss new file mode 100644 index 00000000000..0a92a7c93a6 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss | |||
@@ -0,0 +1,33 @@ | |||
1 | Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/model | ||
2 | Date: March 2009 | ||
3 | Kernel Version: 2.6.30 | ||
4 | Contact: iss_storagedev@hp.com | ||
5 | Description: Displays the SCSI INQUIRY page 0 model for logical drive | ||
6 | Y of controller X. | ||
7 | |||
8 | Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/rev | ||
9 | Date: March 2009 | ||
10 | Kernel Version: 2.6.30 | ||
11 | Contact: iss_storagedev@hp.com | ||
12 | Description: Displays the SCSI INQUIRY page 0 revision for logical | ||
13 | drive Y of controller X. | ||
14 | |||
15 | Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/unique_id | ||
16 | Date: March 2009 | ||
17 | Kernel Version: 2.6.30 | ||
18 | Contact: iss_storagedev@hp.com | ||
19 | Description: Displays the SCSI INQUIRY page 83 serial number for logical | ||
20 | drive Y of controller X. | ||
21 | |||
22 | Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/vendor | ||
23 | Date: March 2009 | ||
24 | Kernel Version: 2.6.30 | ||
25 | Contact: iss_storagedev@hp.com | ||
26 | Description: Displays the SCSI INQUIRY page 0 vendor for logical drive | ||
27 | Y of controller X. | ||
28 | |||
29 | Where: /sys/bus/pci/devices/<dev>/ccissX/cXdY/block:cciss!cXdY | ||
30 | Date: March 2009 | ||
31 | Kernel Version: 2.6.30 | ||
32 | Contact: iss_storagedev@hp.com | ||
33 | Description: A symbolic link to /sys/block/cciss!cXdY | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-cache_disable b/Documentation/ABI/testing/sysfs-devices-cache_disable new file mode 100644 index 00000000000..175bb4f7051 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-cache_disable | |||
@@ -0,0 +1,18 @@ | |||
1 | What: /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X | ||
2 | Date: August 2008 | ||
3 | KernelVersion: 2.6.27 | ||
4 | Contact: mark.langsdorf@amd.com | ||
5 | Description: These files exist in every cpu's cache index directories. | ||
6 | There are currently 2 cache_disable_# files in each | ||
7 | directory. Reading from these files on a supported | ||
8 | processor will return that cache disable index value | ||
9 | for that processor and node. Writing to one of these | ||
10 | files will cause the specificed cache index to be disabled. | ||
11 | |||
12 | Currently, only AMD Family 10h Processors support cache index | ||
13 | disable, and only for their L3 caches. See the BIOS and | ||
14 | Kernel Developer's Guide at | ||
15 | http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116-Public-GH-BKDG_3.20_2-4-09.pdf | ||
16 | for formatting information and other details on the | ||
17 | cache index disable. | ||
18 | Users: joachim.deguara@amd.com | ||
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index d9aa43d78bc..25fb8bcf32a 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -704,12 +704,24 @@ this directory the following files can currently be found: | |||
704 | The current number of free dma_debug_entries | 704 | The current number of free dma_debug_entries |
705 | in the allocator. | 705 | in the allocator. |
706 | 706 | ||
707 | dma-api/driver-filter | ||
708 | You can write a name of a driver into this file | ||
709 | to limit the debug output to requests from that | ||
710 | particular driver. Write an empty string to | ||
711 | that file to disable the filter and see | ||
712 | all errors again. | ||
713 | |||
707 | If you have this code compiled into your kernel it will be enabled by default. | 714 | If you have this code compiled into your kernel it will be enabled by default. |
708 | If you want to boot without the bookkeeping anyway you can provide | 715 | If you want to boot without the bookkeeping anyway you can provide |
709 | 'dma_debug=off' as a boot parameter. This will disable DMA-API debugging. | 716 | 'dma_debug=off' as a boot parameter. This will disable DMA-API debugging. |
710 | Notice that you can not enable it again at runtime. You have to reboot to do | 717 | Notice that you can not enable it again at runtime. You have to reboot to do |
711 | so. | 718 | so. |
712 | 719 | ||
720 | If you want to see debug messages only for a special device driver you can | ||
721 | specify the dma_debug_driver=<drivername> parameter. This will enable the | ||
722 | driver filter at boot time. The debug code will only print errors for that | ||
723 | driver afterwards. This filter can be disabled or changed later using debugfs. | ||
724 | |||
713 | When the code disables itself at runtime this is most likely because it ran | 725 | When the code disables itself at runtime this is most likely because it ran |
714 | out of dma_debug_entries. These entries are preallocated at boot. The number | 726 | out of dma_debug_entries. These entries are preallocated at boot. The number |
715 | of preallocated entries is defined per architecture. If it is too low for you | 727 | of preallocated entries is defined per architecture. If it is too low for you |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index b1eb661e630..9632444f6c6 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -13,7 +13,8 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ | |||
13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ | 13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ |
14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
15 | mac80211.xml debugobjects.xml sh.xml regulator.xml \ | 15 | mac80211.xml debugobjects.xml sh.xml regulator.xml \ |
16 | alsa-driver-api.xml writing-an-alsa-driver.xml | 16 | alsa-driver-api.xml writing-an-alsa-driver.xml \ |
17 | tracepoint.xml | ||
17 | 18 | ||
18 | ### | 19 | ### |
19 | # The build process is as follows (targets): | 20 | # The build process is as follows (targets): |
diff --git a/Documentation/DocBook/tracepoint.tmpl b/Documentation/DocBook/tracepoint.tmpl new file mode 100644 index 00000000000..b0756d0fd57 --- /dev/null +++ b/Documentation/DocBook/tracepoint.tmpl | |||
@@ -0,0 +1,89 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
4 | |||
5 | <book id="Tracepoints"> | ||
6 | <bookinfo> | ||
7 | <title>The Linux Kernel Tracepoint API</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Jason</firstname> | ||
12 | <surname>Baron</surname> | ||
13 | <affiliation> | ||
14 | <address> | ||
15 | <email>jbaron@redhat.com</email> | ||
16 | </address> | ||
17 | </affiliation> | ||
18 | </author> | ||
19 | </authorgroup> | ||
20 | |||
21 | <legalnotice> | ||
22 | <para> | ||
23 | This documentation is free software; you can redistribute | ||
24 | it and/or modify it under the terms of the GNU General Public | ||
25 | License as published by the Free Software Foundation; either | ||
26 | version 2 of the License, or (at your option) any later | ||
27 | version. | ||
28 | </para> | ||
29 | |||
30 | <para> | ||
31 | This program is distributed in the hope that it will be | ||
32 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
33 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
34 | See the GNU General Public License for more details. | ||
35 | </para> | ||
36 | |||
37 | <para> | ||
38 | You should have received a copy of the GNU General Public | ||
39 | License along with this program; if not, write to the Free | ||
40 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
41 | MA 02111-1307 USA | ||
42 | </para> | ||
43 | |||
44 | <para> | ||
45 | For more details see the file COPYING in the source | ||
46 | distribution of Linux. | ||
47 | </para> | ||
48 | </legalnotice> | ||
49 | </bookinfo> | ||
50 | |||
51 | <toc></toc> | ||
52 | <chapter id="intro"> | ||
53 | <title>Introduction</title> | ||
54 | <para> | ||
55 | Tracepoints are static probe points that are located in strategic points | ||
56 | throughout the kernel. 'Probes' register/unregister with tracepoints | ||
57 | via a callback mechanism. The 'probes' are strictly typed functions that | ||
58 | are passed a unique set of parameters defined by each tracepoint. | ||
59 | </para> | ||
60 | |||
61 | <para> | ||
62 | From this simple callback mechanism, 'probes' can be used to profile, debug, | ||
63 | and understand kernel behavior. There are a number of tools that provide a | ||
64 | framework for using 'probes'. These tools include Systemtap, ftrace, and | ||
65 | LTTng. | ||
66 | </para> | ||
67 | |||
68 | <para> | ||
69 | Tracepoints are defined in a number of header files via various macros. Thus, | ||
70 | the purpose of this document is to provide a clear accounting of the available | ||
71 | tracepoints. The intention is to understand not only what tracepoints are | ||
72 | available but also to understand where future tracepoints might be added. | ||
73 | </para> | ||
74 | |||
75 | <para> | ||
76 | The API presented has functions of the form: | ||
77 | <function>trace_tracepointname(function parameters)</function>. These are the | ||
78 | tracepoints callbacks that are found throughout the code. Registering and | ||
79 | unregistering probes with these callback sites is covered in the | ||
80 | <filename>Documentation/trace/*</filename> directory. | ||
81 | </para> | ||
82 | </chapter> | ||
83 | |||
84 | <chapter id="irq"> | ||
85 | <title>IRQ</title> | ||
86 | !Iinclude/trace/events/irq.h | ||
87 | </chapter> | ||
88 | |||
89 | </book> | ||
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index 068848240a8..02cced183b2 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -192,23 +192,24 @@ rcu/rcuhier (which displays the struct rcu_node hierarchy). | |||
192 | The output of "cat rcu/rcudata" looks as follows: | 192 | The output of "cat rcu/rcudata" looks as follows: |
193 | 193 | ||
194 | rcu: | 194 | rcu: |
195 | 0 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=1 rp=3c2a dt=23301/73 dn=2 df=1882 of=0 ri=2126 ql=2 b=10 | 195 | rcu: |
196 | 1 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=3 rp=39a6 dt=78073/1 dn=2 df=1402 of=0 ri=1875 ql=46 b=10 | 196 | 0 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=10951/1 dn=0 df=1101 of=0 ri=36 ql=0 b=10 |
197 | 2 c=4010 g=4010 pq=1 pqc=4010 qp=0 rpfq=-5 rp=1d12 dt=16646/0 dn=2 df=3140 of=0 ri=2080 ql=0 b=10 | 197 | 1 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=16117/1 dn=0 df=1015 of=0 ri=0 ql=0 b=10 |
198 | 3 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=2b50 dt=21159/1 dn=2 df=2230 of=0 ri=1923 ql=72 b=10 | 198 | 2 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=1445/1 dn=0 df=1839 of=0 ri=0 ql=0 b=10 |
199 | 4 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1644 dt=5783/1 dn=2 df=3348 of=0 ri=2805 ql=7 b=10 | 199 | 3 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=6681/1 dn=0 df=1545 of=0 ri=0 ql=0 b=10 |
200 | 5 c=4012 g=4013 pq=0 pqc=4011 qp=1 rpfq=3 rp=1aac dt=5879/1 dn=2 df=3140 of=0 ri=2066 ql=10 b=10 | 200 | 4 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=1003/1 dn=0 df=1992 of=0 ri=0 ql=0 b=10 |
201 | 6 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=ed8 dt=5847/1 dn=2 df=3797 of=0 ri=1266 ql=10 b=10 | 201 | 5 c=17829 g=17830 pq=1 pqc=17829 qp=1 dt=3887/1 dn=0 df=3331 of=0 ri=4 ql=2 b=10 |
202 | 7 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1fa2 dt=6199/1 dn=2 df=2795 of=0 ri=2162 ql=28 b=10 | 202 | 6 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=859/1 dn=0 df=3224 of=0 ri=0 ql=0 b=10 |
203 | 7 c=17829 g=17830 pq=0 pqc=17829 qp=1 dt=3761/1 dn=0 df=1818 of=0 ri=0 ql=2 b=10 | ||
203 | rcu_bh: | 204 | rcu_bh: |
204 | 0 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-145 rp=21d6 dt=23301/73 dn=2 df=0 of=0 ri=0 ql=0 b=10 | 205 | 0 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=10951/1 dn=0 df=0 of=0 ri=0 ql=0 b=10 |
205 | 1 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-170 rp=20ce dt=78073/1 dn=2 df=26 of=0 ri=5 ql=0 b=10 | 206 | 1 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=16117/1 dn=0 df=13 of=0 ri=0 ql=0 b=10 |
206 | 2 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-83 rp=fbd dt=16646/0 dn=2 df=28 of=0 ri=4 ql=0 b=10 | 207 | 2 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=1445/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 |
207 | 3 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-105 rp=178c dt=21159/1 dn=2 df=28 of=0 ri=2 ql=0 b=10 | 208 | 3 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=6681/1 dn=0 df=9 of=0 ri=0 ql=0 b=10 |
208 | 4 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-30 rp=b54 dt=5783/1 dn=2 df=32 of=0 ri=0 ql=0 b=10 | 209 | 4 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=1003/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 |
209 | 5 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-29 rp=df5 dt=5879/1 dn=2 df=30 of=0 ri=3 ql=0 b=10 | 210 | 5 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3887/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 |
210 | 6 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-28 rp=788 dt=5847/1 dn=2 df=32 of=0 ri=0 ql=0 b=10 | 211 | 6 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=859/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 |
211 | 7 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-53 rp=1098 dt=6199/1 dn=2 df=30 of=0 ri=3 ql=0 b=10 | 212 | 7 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3761/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 |
212 | 213 | ||
213 | The first section lists the rcu_data structures for rcu, the second for | 214 | The first section lists the rcu_data structures for rcu, the second for |
214 | rcu_bh. Each section has one line per CPU, or eight for this 8-CPU system. | 215 | rcu_bh. Each section has one line per CPU, or eight for this 8-CPU system. |
@@ -253,12 +254,6 @@ o "pqc" indicates which grace period the last-observed quiescent | |||
253 | o "qp" indicates that RCU still expects a quiescent state from | 254 | o "qp" indicates that RCU still expects a quiescent state from |
254 | this CPU. | 255 | this CPU. |
255 | 256 | ||
256 | o "rpfq" is the number of rcu_pending() calls on this CPU required | ||
257 | to induce this CPU to invoke force_quiescent_state(). | ||
258 | |||
259 | o "rp" is low-order four hex digits of the count of how many times | ||
260 | rcu_pending() has been invoked on this CPU. | ||
261 | |||
262 | o "dt" is the current value of the dyntick counter that is incremented | 257 | o "dt" is the current value of the dyntick counter that is incremented |
263 | when entering or leaving dynticks idle state, either by the | 258 | when entering or leaving dynticks idle state, either by the |
264 | scheduler or by irq. The number after the "/" is the interrupt | 259 | scheduler or by irq. The number after the "/" is the interrupt |
@@ -305,6 +300,9 @@ o "b" is the batch limit for this CPU. If more than this number | |||
305 | of RCU callbacks is ready to invoke, then the remainder will | 300 | of RCU callbacks is ready to invoke, then the remainder will |
306 | be deferred. | 301 | be deferred. |
307 | 302 | ||
303 | There is also an rcu/rcudata.csv file with the same information in | ||
304 | comma-separated-variable spreadsheet format. | ||
305 | |||
308 | 306 | ||
309 | The output of "cat rcu/rcugp" looks as follows: | 307 | The output of "cat rcu/rcugp" looks as follows: |
310 | 308 | ||
@@ -411,3 +409,63 @@ o Each element of the form "1/1 0:127 ^0" represents one struct | |||
411 | For example, the first entry at the lowest level shows | 409 | For example, the first entry at the lowest level shows |
412 | "^0", indicating that it corresponds to bit zero in | 410 | "^0", indicating that it corresponds to bit zero in |
413 | the first entry at the middle level. | 411 | the first entry at the middle level. |
412 | |||
413 | |||
414 | The output of "cat rcu/rcu_pending" looks as follows: | ||
415 | |||
416 | rcu: | ||
417 | 0 np=255892 qsp=53936 cbr=0 cng=14417 gpc=10033 gps=24320 nf=6445 nn=146741 | ||
418 | 1 np=261224 qsp=54638 cbr=0 cng=25723 gpc=16310 gps=2849 nf=5912 nn=155792 | ||
419 | 2 np=237496 qsp=49664 cbr=0 cng=2762 gpc=45478 gps=1762 nf=1201 nn=136629 | ||
420 | 3 np=236249 qsp=48766 cbr=0 cng=286 gpc=48049 gps=1218 nf=207 nn=137723 | ||
421 | 4 np=221310 qsp=46850 cbr=0 cng=26 gpc=43161 gps=4634 nf=3529 nn=123110 | ||
422 | 5 np=237332 qsp=48449 cbr=0 cng=54 gpc=47920 gps=3252 nf=201 nn=137456 | ||
423 | 6 np=219995 qsp=46718 cbr=0 cng=50 gpc=42098 gps=6093 nf=4202 nn=120834 | ||
424 | 7 np=249893 qsp=49390 cbr=0 cng=72 gpc=38400 gps=17102 nf=41 nn=144888 | ||
425 | rcu_bh: | ||
426 | 0 np=146741 qsp=1419 cbr=0 cng=6 gpc=0 gps=0 nf=2 nn=145314 | ||
427 | 1 np=155792 qsp=12597 cbr=0 cng=0 gpc=4 gps=8 nf=3 nn=143180 | ||
428 | 2 np=136629 qsp=18680 cbr=0 cng=0 gpc=7 gps=6 nf=0 nn=117936 | ||
429 | 3 np=137723 qsp=2843 cbr=0 cng=0 gpc=10 gps=7 nf=0 nn=134863 | ||
430 | 4 np=123110 qsp=12433 cbr=0 cng=0 gpc=4 gps=2 nf=0 nn=110671 | ||
431 | 5 np=137456 qsp=4210 cbr=0 cng=0 gpc=6 gps=5 nf=0 nn=133235 | ||
432 | 6 np=120834 qsp=9902 cbr=0 cng=0 gpc=6 gps=3 nf=2 nn=110921 | ||
433 | 7 np=144888 qsp=26336 cbr=0 cng=0 gpc=8 gps=2 nf=0 nn=118542 | ||
434 | |||
435 | As always, this is once again split into "rcu" and "rcu_bh" portions. | ||
436 | The fields are as follows: | ||
437 | |||
438 | o "np" is the number of times that __rcu_pending() has been invoked | ||
439 | for the corresponding flavor of RCU. | ||
440 | |||
441 | o "qsp" is the number of times that the RCU was waiting for a | ||
442 | quiescent state from this CPU. | ||
443 | |||
444 | o "cbr" is the number of times that this CPU had RCU callbacks | ||
445 | that had passed through a grace period, and were thus ready | ||
446 | to be invoked. | ||
447 | |||
448 | o "cng" is the number of times that this CPU needed another | ||
449 | grace period while RCU was idle. | ||
450 | |||
451 | o "gpc" is the number of times that an old grace period had | ||
452 | completed, but this CPU was not yet aware of it. | ||
453 | |||
454 | o "gps" is the number of times that a new grace period had started, | ||
455 | but this CPU was not yet aware of it. | ||
456 | |||
457 | o "nf" is the number of times that this CPU suspected that the | ||
458 | current grace period had run for too long, and thus needed to | ||
459 | be forced. | ||
460 | |||
461 | Please note that "forcing" consists of sending resched IPIs | ||
462 | to holdout CPUs. If that CPU really still is in an old RCU | ||
463 | read-side critical section, then we really do have to wait for it. | ||
464 | The assumption behing "forcing" is that the CPU is not still in | ||
465 | an old RCU read-side critical section, but has not yet responded | ||
466 | for some other reason. | ||
467 | |||
468 | o "nn" is the number of times that this CPU needed nothing. Alert | ||
469 | readers will note that the rcu "nn" number for a given CPU very | ||
470 | closely matches the rcu_bh "np" number for that same CPU. This | ||
471 | is due to short-circuit evaluation in rcu_pending(). | ||
diff --git a/Documentation/Smack.txt b/Documentation/Smack.txt index 629c92e9978..34614b4c708 100644 --- a/Documentation/Smack.txt +++ b/Documentation/Smack.txt | |||
@@ -184,8 +184,9 @@ length. Single character labels using special characters, that being anything | |||
184 | other than a letter or digit, are reserved for use by the Smack development | 184 | other than a letter or digit, are reserved for use by the Smack development |
185 | team. Smack labels are unstructured, case sensitive, and the only operation | 185 | team. Smack labels are unstructured, case sensitive, and the only operation |
186 | ever performed on them is comparison for equality. Smack labels cannot | 186 | ever performed on them is comparison for equality. Smack labels cannot |
187 | contain unprintable characters or the "/" (slash) character. Smack labels | 187 | contain unprintable characters, the "/" (slash), the "\" (backslash), the "'" |
188 | cannot begin with a '-', which is reserved for special options. | 188 | (quote) and '"' (double-quote) characters. |
189 | Smack labels cannot begin with a '-', which is reserved for special options. | ||
189 | 190 | ||
190 | There are some predefined labels: | 191 | There are some predefined labels: |
191 | 192 | ||
@@ -523,3 +524,18 @@ Smack supports some mount options: | |||
523 | 524 | ||
524 | These mount options apply to all file system types. | 525 | These mount options apply to all file system types. |
525 | 526 | ||
527 | Smack auditing | ||
528 | |||
529 | If you want Smack auditing of security events, you need to set CONFIG_AUDIT | ||
530 | in your kernel configuration. | ||
531 | By default, all denied events will be audited. You can change this behavior by | ||
532 | writing a single character to the /smack/logging file : | ||
533 | 0 : no logging | ||
534 | 1 : log denied (default) | ||
535 | 2 : log accepted | ||
536 | 3 : log denied & accepted | ||
537 | |||
538 | Events are logged as 'key=value' pairs, for each event you at least will get | ||
539 | the subjet, the object, the rights requested, the action, the kernel function | ||
540 | that triggered the event, plus other pairs depending on the type of event | ||
541 | audited. | ||
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 6fab97ea7e6..8d2158a1c6a 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -186,7 +186,7 @@ a virtual address mapping (unlike the earlier scheme of virtual address | |||
186 | do not have a corresponding kernel virtual address space mapping) and | 186 | do not have a corresponding kernel virtual address space mapping) and |
187 | low-memory pages. | 187 | low-memory pages. |
188 | 188 | ||
189 | Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion | 189 | Note: Please refer to Documentation/DMA-mapping.txt for a discussion |
190 | on PCI high mem DMA aspects and mapping of scatter gather lists, and support | 190 | on PCI high mem DMA aspects and mapping of scatter gather lists, and support |
191 | for 64 bit PCI. | 191 | for 64 bit PCI. |
192 | 192 | ||
diff --git a/Documentation/filesystems/gfs2-glocks.txt b/Documentation/filesystems/gfs2-glocks.txt index 4dae9a3840b..0494f78d87e 100644 --- a/Documentation/filesystems/gfs2-glocks.txt +++ b/Documentation/filesystems/gfs2-glocks.txt | |||
@@ -60,7 +60,7 @@ go_lock | Called for the first local holder of a lock | |||
60 | go_unlock | Called on the final local unlock of a lock | 60 | go_unlock | Called on the final local unlock of a lock |
61 | go_dump | Called to print content of object for debugfs file, or on | 61 | go_dump | Called to print content of object for debugfs file, or on |
62 | | error to dump glock to the log. | 62 | | error to dump glock to the log. |
63 | go_type; | The type of the glock, LM_TYPE_..... | 63 | go_type | The type of the glock, LM_TYPE_..... |
64 | go_min_hold_time | The minimum hold time | 64 | go_min_hold_time | The minimum hold time |
65 | 65 | ||
66 | The minimum hold time for each lock is the time after a remote lock | 66 | The minimum hold time for each lock is the time after a remote lock |
diff --git a/Documentation/filesystems/gfs2.txt b/Documentation/filesystems/gfs2.txt index 593004b6bba..5e3ab8f3bef 100644 --- a/Documentation/filesystems/gfs2.txt +++ b/Documentation/filesystems/gfs2.txt | |||
@@ -11,18 +11,15 @@ their I/O so file system consistency is maintained. One of the nifty | |||
11 | features of GFS is perfect consistency -- changes made to the file system | 11 | features of GFS is perfect consistency -- changes made to the file system |
12 | on one machine show up immediately on all other machines in the cluster. | 12 | on one machine show up immediately on all other machines in the cluster. |
13 | 13 | ||
14 | GFS uses interchangable inter-node locking mechanisms. Different lock | 14 | GFS uses interchangable inter-node locking mechanisms, the currently |
15 | modules can plug into GFS and each file system selects the appropriate | 15 | supported mechanisms are: |
16 | lock module at mount time. Lock modules include: | ||
17 | 16 | ||
18 | lock_nolock -- allows gfs to be used as a local file system | 17 | lock_nolock -- allows gfs to be used as a local file system |
19 | 18 | ||
20 | lock_dlm -- uses a distributed lock manager (dlm) for inter-node locking | 19 | lock_dlm -- uses a distributed lock manager (dlm) for inter-node locking |
21 | The dlm is found at linux/fs/dlm/ | 20 | The dlm is found at linux/fs/dlm/ |
22 | 21 | ||
23 | In addition to interfacing with an external locking manager, a gfs lock | 22 | Lock_dlm depends on user space cluster management systems found |
24 | module is responsible for interacting with external cluster management | ||
25 | systems. Lock_dlm depends on user space cluster management systems found | ||
26 | at the URL above. | 23 | at the URL above. |
27 | 24 | ||
28 | To use gfs as a local file system, no external clustering systems are | 25 | To use gfs as a local file system, no external clustering systems are |
@@ -31,13 +28,19 @@ needed, simply: | |||
31 | $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device | 28 | $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device |
32 | $ mount -t gfs2 /dev/block_device /dir | 29 | $ mount -t gfs2 /dev/block_device /dir |
33 | 30 | ||
34 | GFS2 is not on-disk compatible with previous versions of GFS. | 31 | If you are using Fedora, you need to install the gfs2-utils package |
32 | and, for lock_dlm, you will also need to install the cman package | ||
33 | and write a cluster.conf as per the documentation. | ||
34 | |||
35 | GFS2 is not on-disk compatible with previous versions of GFS, but it | ||
36 | is pretty close. | ||
35 | 37 | ||
36 | The following man pages can be found at the URL above: | 38 | The following man pages can be found at the URL above: |
37 | gfs2_fsck to repair a filesystem | 39 | fsck.gfs2 to repair a filesystem |
38 | gfs2_grow to expand a filesystem online | 40 | gfs2_grow to expand a filesystem online |
39 | gfs2_jadd to add journals to a filesystem online | 41 | gfs2_jadd to add journals to a filesystem online |
40 | gfs2_tool to manipulate, examine and tune a filesystem | 42 | gfs2_tool to manipulate, examine and tune a filesystem |
41 | gfs2_quota to examine and change quota values in a filesystem | 43 | gfs2_quota to examine and change quota values in a filesystem |
44 | gfs2_convert to convert a gfs filesystem to gfs2 in-place | ||
42 | mount.gfs2 to help mount(8) mount a filesystem | 45 | mount.gfs2 to help mount(8) mount a filesystem |
43 | mkfs.gfs2 to make a filesystem | 46 | mkfs.gfs2 to make a filesystem |
diff --git a/Documentation/futex-requeue-pi.txt b/Documentation/futex-requeue-pi.txt new file mode 100644 index 00000000000..9dc1ff4fd53 --- /dev/null +++ b/Documentation/futex-requeue-pi.txt | |||
@@ -0,0 +1,131 @@ | |||
1 | Futex Requeue PI | ||
2 | ---------------- | ||
3 | |||
4 | Requeueing of tasks from a non-PI futex to a PI futex requires | ||
5 | special handling in order to ensure the underlying rt_mutex is never | ||
6 | left without an owner if it has waiters; doing so would break the PI | ||
7 | boosting logic [see rt-mutex-desgin.txt] For the purposes of | ||
8 | brevity, this action will be referred to as "requeue_pi" throughout | ||
9 | this document. Priority inheritance is abbreviated throughout as | ||
10 | "PI". | ||
11 | |||
12 | Motivation | ||
13 | ---------- | ||
14 | |||
15 | Without requeue_pi, the glibc implementation of | ||
16 | pthread_cond_broadcast() must resort to waking all the tasks waiting | ||
17 | on a pthread_condvar and letting them try to sort out which task | ||
18 | gets to run first in classic thundering-herd formation. An ideal | ||
19 | implementation would wake the highest-priority waiter, and leave the | ||
20 | rest to the natural wakeup inherent in unlocking the mutex | ||
21 | associated with the condvar. | ||
22 | |||
23 | Consider the simplified glibc calls: | ||
24 | |||
25 | /* caller must lock mutex */ | ||
26 | pthread_cond_wait(cond, mutex) | ||
27 | { | ||
28 | lock(cond->__data.__lock); | ||
29 | unlock(mutex); | ||
30 | do { | ||
31 | unlock(cond->__data.__lock); | ||
32 | futex_wait(cond->__data.__futex); | ||
33 | lock(cond->__data.__lock); | ||
34 | } while(...) | ||
35 | unlock(cond->__data.__lock); | ||
36 | lock(mutex); | ||
37 | } | ||
38 | |||
39 | pthread_cond_broadcast(cond) | ||
40 | { | ||
41 | lock(cond->__data.__lock); | ||
42 | unlock(cond->__data.__lock); | ||
43 | futex_requeue(cond->data.__futex, cond->mutex); | ||
44 | } | ||
45 | |||
46 | Once pthread_cond_broadcast() requeues the tasks, the cond->mutex | ||
47 | has waiters. Note that pthread_cond_wait() attempts to lock the | ||
48 | mutex only after it has returned to user space. This will leave the | ||
49 | underlying rt_mutex with waiters, and no owner, breaking the | ||
50 | previously mentioned PI-boosting algorithms. | ||
51 | |||
52 | In order to support PI-aware pthread_condvar's, the kernel needs to | ||
53 | be able to requeue tasks to PI futexes. This support implies that | ||
54 | upon a successful futex_wait system call, the caller would return to | ||
55 | user space already holding the PI futex. The glibc implementation | ||
56 | would be modified as follows: | ||
57 | |||
58 | |||
59 | /* caller must lock mutex */ | ||
60 | pthread_cond_wait_pi(cond, mutex) | ||
61 | { | ||
62 | lock(cond->__data.__lock); | ||
63 | unlock(mutex); | ||
64 | do { | ||
65 | unlock(cond->__data.__lock); | ||
66 | futex_wait_requeue_pi(cond->__data.__futex); | ||
67 | lock(cond->__data.__lock); | ||
68 | } while(...) | ||
69 | unlock(cond->__data.__lock); | ||
70 | /* the kernel acquired the the mutex for us */ | ||
71 | } | ||
72 | |||
73 | pthread_cond_broadcast_pi(cond) | ||
74 | { | ||
75 | lock(cond->__data.__lock); | ||
76 | unlock(cond->__data.__lock); | ||
77 | futex_requeue_pi(cond->data.__futex, cond->mutex); | ||
78 | } | ||
79 | |||
80 | The actual glibc implementation will likely test for PI and make the | ||
81 | necessary changes inside the existing calls rather than creating new | ||
82 | calls for the PI cases. Similar changes are needed for | ||
83 | pthread_cond_timedwait() and pthread_cond_signal(). | ||
84 | |||
85 | Implementation | ||
86 | -------------- | ||
87 | |||
88 | In order to ensure the rt_mutex has an owner if it has waiters, it | ||
89 | is necessary for both the requeue code, as well as the waiting code, | ||
90 | to be able to acquire the rt_mutex before returning to user space. | ||
91 | The requeue code cannot simply wake the waiter and leave it to | ||
92 | acquire the rt_mutex as it would open a race window between the | ||
93 | requeue call returning to user space and the waiter waking and | ||
94 | starting to run. This is especially true in the uncontended case. | ||
95 | |||
96 | The solution involves two new rt_mutex helper routines, | ||
97 | rt_mutex_start_proxy_lock() and rt_mutex_finish_proxy_lock(), which | ||
98 | allow the requeue code to acquire an uncontended rt_mutex on behalf | ||
99 | of the waiter and to enqueue the waiter on a contended rt_mutex. | ||
100 | Two new system calls provide the kernel<->user interface to | ||
101 | requeue_pi: FUTEX_WAIT_REQUEUE_PI and FUTEX_REQUEUE_CMP_PI. | ||
102 | |||
103 | FUTEX_WAIT_REQUEUE_PI is called by the waiter (pthread_cond_wait() | ||
104 | and pthread_cond_timedwait()) to block on the initial futex and wait | ||
105 | to be requeued to a PI-aware futex. The implementation is the | ||
106 | result of a high-speed collision between futex_wait() and | ||
107 | futex_lock_pi(), with some extra logic to check for the additional | ||
108 | wake-up scenarios. | ||
109 | |||
110 | FUTEX_REQUEUE_CMP_PI is called by the waker | ||
111 | (pthread_cond_broadcast() and pthread_cond_signal()) to requeue and | ||
112 | possibly wake the waiting tasks. Internally, this system call is | ||
113 | still handled by futex_requeue (by passing requeue_pi=1). Before | ||
114 | requeueing, futex_requeue() attempts to acquire the requeue target | ||
115 | PI futex on behalf of the top waiter. If it can, this waiter is | ||
116 | woken. futex_requeue() then proceeds to requeue the remaining | ||
117 | nr_wake+nr_requeue tasks to the PI futex, calling | ||
118 | rt_mutex_start_proxy_lock() prior to each requeue to prepare the | ||
119 | task as a waiter on the underlying rt_mutex. It is possible that | ||
120 | the lock can be acquired at this stage as well, if so, the next | ||
121 | waiter is woken to finish the acquisition of the lock. | ||
122 | |||
123 | FUTEX_REQUEUE_PI accepts nr_wake and nr_requeue as arguments, but | ||
124 | their sum is all that really matters. futex_requeue() will wake or | ||
125 | requeue up to nr_wake + nr_requeue tasks. It will wake only as many | ||
126 | tasks as it can acquire the lock for, which in the majority of cases | ||
127 | should be 0 as good programming practice dictates that the caller of | ||
128 | either pthread_cond_broadcast() or pthread_cond_signal() acquire the | ||
129 | mutex prior to making the call. FUTEX_REQUEUE_PI requires that | ||
130 | nr_wake=1. nr_requeue should be INT_MAX for broadcast and 0 for | ||
131 | signal. | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 11648c13a72..7bcdebffdab 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -56,7 +56,6 @@ parameter is applicable: | |||
56 | ISAPNP ISA PnP code is enabled. | 56 | ISAPNP ISA PnP code is enabled. |
57 | ISDN Appropriate ISDN support is enabled. | 57 | ISDN Appropriate ISDN support is enabled. |
58 | JOY Appropriate joystick support is enabled. | 58 | JOY Appropriate joystick support is enabled. |
59 | KMEMTRACE kmemtrace is enabled. | ||
60 | LIBATA Libata driver is enabled | 59 | LIBATA Libata driver is enabled |
61 | LP Printer support is enabled. | 60 | LP Printer support is enabled. |
62 | LOOP Loopback device support is enabled. | 61 | LOOP Loopback device support is enabled. |
@@ -329,11 +328,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
329 | flushed before they will be reused, which | 328 | flushed before they will be reused, which |
330 | is a lot of faster | 329 | is a lot of faster |
331 | 330 | ||
332 | amd_iommu_size= [HW,X86-64] | ||
333 | Define the size of the aperture for the AMD IOMMU | ||
334 | driver. Possible values are: | ||
335 | '32M', '64M' (default), '128M', '256M', '512M', '1G' | ||
336 | |||
337 | amijoy.map= [HW,JOY] Amiga joystick support | 331 | amijoy.map= [HW,JOY] Amiga joystick support |
338 | Map of devices attached to JOY0DAT and JOY1DAT | 332 | Map of devices attached to JOY0DAT and JOY1DAT |
339 | Format: <a>,<b> | 333 | Format: <a>,<b> |
@@ -646,6 +640,13 @@ and is between 256 and 4096 characters. It is defined in the file | |||
646 | DMA-API debugging code disables itself because the | 640 | DMA-API debugging code disables itself because the |
647 | architectural default is too low. | 641 | architectural default is too low. |
648 | 642 | ||
643 | dma_debug_driver=<driver_name> | ||
644 | With this option the DMA-API debugging driver | ||
645 | filter feature can be enabled at boot time. Just | ||
646 | pass the driver to filter for as the parameter. | ||
647 | The filter can be disabled or changed to another | ||
648 | driver later using sysfs. | ||
649 | |||
649 | dscc4.setup= [NET] | 650 | dscc4.setup= [NET] |
650 | 651 | ||
651 | dtc3181e= [HW,SCSI] | 652 | dtc3181e= [HW,SCSI] |
@@ -752,12 +753,25 @@ and is between 256 and 4096 characters. It is defined in the file | |||
752 | ia64_pal_cache_flush instead of SAL_CACHE_FLUSH. | 753 | ia64_pal_cache_flush instead of SAL_CACHE_FLUSH. |
753 | 754 | ||
754 | ftrace=[tracer] | 755 | ftrace=[tracer] |
755 | [ftrace] will set and start the specified tracer | 756 | [FTRACE] will set and start the specified tracer |
756 | as early as possible in order to facilitate early | 757 | as early as possible in order to facilitate early |
757 | boot debugging. | 758 | boot debugging. |
758 | 759 | ||
759 | ftrace_dump_on_oops | 760 | ftrace_dump_on_oops |
760 | [ftrace] will dump the trace buffers on oops. | 761 | [FTRACE] will dump the trace buffers on oops. |
762 | |||
763 | ftrace_filter=[function-list] | ||
764 | [FTRACE] Limit the functions traced by the function | ||
765 | tracer at boot up. function-list is a comma separated | ||
766 | list of functions. This list can be changed at run | ||
767 | time by the set_ftrace_filter file in the debugfs | ||
768 | tracing directory. | ||
769 | |||
770 | ftrace_notrace=[function-list] | ||
771 | [FTRACE] Do not trace the functions specified in | ||
772 | function-list. This list can be changed at run time | ||
773 | by the set_ftrace_notrace file in the debugfs | ||
774 | tracing directory. | ||
761 | 775 | ||
762 | gamecon.map[2|3]= | 776 | gamecon.map[2|3]= |
763 | [HW,JOY] Multisystem joystick and NES/SNES/PSX pad | 777 | [HW,JOY] Multisystem joystick and NES/SNES/PSX pad |
@@ -914,6 +928,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
914 | Formt: { "sha1" | "md5" } | 928 | Formt: { "sha1" | "md5" } |
915 | default: "sha1" | 929 | default: "sha1" |
916 | 930 | ||
931 | ima_tcb [IMA] | ||
932 | Load a policy which meets the needs of the Trusted | ||
933 | Computing Base. This means IMA will measure all | ||
934 | programs exec'd, files mmap'd for exec, and all files | ||
935 | opened for read by uid=0. | ||
936 | |||
917 | in2000= [HW,SCSI] | 937 | in2000= [HW,SCSI] |
918 | See header of drivers/scsi/in2000.c. | 938 | See header of drivers/scsi/in2000.c. |
919 | 939 | ||
@@ -1054,15 +1074,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1054 | use the HighMem zone if it exists, and the Normal | 1074 | use the HighMem zone if it exists, and the Normal |
1055 | zone if it does not. | 1075 | zone if it does not. |
1056 | 1076 | ||
1057 | kmemtrace.enable= [KNL,KMEMTRACE] Format: { yes | no } | ||
1058 | Controls whether kmemtrace is enabled | ||
1059 | at boot-time. | ||
1060 | |||
1061 | kmemtrace.subbufs=n [KNL,KMEMTRACE] Overrides the number of | ||
1062 | subbufs kmemtrace's relay channel has. Set this | ||
1063 | higher than default (KMEMTRACE_N_SUBBUFS in code) if | ||
1064 | you experience buffer overruns. | ||
1065 | |||
1066 | kgdboc= [HW] kgdb over consoles. | 1077 | kgdboc= [HW] kgdb over consoles. |
1067 | Requires a tty driver that supports console polling. | 1078 | Requires a tty driver that supports console polling. |
1068 | (only serial suported for now) | 1079 | (only serial suported for now) |
@@ -1072,6 +1083,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1072 | Configure the RouterBoard 532 series on-chip | 1083 | Configure the RouterBoard 532 series on-chip |
1073 | Ethernet adapter MAC address. | 1084 | Ethernet adapter MAC address. |
1074 | 1085 | ||
1086 | kmemleak= [KNL] Boot-time kmemleak enable/disable | ||
1087 | Valid arguments: on, off | ||
1088 | Default: on | ||
1089 | |||
1075 | kstack=N [X86] Print N words from the kernel stack | 1090 | kstack=N [X86] Print N words from the kernel stack |
1076 | in oops dumps. | 1091 | in oops dumps. |
1077 | 1092 | ||
@@ -1663,6 +1678,14 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1663 | oprofile.timer= [HW] | 1678 | oprofile.timer= [HW] |
1664 | Use timer interrupt instead of performance counters | 1679 | Use timer interrupt instead of performance counters |
1665 | 1680 | ||
1681 | oprofile.cpu_type= Force an oprofile cpu type | ||
1682 | This might be useful if you have an older oprofile | ||
1683 | userland or if you want common events. | ||
1684 | Format: { archperfmon } | ||
1685 | archperfmon: [X86] Force use of architectural | ||
1686 | perfmon on Intel CPUs instead of the | ||
1687 | CPU specific event set. | ||
1688 | |||
1666 | osst= [HW,SCSI] SCSI Tape Driver | 1689 | osst= [HW,SCSI] SCSI Tape Driver |
1667 | Format: <buffer_size>,<write_threshold> | 1690 | Format: <buffer_size>,<write_threshold> |
1668 | See also Documentation/scsi/st.txt. | 1691 | See also Documentation/scsi/st.txt. |
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt new file mode 100644 index 00000000000..0112da3b9ab --- /dev/null +++ b/Documentation/kmemleak.txt | |||
@@ -0,0 +1,142 @@ | |||
1 | Kernel Memory Leak Detector | ||
2 | =========================== | ||
3 | |||
4 | Introduction | ||
5 | ------------ | ||
6 | |||
7 | Kmemleak provides a way of detecting possible kernel memory leaks in a | ||
8 | way similar to a tracing garbage collector | ||
9 | (http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29#Tracing_garbage_collectors), | ||
10 | with the difference that the orphan objects are not freed but only | ||
11 | reported via /sys/kernel/debug/kmemleak. A similar method is used by the | ||
12 | Valgrind tool (memcheck --leak-check) to detect the memory leaks in | ||
13 | user-space applications. | ||
14 | |||
15 | Usage | ||
16 | ----- | ||
17 | |||
18 | CONFIG_DEBUG_KMEMLEAK in "Kernel hacking" has to be enabled. A kernel | ||
19 | thread scans the memory every 10 minutes (by default) and prints any new | ||
20 | unreferenced objects found. To trigger an intermediate scan and display | ||
21 | all the possible memory leaks: | ||
22 | |||
23 | # mount -t debugfs nodev /sys/kernel/debug/ | ||
24 | # cat /sys/kernel/debug/kmemleak | ||
25 | |||
26 | Note that the orphan objects are listed in the order they were allocated | ||
27 | and one object at the beginning of the list may cause other subsequent | ||
28 | objects to be reported as orphan. | ||
29 | |||
30 | Memory scanning parameters can be modified at run-time by writing to the | ||
31 | /sys/kernel/debug/kmemleak file. The following parameters are supported: | ||
32 | |||
33 | off - disable kmemleak (irreversible) | ||
34 | stack=on - enable the task stacks scanning | ||
35 | stack=off - disable the tasks stacks scanning | ||
36 | scan=on - start the automatic memory scanning thread | ||
37 | scan=off - stop the automatic memory scanning thread | ||
38 | scan=<secs> - set the automatic memory scanning period in seconds (0 | ||
39 | to disable it) | ||
40 | |||
41 | Kmemleak can also be disabled at boot-time by passing "kmemleak=off" on | ||
42 | the kernel command line. | ||
43 | |||
44 | Basic Algorithm | ||
45 | --------------- | ||
46 | |||
47 | The memory allocations via kmalloc, vmalloc, kmem_cache_alloc and | ||
48 | friends are traced and the pointers, together with additional | ||
49 | information like size and stack trace, are stored in a prio search tree. | ||
50 | The corresponding freeing function calls are tracked and the pointers | ||
51 | removed from the kmemleak data structures. | ||
52 | |||
53 | An allocated block of memory is considered orphan if no pointer to its | ||
54 | start address or to any location inside the block can be found by | ||
55 | scanning the memory (including saved registers). This means that there | ||
56 | might be no way for the kernel to pass the address of the allocated | ||
57 | block to a freeing function and therefore the block is considered a | ||
58 | memory leak. | ||
59 | |||
60 | The scanning algorithm steps: | ||
61 | |||
62 | 1. mark all objects as white (remaining white objects will later be | ||
63 | considered orphan) | ||
64 | 2. scan the memory starting with the data section and stacks, checking | ||
65 | the values against the addresses stored in the prio search tree. If | ||
66 | a pointer to a white object is found, the object is added to the | ||
67 | gray list | ||
68 | 3. scan the gray objects for matching addresses (some white objects | ||
69 | can become gray and added at the end of the gray list) until the | ||
70 | gray set is finished | ||
71 | 4. the remaining white objects are considered orphan and reported via | ||
72 | /sys/kernel/debug/kmemleak | ||
73 | |||
74 | Some allocated memory blocks have pointers stored in the kernel's | ||
75 | internal data structures and they cannot be detected as orphans. To | ||
76 | avoid this, kmemleak can also store the number of values pointing to an | ||
77 | address inside the block address range that need to be found so that the | ||
78 | block is not considered a leak. One example is __vmalloc(). | ||
79 | |||
80 | Kmemleak API | ||
81 | ------------ | ||
82 | |||
83 | See the include/linux/kmemleak.h header for the functions prototype. | ||
84 | |||
85 | kmemleak_init - initialize kmemleak | ||
86 | kmemleak_alloc - notify of a memory block allocation | ||
87 | kmemleak_free - notify of a memory block freeing | ||
88 | kmemleak_not_leak - mark an object as not a leak | ||
89 | kmemleak_ignore - do not scan or report an object as leak | ||
90 | kmemleak_scan_area - add scan areas inside a memory block | ||
91 | kmemleak_no_scan - do not scan a memory block | ||
92 | kmemleak_erase - erase an old value in a pointer variable | ||
93 | kmemleak_alloc_recursive - as kmemleak_alloc but checks the recursiveness | ||
94 | kmemleak_free_recursive - as kmemleak_free but checks the recursiveness | ||
95 | |||
96 | Dealing with false positives/negatives | ||
97 | -------------------------------------- | ||
98 | |||
99 | The false negatives are real memory leaks (orphan objects) but not | ||
100 | reported by kmemleak because values found during the memory scanning | ||
101 | point to such objects. To reduce the number of false negatives, kmemleak | ||
102 | provides the kmemleak_ignore, kmemleak_scan_area, kmemleak_no_scan and | ||
103 | kmemleak_erase functions (see above). The task stacks also increase the | ||
104 | amount of false negatives and their scanning is not enabled by default. | ||
105 | |||
106 | The false positives are objects wrongly reported as being memory leaks | ||
107 | (orphan). For objects known not to be leaks, kmemleak provides the | ||
108 | kmemleak_not_leak function. The kmemleak_ignore could also be used if | ||
109 | the memory block is known not to contain other pointers and it will no | ||
110 | longer be scanned. | ||
111 | |||
112 | Some of the reported leaks are only transient, especially on SMP | ||
113 | systems, because of pointers temporarily stored in CPU registers or | ||
114 | stacks. Kmemleak defines MSECS_MIN_AGE (defaulting to 1000) representing | ||
115 | the minimum age of an object to be reported as a memory leak. | ||
116 | |||
117 | Limitations and Drawbacks | ||
118 | ------------------------- | ||
119 | |||
120 | The main drawback is the reduced performance of memory allocation and | ||
121 | freeing. To avoid other penalties, the memory scanning is only performed | ||
122 | when the /sys/kernel/debug/kmemleak file is read. Anyway, this tool is | ||
123 | intended for debugging purposes where the performance might not be the | ||
124 | most important requirement. | ||
125 | |||
126 | To keep the algorithm simple, kmemleak scans for values pointing to any | ||
127 | address inside a block's address range. This may lead to an increased | ||
128 | number of false negatives. However, it is likely that a real memory leak | ||
129 | will eventually become visible. | ||
130 | |||
131 | Another source of false negatives is the data stored in non-pointer | ||
132 | values. In a future version, kmemleak could only scan the pointer | ||
133 | members in the allocated structures. This feature would solve many of | ||
134 | the false negative cases described above. | ||
135 | |||
136 | The tool can report false positives. These are cases where an allocated | ||
137 | block doesn't need to be freed (some cases in the init_call functions), | ||
138 | the pointer is calculated by other methods than the usual container_of | ||
139 | macro or the pointer is stored in a location not scanned by kmemleak. | ||
140 | |||
141 | Page allocations and ioremap are not tracked. Only the ARM and x86 | ||
142 | architectures are currently supported. | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index f5b7127f54a..7f5809eddee 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -31,6 +31,7 @@ Contents: | |||
31 | 31 | ||
32 | - Locking functions. | 32 | - Locking functions. |
33 | - Interrupt disabling functions. | 33 | - Interrupt disabling functions. |
34 | - Sleep and wake-up functions. | ||
34 | - Miscellaneous functions. | 35 | - Miscellaneous functions. |
35 | 36 | ||
36 | (*) Inter-CPU locking barrier effects. | 37 | (*) Inter-CPU locking barrier effects. |
@@ -1217,6 +1218,132 @@ barriers are required in such a situation, they must be provided from some | |||
1217 | other means. | 1218 | other means. |
1218 | 1219 | ||
1219 | 1220 | ||
1221 | SLEEP AND WAKE-UP FUNCTIONS | ||
1222 | --------------------------- | ||
1223 | |||
1224 | Sleeping and waking on an event flagged in global data can be viewed as an | ||
1225 | interaction between two pieces of data: the task state of the task waiting for | ||
1226 | the event and the global data used to indicate the event. To make sure that | ||
1227 | these appear to happen in the right order, the primitives to begin the process | ||
1228 | of going to sleep, and the primitives to initiate a wake up imply certain | ||
1229 | barriers. | ||
1230 | |||
1231 | Firstly, the sleeper normally follows something like this sequence of events: | ||
1232 | |||
1233 | for (;;) { | ||
1234 | set_current_state(TASK_UNINTERRUPTIBLE); | ||
1235 | if (event_indicated) | ||
1236 | break; | ||
1237 | schedule(); | ||
1238 | } | ||
1239 | |||
1240 | A general memory barrier is interpolated automatically by set_current_state() | ||
1241 | after it has altered the task state: | ||
1242 | |||
1243 | CPU 1 | ||
1244 | =============================== | ||
1245 | set_current_state(); | ||
1246 | set_mb(); | ||
1247 | STORE current->state | ||
1248 | <general barrier> | ||
1249 | LOAD event_indicated | ||
1250 | |||
1251 | set_current_state() may be wrapped by: | ||
1252 | |||
1253 | prepare_to_wait(); | ||
1254 | prepare_to_wait_exclusive(); | ||
1255 | |||
1256 | which therefore also imply a general memory barrier after setting the state. | ||
1257 | The whole sequence above is available in various canned forms, all of which | ||
1258 | interpolate the memory barrier in the right place: | ||
1259 | |||
1260 | wait_event(); | ||
1261 | wait_event_interruptible(); | ||
1262 | wait_event_interruptible_exclusive(); | ||
1263 | wait_event_interruptible_timeout(); | ||
1264 | wait_event_killable(); | ||
1265 | wait_event_timeout(); | ||
1266 | wait_on_bit(); | ||
1267 | wait_on_bit_lock(); | ||
1268 | |||
1269 | |||
1270 | Secondly, code that performs a wake up normally follows something like this: | ||
1271 | |||
1272 | event_indicated = 1; | ||
1273 | wake_up(&event_wait_queue); | ||
1274 | |||
1275 | or: | ||
1276 | |||
1277 | event_indicated = 1; | ||
1278 | wake_up_process(event_daemon); | ||
1279 | |||
1280 | A write memory barrier is implied by wake_up() and co. if and only if they wake | ||
1281 | something up. The barrier occurs before the task state is cleared, and so sits | ||
1282 | between the STORE to indicate the event and the STORE to set TASK_RUNNING: | ||
1283 | |||
1284 | CPU 1 CPU 2 | ||
1285 | =============================== =============================== | ||
1286 | set_current_state(); STORE event_indicated | ||
1287 | set_mb(); wake_up(); | ||
1288 | STORE current->state <write barrier> | ||
1289 | <general barrier> STORE current->state | ||
1290 | LOAD event_indicated | ||
1291 | |||
1292 | The available waker functions include: | ||
1293 | |||
1294 | complete(); | ||
1295 | wake_up(); | ||
1296 | wake_up_all(); | ||
1297 | wake_up_bit(); | ||
1298 | wake_up_interruptible(); | ||
1299 | wake_up_interruptible_all(); | ||
1300 | wake_up_interruptible_nr(); | ||
1301 | wake_up_interruptible_poll(); | ||
1302 | wake_up_interruptible_sync(); | ||
1303 | wake_up_interruptible_sync_poll(); | ||
1304 | wake_up_locked(); | ||
1305 | wake_up_locked_poll(); | ||
1306 | wake_up_nr(); | ||
1307 | wake_up_poll(); | ||
1308 | wake_up_process(); | ||
1309 | |||
1310 | |||
1311 | [!] Note that the memory barriers implied by the sleeper and the waker do _not_ | ||
1312 | order multiple stores before the wake-up with respect to loads of those stored | ||
1313 | values after the sleeper has called set_current_state(). For instance, if the | ||
1314 | sleeper does: | ||
1315 | |||
1316 | set_current_state(TASK_INTERRUPTIBLE); | ||
1317 | if (event_indicated) | ||
1318 | break; | ||
1319 | __set_current_state(TASK_RUNNING); | ||
1320 | do_something(my_data); | ||
1321 | |||
1322 | and the waker does: | ||
1323 | |||
1324 | my_data = value; | ||
1325 | event_indicated = 1; | ||
1326 | wake_up(&event_wait_queue); | ||
1327 | |||
1328 | there's no guarantee that the change to event_indicated will be perceived by | ||
1329 | the sleeper as coming after the change to my_data. In such a circumstance, the | ||
1330 | code on both sides must interpolate its own memory barriers between the | ||
1331 | separate data accesses. Thus the above sleeper ought to do: | ||
1332 | |||
1333 | set_current_state(TASK_INTERRUPTIBLE); | ||
1334 | if (event_indicated) { | ||
1335 | smp_rmb(); | ||
1336 | do_something(my_data); | ||
1337 | } | ||
1338 | |||
1339 | and the waker should do: | ||
1340 | |||
1341 | my_data = value; | ||
1342 | smp_wmb(); | ||
1343 | event_indicated = 1; | ||
1344 | wake_up(&event_wait_queue); | ||
1345 | |||
1346 | |||
1220 | MISCELLANEOUS FUNCTIONS | 1347 | MISCELLANEOUS FUNCTIONS |
1221 | ----------------------- | 1348 | ----------------------- |
1222 | 1349 | ||
@@ -1366,7 +1493,7 @@ WHERE ARE MEMORY BARRIERS NEEDED? | |||
1366 | 1493 | ||
1367 | Under normal operation, memory operation reordering is generally not going to | 1494 | Under normal operation, memory operation reordering is generally not going to |
1368 | be a problem as a single-threaded linear piece of code will still appear to | 1495 | be a problem as a single-threaded linear piece of code will still appear to |
1369 | work correctly, even if it's in an SMP kernel. There are, however, three | 1496 | work correctly, even if it's in an SMP kernel. There are, however, four |
1370 | circumstances in which reordering definitely _could_ be a problem: | 1497 | circumstances in which reordering definitely _could_ be a problem: |
1371 | 1498 | ||
1372 | (*) Interprocessor interaction. | 1499 | (*) Interprocessor interaction. |
diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt index 5ba4d3fc625..1df7f9cdab0 100644 --- a/Documentation/scheduler/sched-rt-group.txt +++ b/Documentation/scheduler/sched-rt-group.txt | |||
@@ -4,6 +4,7 @@ | |||
4 | CONTENTS | 4 | CONTENTS |
5 | ======== | 5 | ======== |
6 | 6 | ||
7 | 0. WARNING | ||
7 | 1. Overview | 8 | 1. Overview |
8 | 1.1 The problem | 9 | 1.1 The problem |
9 | 1.2 The solution | 10 | 1.2 The solution |
@@ -14,6 +15,23 @@ CONTENTS | |||
14 | 3. Future plans | 15 | 3. Future plans |
15 | 16 | ||
16 | 17 | ||
18 | 0. WARNING | ||
19 | ========== | ||
20 | |||
21 | Fiddling with these settings can result in an unstable system, the knobs are | ||
22 | root only and assumes root knows what he is doing. | ||
23 | |||
24 | Most notable: | ||
25 | |||
26 | * very small values in sched_rt_period_us can result in an unstable | ||
27 | system when the period is smaller than either the available hrtimer | ||
28 | resolution, or the time it takes to handle the budget refresh itself. | ||
29 | |||
30 | * very small values in sched_rt_runtime_us can result in an unstable | ||
31 | system when the runtime is so small the system has difficulty making | ||
32 | forward progress (NOTE: the migration thread and kstopmachine both | ||
33 | are real-time processes). | ||
34 | |||
17 | 1. Overview | 35 | 1. Overview |
18 | =========== | 36 | =========== |
19 | 37 | ||
@@ -169,7 +187,7 @@ get their allocated time. | |||
169 | 187 | ||
170 | Implementing SCHED_EDF might take a while to complete. Priority Inheritance is | 188 | Implementing SCHED_EDF might take a while to complete. Priority Inheritance is |
171 | the biggest challenge as the current linux PI infrastructure is geared towards | 189 | the biggest challenge as the current linux PI infrastructure is geared towards |
172 | the limited static priority levels 0-139. With deadline scheduling you need to | 190 | the limited static priority levels 0-99. With deadline scheduling you need to |
173 | do deadline inheritance (since priority is inversely proportional to the | 191 | do deadline inheritance (since priority is inversely proportional to the |
174 | deadline delta (deadline - now). | 192 | deadline delta (deadline - now). |
175 | 193 | ||
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index f11ca7979fa..322a00bb99d 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -32,6 +32,7 @@ show up in /proc/sys/kernel: | |||
32 | - kstack_depth_to_print [ X86 only ] | 32 | - kstack_depth_to_print [ X86 only ] |
33 | - l2cr [ PPC only ] | 33 | - l2cr [ PPC only ] |
34 | - modprobe ==> Documentation/debugging-modules.txt | 34 | - modprobe ==> Documentation/debugging-modules.txt |
35 | - modules_disabled | ||
35 | - msgmax | 36 | - msgmax |
36 | - msgmnb | 37 | - msgmnb |
37 | - msgmni | 38 | - msgmni |
@@ -184,6 +185,16 @@ kernel stack. | |||
184 | 185 | ||
185 | ============================================================== | 186 | ============================================================== |
186 | 187 | ||
188 | modules_disabled: | ||
189 | |||
190 | A toggle value indicating if modules are allowed to be loaded | ||
191 | in an otherwise modular kernel. This toggle defaults to off | ||
192 | (0), but can be set true (1). Once true, modules can be | ||
193 | neither loaded nor unloaded, and the toggle cannot be set back | ||
194 | to false. | ||
195 | |||
196 | ============================================================== | ||
197 | |||
187 | osrelease, ostype & version: | 198 | osrelease, ostype & version: |
188 | 199 | ||
189 | # cat osrelease | 200 | # cat osrelease |
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt new file mode 100644 index 00000000000..f157d7594ea --- /dev/null +++ b/Documentation/trace/events.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | Event Tracing | ||
2 | |||
3 | Documentation written by Theodore Ts'o | ||
4 | Updated by Li Zefan | ||
5 | |||
6 | 1. Introduction | ||
7 | =============== | ||
8 | |||
9 | Tracepoints (see Documentation/trace/tracepoints.txt) can be used | ||
10 | without creating custom kernel modules to register probe functions | ||
11 | using the event tracing infrastructure. | ||
12 | |||
13 | Not all tracepoints can be traced using the event tracing system; | ||
14 | the kernel developer must provide code snippets which define how the | ||
15 | tracing information is saved into the tracing buffer, and how the | ||
16 | tracing information should be printed. | ||
17 | |||
18 | 2. Using Event Tracing | ||
19 | ====================== | ||
20 | |||
21 | 2.1 Via the 'set_event' interface | ||
22 | --------------------------------- | ||
23 | |||
24 | The events which are available for tracing can be found in the file | ||
25 | /debug/tracing/available_events. | ||
26 | |||
27 | To enable a particular event, such as 'sched_wakeup', simply echo it | ||
28 | to /debug/tracing/set_event. For example: | ||
29 | |||
30 | # echo sched_wakeup >> /debug/tracing/set_event | ||
31 | |||
32 | [ Note: '>>' is necessary, otherwise it will firstly disable | ||
33 | all the events. ] | ||
34 | |||
35 | To disable an event, echo the event name to the set_event file prefixed | ||
36 | with an exclamation point: | ||
37 | |||
38 | # echo '!sched_wakeup' >> /debug/tracing/set_event | ||
39 | |||
40 | To disable all events, echo an empty line to the set_event file: | ||
41 | |||
42 | # echo > /debug/tracing/set_event | ||
43 | |||
44 | To enable all events, echo '*:*' or '*:' to the set_event file: | ||
45 | |||
46 | # echo *:* > /debug/tracing/set_event | ||
47 | |||
48 | The events are organized into subsystems, such as ext4, irq, sched, | ||
49 | etc., and a full event name looks like this: <subsystem>:<event>. The | ||
50 | subsystem name is optional, but it is displayed in the available_events | ||
51 | file. All of the events in a subsystem can be specified via the syntax | ||
52 | "<subsystem>:*"; for example, to enable all irq events, you can use the | ||
53 | command: | ||
54 | |||
55 | # echo 'irq:*' > /debug/tracing/set_event | ||
56 | |||
57 | 2.2 Via the 'enable' toggle | ||
58 | --------------------------- | ||
59 | |||
60 | The events available are also listed in /debug/tracing/events/ hierarchy | ||
61 | of directories. | ||
62 | |||
63 | To enable event 'sched_wakeup': | ||
64 | |||
65 | # echo 1 > /debug/tracing/events/sched/sched_wakeup/enable | ||
66 | |||
67 | To disable it: | ||
68 | |||
69 | # echo 0 > /debug/tracing/events/sched/sched_wakeup/enable | ||
70 | |||
71 | To enable all events in sched subsystem: | ||
72 | |||
73 | # echo 1 > /debug/tracing/events/sched/enable | ||
74 | |||
75 | To eanble all events: | ||
76 | |||
77 | # echo 1 > /debug/tracing/events/enable | ||
78 | |||
79 | When reading one of these enable files, there are four results: | ||
80 | |||
81 | 0 - all events this file affects are disabled | ||
82 | 1 - all events this file affects are enabled | ||
83 | X - there is a mixture of events enabled and disabled | ||
84 | ? - this file does not affect any event | ||
85 | |||
86 | 3. Defining an event-enabled tracepoint | ||
87 | ======================================= | ||
88 | |||
89 | See The example provided in samples/trace_events | ||
90 | |||
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index fd9a3e69381..2a82d860294 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
@@ -179,7 +179,7 @@ Here is the list of current tracers that may be configured. | |||
179 | 179 | ||
180 | Function call tracer to trace all kernel functions. | 180 | Function call tracer to trace all kernel functions. |
181 | 181 | ||
182 | "function_graph_tracer" | 182 | "function_graph" |
183 | 183 | ||
184 | Similar to the function tracer except that the | 184 | Similar to the function tracer except that the |
185 | function tracer probes the functions on their entry | 185 | function tracer probes the functions on their entry |
@@ -518,9 +518,18 @@ priority with zero (0) being the highest priority and the nice | |||
518 | values starting at 100 (nice -20). Below is a quick chart to map | 518 | values starting at 100 (nice -20). Below is a quick chart to map |
519 | the kernel priority to user land priorities. | 519 | the kernel priority to user land priorities. |
520 | 520 | ||
521 | Kernel priority: 0 to 99 ==> user RT priority 99 to 0 | 521 | Kernel Space User Space |
522 | Kernel priority: 100 to 139 ==> user nice -20 to 19 | 522 | =============================================================== |
523 | Kernel priority: 140 ==> idle task priority | 523 | 0(high) to 98(low) user RT priority 99(high) to 1(low) |
524 | with SCHED_RR or SCHED_FIFO | ||
525 | --------------------------------------------------------------- | ||
526 | 99 sched_priority is not used in scheduling | ||
527 | decisions(it must be specified as 0) | ||
528 | --------------------------------------------------------------- | ||
529 | 100(high) to 139(low) user nice -20(high) to 19(low) | ||
530 | --------------------------------------------------------------- | ||
531 | 140 idle task priority | ||
532 | --------------------------------------------------------------- | ||
524 | 533 | ||
525 | The task states are: | 534 | The task states are: |
526 | 535 | ||
diff --git a/Documentation/trace/power.txt b/Documentation/trace/power.txt new file mode 100644 index 00000000000..cd805e16dc2 --- /dev/null +++ b/Documentation/trace/power.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | The power tracer collects detailed information about C-state and P-state | ||
2 | transitions, instead of just looking at the high-level "average" | ||
3 | information. | ||
4 | |||
5 | There is a helper script found in scrips/tracing/power.pl in the kernel | ||
6 | sources which can be used to parse this information and create a | ||
7 | Scalable Vector Graphics (SVG) picture from the trace data. | ||
8 | |||
9 | To use this tracer: | ||
10 | |||
11 | echo 0 > /sys/kernel/debug/tracing/tracing_enabled | ||
12 | echo power > /sys/kernel/debug/tracing/current_tracer | ||
13 | echo 1 > /sys/kernel/debug/tracing/tracing_enabled | ||
14 | sleep 1 | ||
15 | echo 0 > /sys/kernel/debug/tracing/tracing_enabled | ||
16 | cat /sys/kernel/debug/tracing/trace | \ | ||
17 | perl scripts/tracing/power.pl > out.sv | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index e0203662f9e..8da3a795083 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -50,6 +50,10 @@ Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format | |||
50 | Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical | 50 | Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical |
51 | pointer to single linked list of struct setup_data. | 51 | pointer to single linked list of struct setup_data. |
52 | 52 | ||
53 | Protocol 2.10: (Kernel 2.6.31) Added a protocol for relaxed alignment | ||
54 | beyond the kernel_alignment added, new init_size and | ||
55 | pref_address fields. Added extended boot loader IDs. | ||
56 | |||
53 | **** MEMORY LAYOUT | 57 | **** MEMORY LAYOUT |
54 | 58 | ||
55 | The traditional memory map for the kernel loader, used for Image or | 59 | The traditional memory map for the kernel loader, used for Image or |
@@ -168,12 +172,13 @@ Offset Proto Name Meaning | |||
168 | 021C/4 2.00+ ramdisk_size initrd size (set by boot loader) | 172 | 021C/4 2.00+ ramdisk_size initrd size (set by boot loader) |
169 | 0220/4 2.00+ bootsect_kludge DO NOT USE - for bootsect.S use only | 173 | 0220/4 2.00+ bootsect_kludge DO NOT USE - for bootsect.S use only |
170 | 0224/2 2.01+ heap_end_ptr Free memory after setup end | 174 | 0224/2 2.01+ heap_end_ptr Free memory after setup end |
171 | 0226/2 N/A pad1 Unused | 175 | 0226/1 2.02+(3 ext_loader_ver Extended boot loader version |
176 | 0227/1 2.02+(3 ext_loader_type Extended boot loader ID | ||
172 | 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line | 177 | 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line |
173 | 022C/4 2.03+ ramdisk_max Highest legal initrd address | 178 | 022C/4 2.03+ ramdisk_max Highest legal initrd address |
174 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel | 179 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel |
175 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not | 180 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not |
176 | 0235/1 N/A pad2 Unused | 181 | 0235/1 2.10+ min_alignment Minimum alignment, as a power of two |
177 | 0236/2 N/A pad3 Unused | 182 | 0236/2 N/A pad3 Unused |
178 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line | 183 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line |
179 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture | 184 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture |
@@ -182,6 +187,8 @@ Offset Proto Name Meaning | |||
182 | 024C/4 2.08+ payload_length Length of kernel payload | 187 | 024C/4 2.08+ payload_length Length of kernel payload |
183 | 0250/8 2.09+ setup_data 64-bit physical pointer to linked list | 188 | 0250/8 2.09+ setup_data 64-bit physical pointer to linked list |
184 | of struct setup_data | 189 | of struct setup_data |
190 | 0258/8 2.10+ pref_address Preferred loading address | ||
191 | 0260/4 2.10+ init_size Linear memory required during initialization | ||
185 | 192 | ||
186 | (1) For backwards compatibility, if the setup_sects field contains 0, the | 193 | (1) For backwards compatibility, if the setup_sects field contains 0, the |
187 | real value is 4. | 194 | real value is 4. |
@@ -190,6 +197,8 @@ Offset Proto Name Meaning | |||
190 | field are unusable, which means the size of a bzImage kernel | 197 | field are unusable, which means the size of a bzImage kernel |
191 | cannot be determined. | 198 | cannot be determined. |
192 | 199 | ||
200 | (3) Ignored, but safe to set, for boot protocols 2.02-2.09. | ||
201 | |||
193 | If the "HdrS" (0x53726448) magic number is not found at offset 0x202, | 202 | If the "HdrS" (0x53726448) magic number is not found at offset 0x202, |
194 | the boot protocol version is "old". Loading an old kernel, the | 203 | the boot protocol version is "old". Loading an old kernel, the |
195 | following parameters should be assumed: | 204 | following parameters should be assumed: |
@@ -343,18 +352,32 @@ Protocol: 2.00+ | |||
343 | 0xTV here, where T is an identifier for the boot loader and V is | 352 | 0xTV here, where T is an identifier for the boot loader and V is |
344 | a version number. Otherwise, enter 0xFF here. | 353 | a version number. Otherwise, enter 0xFF here. |
345 | 354 | ||
355 | For boot loader IDs above T = 0xD, write T = 0xE to this field and | ||
356 | write the extended ID minus 0x10 to the ext_loader_type field. | ||
357 | Similarly, the ext_loader_ver field can be used to provide more than | ||
358 | four bits for the bootloader version. | ||
359 | |||
360 | For example, for T = 0x15, V = 0x234, write: | ||
361 | |||
362 | type_of_loader <- 0xE4 | ||
363 | ext_loader_type <- 0x05 | ||
364 | ext_loader_ver <- 0x23 | ||
365 | |||
346 | Assigned boot loader ids: | 366 | Assigned boot loader ids: |
347 | 0 LILO (0x00 reserved for pre-2.00 bootloader) | 367 | 0 LILO (0x00 reserved for pre-2.00 bootloader) |
348 | 1 Loadlin | 368 | 1 Loadlin |
349 | 2 bootsect-loader (0x20, all other values reserved) | 369 | 2 bootsect-loader (0x20, all other values reserved) |
350 | 3 SYSLINUX | 370 | 3 Syslinux |
351 | 4 EtherBoot | 371 | 4 Etherboot/gPXE |
352 | 5 ELILO | 372 | 5 ELILO |
353 | 7 GRUB | 373 | 7 GRUB |
354 | 8 U-BOOT | 374 | 8 U-Boot |
355 | 9 Xen | 375 | 9 Xen |
356 | A Gujin | 376 | A Gujin |
357 | B Qemu | 377 | B Qemu |
378 | C Arcturus Networks uCbootloader | ||
379 | E Extended (see ext_loader_type) | ||
380 | F Special (0xFF = undefined) | ||
358 | 381 | ||
359 | Please contact <hpa@zytor.com> if you need a bootloader ID | 382 | Please contact <hpa@zytor.com> if you need a bootloader ID |
360 | value assigned. | 383 | value assigned. |
@@ -453,6 +476,35 @@ Protocol: 2.01+ | |||
453 | Set this field to the offset (from the beginning of the real-mode | 476 | Set this field to the offset (from the beginning of the real-mode |
454 | code) of the end of the setup stack/heap, minus 0x0200. | 477 | code) of the end of the setup stack/heap, minus 0x0200. |
455 | 478 | ||
479 | Field name: ext_loader_ver | ||
480 | Type: write (optional) | ||
481 | Offset/size: 0x226/1 | ||
482 | Protocol: 2.02+ | ||
483 | |||
484 | This field is used as an extension of the version number in the | ||
485 | type_of_loader field. The total version number is considered to be | ||
486 | (type_of_loader & 0x0f) + (ext_loader_ver << 4). | ||
487 | |||
488 | The use of this field is boot loader specific. If not written, it | ||
489 | is zero. | ||
490 | |||
491 | Kernels prior to 2.6.31 did not recognize this field, but it is safe | ||
492 | to write for protocol version 2.02 or higher. | ||
493 | |||
494 | Field name: ext_loader_type | ||
495 | Type: write (obligatory if (type_of_loader & 0xf0) == 0xe0) | ||
496 | Offset/size: 0x227/1 | ||
497 | Protocol: 2.02+ | ||
498 | |||
499 | This field is used as an extension of the type number in | ||
500 | type_of_loader field. If the type in type_of_loader is 0xE, then | ||
501 | the actual type is (ext_loader_type + 0x10). | ||
502 | |||
503 | This field is ignored if the type in type_of_loader is not 0xE. | ||
504 | |||
505 | Kernels prior to 2.6.31 did not recognize this field, but it is safe | ||
506 | to write for protocol version 2.02 or higher. | ||
507 | |||
456 | Field name: cmd_line_ptr | 508 | Field name: cmd_line_ptr |
457 | Type: write (obligatory) | 509 | Type: write (obligatory) |
458 | Offset/size: 0x228/4 | 510 | Offset/size: 0x228/4 |
@@ -482,11 +534,19 @@ Protocol: 2.03+ | |||
482 | 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.) | 534 | 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.) |
483 | 535 | ||
484 | Field name: kernel_alignment | 536 | Field name: kernel_alignment |
485 | Type: read (reloc) | 537 | Type: read/modify (reloc) |
486 | Offset/size: 0x230/4 | 538 | Offset/size: 0x230/4 |
487 | Protocol: 2.05+ | 539 | Protocol: 2.05+ (read), 2.10+ (modify) |
540 | |||
541 | Alignment unit required by the kernel (if relocatable_kernel is | ||
542 | true.) A relocatable kernel that is loaded at an alignment | ||
543 | incompatible with the value in this field will be realigned during | ||
544 | kernel initialization. | ||
488 | 545 | ||
489 | Alignment unit required by the kernel (if relocatable_kernel is true.) | 546 | Starting with protocol version 2.10, this reflects the kernel |
547 | alignment preferred for optimal performance; it is possible for the | ||
548 | loader to modify this field to permit a lesser alignment. See the | ||
549 | min_alignment and pref_address field below. | ||
490 | 550 | ||
491 | Field name: relocatable_kernel | 551 | Field name: relocatable_kernel |
492 | Type: read (reloc) | 552 | Type: read (reloc) |
@@ -498,6 +558,22 @@ Protocol: 2.05+ | |||
498 | After loading, the boot loader must set the code32_start field to | 558 | After loading, the boot loader must set the code32_start field to |
499 | point to the loaded code, or to a boot loader hook. | 559 | point to the loaded code, or to a boot loader hook. |
500 | 560 | ||
561 | Field name: min_alignment | ||
562 | Type: read (reloc) | ||
563 | Offset/size: 0x235/1 | ||
564 | Protocol: 2.10+ | ||
565 | |||
566 | This field, if nonzero, indicates as a power of two the minimum | ||
567 | alignment required, as opposed to preferred, by the kernel to boot. | ||
568 | If a boot loader makes use of this field, it should update the | ||
569 | kernel_alignment field with the alignment unit desired; typically: | ||
570 | |||
571 | kernel_alignment = 1 << min_alignment | ||
572 | |||
573 | There may be a considerable performance cost with an excessively | ||
574 | misaligned kernel. Therefore, a loader should typically try each | ||
575 | power-of-two alignment from kernel_alignment down to this alignment. | ||
576 | |||
501 | Field name: cmdline_size | 577 | Field name: cmdline_size |
502 | Type: read | 578 | Type: read |
503 | Offset/size: 0x238/4 | 579 | Offset/size: 0x238/4 |
@@ -582,6 +658,36 @@ Protocol: 2.09+ | |||
582 | sure to consider the case where the linked list already contains | 658 | sure to consider the case where the linked list already contains |
583 | entries. | 659 | entries. |
584 | 660 | ||
661 | Field name: pref_address | ||
662 | Type: read (reloc) | ||
663 | Offset/size: 0x258/8 | ||
664 | Protocol: 2.10+ | ||
665 | |||
666 | This field, if nonzero, represents a preferred load address for the | ||
667 | kernel. A relocating bootloader should attempt to load at this | ||
668 | address if possible. | ||
669 | |||
670 | A non-relocatable kernel will unconditionally move itself and to run | ||
671 | at this address. | ||
672 | |||
673 | Field name: init_size | ||
674 | Type: read | ||
675 | Offset/size: 0x25c/4 | ||
676 | |||
677 | This field indicates the amount of linear contiguous memory starting | ||
678 | at the kernel runtime start address that the kernel needs before it | ||
679 | is capable of examining its memory map. This is not the same thing | ||
680 | as the total amount of memory the kernel needs to boot, but it can | ||
681 | be used by a relocating boot loader to help select a safe load | ||
682 | address for the kernel. | ||
683 | |||
684 | The kernel runtime start address is determined by the following algorithm: | ||
685 | |||
686 | if (relocatable_kernel) | ||
687 | runtime_start = align_up(load_address, kernel_alignment) | ||
688 | else | ||
689 | runtime_start = pref_address | ||
690 | |||
585 | 691 | ||
586 | **** THE IMAGE CHECKSUM | 692 | **** THE IMAGE CHECKSUM |
587 | 693 | ||
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt index fa2bed07d21..29a6ff8bc7d 100644 --- a/Documentation/x86/x86_64/boot-options.txt +++ b/Documentation/x86/x86_64/boot-options.txt | |||
@@ -180,11 +180,6 @@ NUMA | |||
180 | Otherwise, the remaining system RAM is allocated to an | 180 | Otherwise, the remaining system RAM is allocated to an |
181 | additional node. | 181 | additional node. |
182 | 182 | ||
183 | numa=hotadd=percent | ||
184 | Only allow hotadd memory to preallocate page structures upto | ||
185 | percent of already available memory. | ||
186 | numa=hotadd=0 will disable hotadd memory. | ||
187 | |||
188 | ACPI | 183 | ACPI |
189 | 184 | ||
190 | acpi=off Don't enable ACPI | 185 | acpi=off Don't enable ACPI |
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt index 29b52b14d0b..d6498e3cd71 100644 --- a/Documentation/x86/x86_64/mm.txt +++ b/Documentation/x86/x86_64/mm.txt | |||
@@ -6,10 +6,11 @@ Virtual memory map with 4 level page tables: | |||
6 | 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm | 6 | 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm |
7 | hole caused by [48:63] sign extension | 7 | hole caused by [48:63] sign extension |
8 | ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole | 8 | ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole |
9 | ffff880000000000 - ffffc0ffffffffff (=57 TB) direct mapping of all phys. memory | 9 | ffff880000000000 - ffffc7ffffffffff (=64 TB) direct mapping of all phys. memory |
10 | ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole | 10 | ffffc80000000000 - ffffc8ffffffffff (=40 bits) hole |
11 | ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space | 11 | ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space |
12 | ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB) | 12 | ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole |
13 | ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB) | ||
13 | ... unused hole ... | 14 | ... unused hole ... |
14 | ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 | 15 | ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 |
15 | ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space | 16 | ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space |