diff options
Diffstat (limited to 'Documentation')
26 files changed, 852 insertions, 83 deletions
diff --git a/Documentation/ABI/obsolete/dv1394 b/Documentation/ABI/obsolete/dv1394 deleted file mode 100644 index 2ee36864ca10..000000000000 --- a/Documentation/ABI/obsolete/dv1394 +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | What: dv1394 (a.k.a. "OHCI-DV I/O support" for FireWire) | ||
2 | Contact: linux1394-devel@lists.sourceforge.net | ||
3 | Description: | ||
4 | New application development should use raw1394 + userspace libraries | ||
5 | instead, notably libiec61883 which is functionally equivalent. | ||
6 | |||
7 | Users: | ||
8 | ffmpeg/libavformat (used by a variety of media players) | ||
9 | dvgrab v1.x (replaced by dvgrab2 on top of raw1394 and resp. libraries) | ||
diff --git a/Documentation/ABI/removed/dv1394 b/Documentation/ABI/removed/dv1394 new file mode 100644 index 000000000000..c2310b6676f4 --- /dev/null +++ b/Documentation/ABI/removed/dv1394 | |||
@@ -0,0 +1,14 @@ | |||
1 | What: dv1394 (a.k.a. "OHCI-DV I/O support" for FireWire) | ||
2 | Date: May 2010 (scheduled), finally removed in kernel v2.6.37 | ||
3 | Contact: linux1394-devel@lists.sourceforge.net | ||
4 | Description: | ||
5 | /dev/dv1394/* were character device files, one for each FireWire | ||
6 | controller and for NTSC and PAL respectively, from which DV data | ||
7 | could be received by read() or transmitted by write(). A few | ||
8 | ioctl()s allowed limited control. | ||
9 | This special-purpose interface has been superseded by libraw1394 + | ||
10 | libiec61883 which are functionally equivalent, support HDV, and | ||
11 | transparently work on top of the newer firewire kernel drivers. | ||
12 | |||
13 | Users: | ||
14 | ffmpeg/libavformat (if configured for DV1394) | ||
diff --git a/Documentation/ABI/removed/raw1394 b/Documentation/ABI/removed/raw1394 new file mode 100644 index 000000000000..490aa1efc4ae --- /dev/null +++ b/Documentation/ABI/removed/raw1394 | |||
@@ -0,0 +1,15 @@ | |||
1 | What: raw1394 (a.k.a. "Raw IEEE1394 I/O support" for FireWire) | ||
2 | Date: May 2010 (scheduled), finally removed in kernel v2.6.37 | ||
3 | Contact: linux1394-devel@lists.sourceforge.net | ||
4 | Description: | ||
5 | /dev/raw1394 was a character device file that allowed low-level | ||
6 | access to FireWire buses. Its major drawbacks were its inability | ||
7 | to implement sensible device security policies, and its low level | ||
8 | of abstraction that required userspace clients do duplicate much | ||
9 | of the kernel's ieee1394 core functionality. | ||
10 | Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of | ||
11 | firewire-core. | ||
12 | |||
13 | Users: | ||
14 | libraw1394 (works with firewire-cdev too, transparent to library ABI | ||
15 | users) | ||
diff --git a/Documentation/ABI/removed/raw1394_legacy_isochronous b/Documentation/ABI/removed/raw1394_legacy_isochronous deleted file mode 100644 index 1b629622d883..000000000000 --- a/Documentation/ABI/removed/raw1394_legacy_isochronous +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | What: legacy isochronous ABI of raw1394 (1st generation iso ABI) | ||
2 | Date: June 2007 (scheduled), removed in kernel v2.6.23 | ||
3 | Contact: linux1394-devel@lists.sourceforge.net | ||
4 | Description: | ||
5 | The two request types RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN have | ||
6 | been deprecated for quite some time. They are very inefficient as they | ||
7 | come with high interrupt load and several layers of callbacks for each | ||
8 | packet. Because of these deficiencies, the video1394 and dv1394 drivers | ||
9 | and the 3rd-generation isochronous ABI in raw1394 (rawiso) were created. | ||
10 | |||
11 | Users: | ||
12 | libraw1394 users via the long deprecated API raw1394_iso_write, | ||
13 | raw1394_start_iso_write, raw1394_start_iso_rcv, raw1394_stop_iso_rcv | ||
14 | |||
15 | libdc1394, which optionally uses these old libraw1394 calls | ||
16 | alternatively to the more efficient video1394 ABI | ||
diff --git a/Documentation/ABI/removed/video1394 b/Documentation/ABI/removed/video1394 new file mode 100644 index 000000000000..c39c25aee77b --- /dev/null +++ b/Documentation/ABI/removed/video1394 | |||
@@ -0,0 +1,16 @@ | |||
1 | What: video1394 (a.k.a. "OHCI-1394 Video support" for FireWire) | ||
2 | Date: May 2010 (scheduled), finally removed in kernel v2.6.37 | ||
3 | Contact: linux1394-devel@lists.sourceforge.net | ||
4 | Description: | ||
5 | /dev/video1394/* were character device files, one for each FireWire | ||
6 | controller, which were used for isochronous I/O. It was added as an | ||
7 | alternative to raw1394's isochronous I/O functionality which had | ||
8 | performance issues in its first generation. Any video1394 user had | ||
9 | to use raw1394 + libraw1394 too because video1394 did not provide | ||
10 | asynchronous I/O for device discovery and configuration. | ||
11 | Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of | ||
12 | firewire-core. | ||
13 | |||
14 | Users: | ||
15 | libdc1394 (works with firewire-cdev too, transparent to library ABI | ||
16 | users) | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl b/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl new file mode 100644 index 000000000000..b82deeaec314 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl | |||
@@ -0,0 +1,22 @@ | |||
1 | What: state | ||
2 | Date: Sep 2010 | ||
3 | KernelVersion: 2.6.37 | ||
4 | Contact: Vernon Mauery <vernux@us.ibm.com> | ||
5 | Description: The state file allows a means by which to change in and | ||
6 | out of Premium Real-Time Mode (PRTM), as well as the | ||
7 | ability to query the current state. | ||
8 | 0 => PRTM off | ||
9 | 1 => PRTM enabled | ||
10 | Users: The ibm-prtm userspace daemon uses this interface. | ||
11 | |||
12 | |||
13 | What: version | ||
14 | Date: Sep 2010 | ||
15 | KernelVersion: 2.6.37 | ||
16 | Contact: Vernon Mauery <vernux@us.ibm.com> | ||
17 | Description: The version file provides a means by which to query | ||
18 | the RTL table version that lives in the Extended | ||
19 | BIOS Data Area (EBDA). | ||
20 | Users: The ibm-prtm userspace daemon uses this interface. | ||
21 | |||
22 | |||
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index feca0758391e..22edcbb9ddaf 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -51,8 +51,13 @@ | |||
51 | <sect1><title>Delaying, scheduling, and timer routines</title> | 51 | <sect1><title>Delaying, scheduling, and timer routines</title> |
52 | !Iinclude/linux/sched.h | 52 | !Iinclude/linux/sched.h |
53 | !Ekernel/sched.c | 53 | !Ekernel/sched.c |
54 | !Iinclude/linux/completion.h | ||
54 | !Ekernel/timer.c | 55 | !Ekernel/timer.c |
55 | </sect1> | 56 | </sect1> |
57 | <sect1><title>Wait queues and Wake events</title> | ||
58 | !Iinclude/linux/wait.h | ||
59 | !Ekernel/wait.c | ||
60 | </sect1> | ||
56 | <sect1><title>High-resolution timers</title> | 61 | <sect1><title>High-resolution timers</title> |
57 | !Iinclude/linux/ktime.h | 62 | !Iinclude/linux/ktime.h |
58 | !Iinclude/linux/hrtimer.h | 63 | !Iinclude/linux/hrtimer.h |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 6b4e07f28b69..7160652a8736 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -93,6 +93,12 @@ X!Ilib/string.c | |||
93 | !Elib/crc32.c | 93 | !Elib/crc32.c |
94 | !Elib/crc-ccitt.c | 94 | !Elib/crc-ccitt.c |
95 | </sect1> | 95 | </sect1> |
96 | |||
97 | <sect1 id="idr"><title>idr/ida Functions</title> | ||
98 | !Pinclude/linux/idr.h idr sync | ||
99 | !Plib/idr.c IDA description | ||
100 | !Elib/idr.c | ||
101 | </sect1> | ||
96 | </chapter> | 102 | </chapter> |
97 | 103 | ||
98 | <chapter id="mm"> | 104 | <chapter id="mm"> |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 9961f1564d22..d2af87ba96e1 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -502,16 +502,6 @@ Who: Thomas Gleixner <tglx@linutronix.de> | |||
502 | 502 | ||
503 | ---------------------------- | 503 | ---------------------------- |
504 | 504 | ||
505 | What: old ieee1394 subsystem (CONFIG_IEEE1394) | ||
506 | When: 2.6.37 | ||
507 | Files: drivers/ieee1394/ except init_ohci1394_dma.c | ||
508 | Why: superseded by drivers/firewire/ (CONFIG_FIREWIRE) which offers more | ||
509 | features, better performance, and better security, all with smaller | ||
510 | and more modern code base | ||
511 | Who: Stefan Richter <stefanr@s5r6.in-berlin.de> | ||
512 | |||
513 | ---------------------------- | ||
514 | |||
515 | What: The acpi_sleep=s4_nonvs command line option | 505 | What: The acpi_sleep=s4_nonvs command line option |
516 | When: 2.6.37 | 506 | When: 2.6.37 |
517 | Files: arch/x86/kernel/acpi/sleep.c | 507 | Files: arch/x86/kernel/acpi/sleep.c |
@@ -545,3 +535,13 @@ Why: Hareware scan is the prefer method for iwlwifi devices for | |||
545 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> | 535 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> |
546 | 536 | ||
547 | ---------------------------- | 537 | ---------------------------- |
538 | |||
539 | What: access to nfsd auth cache through sys_nfsservctl or '.' files | ||
540 | in the 'nfsd' filesystem. | ||
541 | When: 2.6.40 | ||
542 | Why: This is a legacy interface which have been replaced by a more | ||
543 | dynamic cache. Continuing to maintain this interface is an | ||
544 | unnecessary burden. | ||
545 | Who: NeilBrown <neilb@suse.de> | ||
546 | |||
547 | ---------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 2db4283efa8d..8a817f656f0a 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -349,21 +349,36 @@ call this method upon the IO completion. | |||
349 | 349 | ||
350 | --------------------------- block_device_operations ----------------------- | 350 | --------------------------- block_device_operations ----------------------- |
351 | prototypes: | 351 | prototypes: |
352 | int (*open) (struct inode *, struct file *); | 352 | int (*open) (struct block_device *, fmode_t); |
353 | int (*release) (struct inode *, struct file *); | 353 | int (*release) (struct gendisk *, fmode_t); |
354 | int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); | 354 | int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); |
355 | int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); | ||
356 | int (*direct_access) (struct block_device *, sector_t, void **, unsigned long *); | ||
355 | int (*media_changed) (struct gendisk *); | 357 | int (*media_changed) (struct gendisk *); |
358 | void (*unlock_native_capacity) (struct gendisk *); | ||
356 | int (*revalidate_disk) (struct gendisk *); | 359 | int (*revalidate_disk) (struct gendisk *); |
360 | int (*getgeo)(struct block_device *, struct hd_geometry *); | ||
361 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); | ||
357 | 362 | ||
358 | locking rules: | 363 | locking rules: |
359 | BKL bd_sem | 364 | BKL bd_mutex |
360 | open: yes yes | 365 | open: no yes |
361 | release: yes yes | 366 | release: no yes |
362 | ioctl: yes no | 367 | ioctl: no no |
368 | compat_ioctl: no no | ||
369 | direct_access: no no | ||
363 | media_changed: no no | 370 | media_changed: no no |
371 | unlock_native_capacity: no no | ||
364 | revalidate_disk: no no | 372 | revalidate_disk: no no |
373 | getgeo: no no | ||
374 | swap_slot_free_notify: no no (see below) | ||
375 | |||
376 | media_changed, unlock_native_capacity and revalidate_disk are called only from | ||
377 | check_disk_change(). | ||
378 | |||
379 | swap_slot_free_notify is called with swap_lock and sometimes the page lock | ||
380 | held. | ||
365 | 381 | ||
366 | The last two are called only from check_disk_change(). | ||
367 | 382 | ||
368 | --------------------------- file_operations ------------------------------- | 383 | --------------------------- file_operations ------------------------------- |
369 | prototypes: | 384 | prototypes: |
diff --git a/Documentation/filesystems/nfs/00-INDEX b/Documentation/filesystems/nfs/00-INDEX index 2f68cd688769..a57e12411d2a 100644 --- a/Documentation/filesystems/nfs/00-INDEX +++ b/Documentation/filesystems/nfs/00-INDEX | |||
@@ -12,5 +12,9 @@ nfs-rdma.txt | |||
12 | - how to install and setup the Linux NFS/RDMA client and server software | 12 | - how to install and setup the Linux NFS/RDMA client and server software |
13 | nfsroot.txt | 13 | nfsroot.txt |
14 | - short guide on setting up a diskless box with NFS root filesystem. | 14 | - short guide on setting up a diskless box with NFS root filesystem. |
15 | pnfs.txt | ||
16 | - short explanation of some of the internals of the pnfs client code | ||
15 | rpc-cache.txt | 17 | rpc-cache.txt |
16 | - introduction to the caching mechanisms in the sunrpc layer. | 18 | - introduction to the caching mechanisms in the sunrpc layer. |
19 | idmapper.txt | ||
20 | - information for configuring request-keys to be used by idmapper | ||
diff --git a/Documentation/filesystems/nfs/idmapper.txt b/Documentation/filesystems/nfs/idmapper.txt new file mode 100644 index 000000000000..b9b4192ea8b5 --- /dev/null +++ b/Documentation/filesystems/nfs/idmapper.txt | |||
@@ -0,0 +1,67 @@ | |||
1 | |||
2 | ========= | ||
3 | ID Mapper | ||
4 | ========= | ||
5 | Id mapper is used by NFS to translate user and group ids into names, and to | ||
6 | translate user and group names into ids. Part of this translation involves | ||
7 | performing an upcall to userspace to request the information. Id mapper will | ||
8 | user request-key to perform this upcall and cache the result. The program | ||
9 | /usr/sbin/nfs.idmap should be called by request-key, and will perform the | ||
10 | translation and initialize a key with the resulting information. | ||
11 | |||
12 | NFS_USE_NEW_IDMAPPER must be selected when configuring the kernel to use this | ||
13 | feature. | ||
14 | |||
15 | =========== | ||
16 | Configuring | ||
17 | =========== | ||
18 | The file /etc/request-key.conf will need to be modified so /sbin/request-key can | ||
19 | direct the upcall. The following line should be added: | ||
20 | |||
21 | #OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ... | ||
22 | #====== ======= =============== =============== =============================== | ||
23 | create id_resolver * * /usr/sbin/nfs.idmap %k %d 600 | ||
24 | |||
25 | This will direct all id_resolver requests to the program /usr/sbin/nfs.idmap. | ||
26 | The last parameter, 600, defines how many seconds into the future the key will | ||
27 | expire. This parameter is optional for /usr/sbin/nfs.idmap. When the timeout | ||
28 | is not specified, nfs.idmap will default to 600 seconds. | ||
29 | |||
30 | id mapper uses for key descriptions: | ||
31 | uid: Find the UID for the given user | ||
32 | gid: Find the GID for the given group | ||
33 | user: Find the user name for the given UID | ||
34 | group: Find the group name for the given GID | ||
35 | |||
36 | You can handle any of these individually, rather than using the generic upcall | ||
37 | program. If you would like to use your own program for a uid lookup then you | ||
38 | would edit your request-key.conf so it look similar to this: | ||
39 | |||
40 | #OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ... | ||
41 | #====== ======= =============== =============== =============================== | ||
42 | create id_resolver uid:* * /some/other/program %k %d 600 | ||
43 | create id_resolver * * /usr/sbin/nfs.idmap %k %d 600 | ||
44 | |||
45 | Notice that the new line was added above the line for the generic program. | ||
46 | request-key will find the first matching line and corresponding program. In | ||
47 | this case, /some/other/program will handle all uid lookups and | ||
48 | /usr/sbin/nfs.idmap will handle gid, user, and group lookups. | ||
49 | |||
50 | See <file:Documentation/keys-request-keys.txt> for more information about the | ||
51 | request-key function. | ||
52 | |||
53 | |||
54 | ========= | ||
55 | nfs.idmap | ||
56 | ========= | ||
57 | nfs.idmap is designed to be called by request-key, and should not be run "by | ||
58 | hand". This program takes two arguments, a serialized key and a key | ||
59 | description. The serialized key is first converted into a key_serial_t, and | ||
60 | then passed as an argument to keyctl_instantiate (both are part of keyutils.h). | ||
61 | |||
62 | The actual lookups are performed by functions found in nfsidmap.h. nfs.idmap | ||
63 | determines the correct function to call by looking at the first part of the | ||
64 | description string. For example, a uid lookup description will appear as | ||
65 | "uid:user@domain". | ||
66 | |||
67 | nfs.idmap will return 0 if the key was instantiated, and non-zero otherwise. | ||
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt index f2430a7974e1..90c71c6f0d00 100644 --- a/Documentation/filesystems/nfs/nfsroot.txt +++ b/Documentation/filesystems/nfs/nfsroot.txt | |||
@@ -159,6 +159,28 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> | |||
159 | Default: any | 159 | Default: any |
160 | 160 | ||
161 | 161 | ||
162 | nfsrootdebug | ||
163 | |||
164 | This parameter enables debugging messages to appear in the kernel | ||
165 | log at boot time so that administrators can verify that the correct | ||
166 | NFS mount options, server address, and root path are passed to the | ||
167 | NFS client. | ||
168 | |||
169 | |||
170 | rdinit=<executable file> | ||
171 | |||
172 | To specify which file contains the program that starts system | ||
173 | initialization, administrators can use this command line parameter. | ||
174 | The default value of this parameter is "/init". If the specified | ||
175 | file exists and the kernel can execute it, root filesystem related | ||
176 | kernel command line parameters, including `nfsroot=', are ignored. | ||
177 | |||
178 | A description of the process of mounting the root file system can be | ||
179 | found in: | ||
180 | |||
181 | Documentation/early-userspace/README | ||
182 | |||
183 | |||
162 | 184 | ||
163 | 185 | ||
164 | 3.) Boot Loader | 186 | 3.) Boot Loader |
diff --git a/Documentation/filesystems/nfs/pnfs.txt b/Documentation/filesystems/nfs/pnfs.txt new file mode 100644 index 000000000000..bc0b9cfe095b --- /dev/null +++ b/Documentation/filesystems/nfs/pnfs.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | Reference counting in pnfs: | ||
2 | ========================== | ||
3 | |||
4 | The are several inter-related caches. We have layouts which can | ||
5 | reference multiple devices, each of which can reference multiple data servers. | ||
6 | Each data server can be referenced by multiple devices. Each device | ||
7 | can be referenced by multiple layouts. To keep all of this straight, | ||
8 | we need to reference count. | ||
9 | |||
10 | |||
11 | struct pnfs_layout_hdr | ||
12 | ---------------------- | ||
13 | The on-the-wire command LAYOUTGET corresponds to struct | ||
14 | pnfs_layout_segment, usually referred to by the variable name lseg. | ||
15 | Each nfs_inode may hold a pointer to a cache of of these layout | ||
16 | segments in nfsi->layout, of type struct pnfs_layout_hdr. | ||
17 | |||
18 | We reference the header for the inode pointing to it, across each | ||
19 | outstanding RPC call that references it (LAYOUTGET, LAYOUTRETURN, | ||
20 | LAYOUTCOMMIT), and for each lseg held within. | ||
21 | |||
22 | Each header is also (when non-empty) put on a list associated with | ||
23 | struct nfs_client (cl_layouts). Being put on this list does not bump | ||
24 | the reference count, as the layout is kept around by the lseg that | ||
25 | keeps it in the list. | ||
26 | |||
27 | deviceid_cache | ||
28 | -------------- | ||
29 | lsegs reference device ids, which are resolved per nfs_client and | ||
30 | layout driver type. The device ids are held in a RCU cache (struct | ||
31 | nfs4_deviceid_cache). The cache itself is referenced across each | ||
32 | mount. The entries (struct nfs4_deviceid) themselves are held across | ||
33 | the lifetime of each lseg referencing them. | ||
34 | |||
35 | RCU is used because the deviceid is basically a write once, read many | ||
36 | data structure. The hlist size of 32 buckets needs better | ||
37 | justification, but seems reasonable given that we can have multiple | ||
38 | deviceid's per filesystem, and multiple filesystems per nfs_client. | ||
39 | |||
40 | The hash code is copied from the nfsd code base. A discussion of | ||
41 | hashing and variations of this algorithm can be found at: | ||
42 | http://groups.google.com/group/comp.lang.c/browse_thread/thread/9522965e2b8d3809 | ||
43 | |||
44 | data server cache | ||
45 | ----------------- | ||
46 | file driver devices refer to data servers, which are kept in a module | ||
47 | level cache. Its reference is held over the lifetime of the deviceid | ||
48 | pointing to it. | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a6aca8740883..a563b74c7aef 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -374,13 +374,13 @@ Swap: 0 kB | |||
374 | KernelPageSize: 4 kB | 374 | KernelPageSize: 4 kB |
375 | MMUPageSize: 4 kB | 375 | MMUPageSize: 4 kB |
376 | 376 | ||
377 | The first of these lines shows the same information as is displayed for the | 377 | The first of these lines shows the same information as is displayed for the |
378 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping, | 378 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping |
379 | the amount of the mapping that is currently resident in RAM, the "proportional | 379 | (size), the amount of the mapping that is currently resident in RAM (RSS), the |
380 | set size” (divide each shared page by the number of processes sharing it), the | 380 | process' proportional share of this mapping (PSS), the number of clean and |
381 | number of clean and dirty shared pages in the mapping, and the number of clean | 381 | dirty shared pages in the mapping, and the number of clean and dirty private |
382 | and dirty private pages in the mapping. The "Referenced" indicates the amount | 382 | pages in the mapping. The "Referenced" indicates the amount of memory |
383 | of memory currently marked as referenced or accessed. | 383 | currently marked as referenced or accessed. |
384 | 384 | ||
385 | This file is only present if the CONFIG_MMU kernel configuration option is | 385 | This file is only present if the CONFIG_MMU kernel configuration option is |
386 | enabled. | 386 | enabled. |
diff --git a/Documentation/filesystems/sharedsubtree.txt b/Documentation/filesystems/sharedsubtree.txt index fc0e39af43c3..4ede421c9687 100644 --- a/Documentation/filesystems/sharedsubtree.txt +++ b/Documentation/filesystems/sharedsubtree.txt | |||
@@ -62,10 +62,10 @@ replicas continue to be exactly same. | |||
62 | # mount /dev/sd0 /tmp/a | 62 | # mount /dev/sd0 /tmp/a |
63 | 63 | ||
64 | #ls /tmp/a | 64 | #ls /tmp/a |
65 | t1 t2 t2 | 65 | t1 t2 t3 |
66 | 66 | ||
67 | #ls /mnt/a | 67 | #ls /mnt/a |
68 | t1 t2 t2 | 68 | t1 t2 t3 |
69 | 69 | ||
70 | Note that the mount has propagated to the mount at /mnt as well. | 70 | Note that the mount has propagated to the mount at /mnt as well. |
71 | 71 | ||
diff --git a/Documentation/hwmon/ltc4261 b/Documentation/hwmon/ltc4261 new file mode 100644 index 000000000000..eba2e2c4b94d --- /dev/null +++ b/Documentation/hwmon/ltc4261 | |||
@@ -0,0 +1,63 @@ | |||
1 | Kernel driver ltc4261 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Linear Technology LTC4261 | ||
6 | Prefix: 'ltc4261' | ||
7 | Addresses scanned: - | ||
8 | Datasheet: | ||
9 | http://cds.linear.com/docs/Datasheet/42612fb.pdf | ||
10 | |||
11 | Author: Guenter Roeck <guenter.roeck@ericsson.com> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The LTC4261/LTC4261-2 negative voltage Hot Swap controllers allow a board | ||
18 | to be safely inserted and removed from a live backplane. | ||
19 | |||
20 | |||
21 | Usage Notes | ||
22 | ----------- | ||
23 | |||
24 | This driver does not probe for LTC4261 devices, since there is no register | ||
25 | which can be safely used to identify the chip. You will have to instantiate | ||
26 | the devices explicitly. | ||
27 | |||
28 | Example: the following will load the driver for an LTC4261 at address 0x10 | ||
29 | on I2C bus #1: | ||
30 | $ modprobe ltc4261 | ||
31 | $ echo ltc4261 0x10 > /sys/bus/i2c/devices/i2c-1/new_device | ||
32 | |||
33 | |||
34 | Sysfs entries | ||
35 | ------------- | ||
36 | |||
37 | Voltage readings provided by this driver are reported as obtained from the ADC | ||
38 | registers. If a set of voltage divider resistors is installed, calculate the | ||
39 | real voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the | ||
40 | value of the divider resistor against the measured voltage and R2 is the value | ||
41 | of the divider resistor against Ground. | ||
42 | |||
43 | Current reading provided by this driver is reported as obtained from the ADC | ||
44 | Current Sense register. The reported value assumes that a 1 mOhm sense resistor | ||
45 | is installed. If a different sense resistor is installed, calculate the real | ||
46 | current by dividing the reported value by the sense resistor value in mOhm. | ||
47 | |||
48 | The chip has two voltage sensors, but only one set of voltage alarm status bits. | ||
49 | In many many designs, those alarms are associated with the ADIN2 sensor, due to | ||
50 | the proximity of the ADIN2 pin to the OV pin. ADIN2 is, however, not available | ||
51 | on all chip variants. To ensure that the alarm condition is reported to the user, | ||
52 | report it with both voltage sensors. | ||
53 | |||
54 | in1_input ADIN2 voltage (mV) | ||
55 | in1_min_alarm ADIN/ADIN2 Undervoltage alarm | ||
56 | in1_max_alarm ADIN/ADIN2 Overvoltage alarm | ||
57 | |||
58 | in2_input ADIN voltage (mV) | ||
59 | in2_min_alarm ADIN/ADIN2 Undervoltage alarm | ||
60 | in2_max_alarm ADIN/ADIN2 Overvoltage alarm | ||
61 | |||
62 | curr1_input SENSE current (mA) | ||
63 | curr1_alarm SENSE overcurrent alarm | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 0b6815504e6d..4bc2f3c3da5b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1541,12 +1541,15 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1541 | 1 to enable accounting | 1541 | 1 to enable accounting |
1542 | Default value is 0. | 1542 | Default value is 0. |
1543 | 1543 | ||
1544 | nfsaddrs= [NFS] | 1544 | nfsaddrs= [NFS] Deprecated. Use ip= instead. |
1545 | See Documentation/filesystems/nfs/nfsroot.txt. | 1545 | See Documentation/filesystems/nfs/nfsroot.txt. |
1546 | 1546 | ||
1547 | nfsroot= [NFS] nfs root filesystem for disk-less boxes. | 1547 | nfsroot= [NFS] nfs root filesystem for disk-less boxes. |
1548 | See Documentation/filesystems/nfs/nfsroot.txt. | 1548 | See Documentation/filesystems/nfs/nfsroot.txt. |
1549 | 1549 | ||
1550 | nfsrootdebug [NFS] enable nfsroot debugging messages. | ||
1551 | See Documentation/filesystems/nfs/nfsroot.txt. | ||
1552 | |||
1550 | nfs.callback_tcpport= | 1553 | nfs.callback_tcpport= |
1551 | [NFS] set the TCP port on which the NFSv4 callback | 1554 | [NFS] set the TCP port on which the NFSv4 callback |
1552 | channel should listen. | 1555 | channel should listen. |
@@ -2438,7 +2441,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2438 | topology informations if the hardware supports these. | 2441 | topology informations if the hardware supports these. |
2439 | The scheduler will make use of these informations and | 2442 | The scheduler will make use of these informations and |
2440 | e.g. base its process migration decisions on it. | 2443 | e.g. base its process migration decisions on it. |
2441 | Default is off. | 2444 | Default is on. |
2442 | 2445 | ||
2443 | tp720= [HW,PS2] | 2446 | tp720= [HW,PS2] |
2444 | 2447 | ||
diff --git a/Documentation/misc-devices/apds990x.txt b/Documentation/misc-devices/apds990x.txt new file mode 100644 index 000000000000..d5408cade32f --- /dev/null +++ b/Documentation/misc-devices/apds990x.txt | |||
@@ -0,0 +1,111 @@ | |||
1 | Kernel driver apds990x | ||
2 | ====================== | ||
3 | |||
4 | Supported chips: | ||
5 | Avago APDS990X | ||
6 | |||
7 | Data sheet: | ||
8 | Not freely available | ||
9 | |||
10 | Author: | ||
11 | Samu Onkalo <samu.p.onkalo@nokia.com> | ||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | |||
16 | APDS990x is a combined ambient light and proximity sensor. ALS and proximity | ||
17 | functionality are highly connected. ALS measurement path must be running | ||
18 | while the proximity functionality is enabled. | ||
19 | |||
20 | ALS produces raw measurement values for two channels: Clear channel | ||
21 | (infrared + visible light) and IR only. However, threshold comparisons happen | ||
22 | using clear channel only. Lux value and the threshold level on the HW | ||
23 | might vary quite much depending the spectrum of the light source. | ||
24 | |||
25 | Driver makes necessary conversions to both directions so that user handles | ||
26 | only lux values. Lux value is calculated using information from the both | ||
27 | channels. HW threshold level is calculated from the given lux value to match | ||
28 | with current type of the lightning. Sometimes inaccuracy of the estimations | ||
29 | lead to false interrupt, but that doesn't harm. | ||
30 | |||
31 | ALS contains 4 different gain steps. Driver automatically | ||
32 | selects suitable gain step. After each measurement, reliability of the results | ||
33 | is estimated and new measurement is trigged if necessary. | ||
34 | |||
35 | Platform data can provide tuned values to the conversion formulas if | ||
36 | values are known. Otherwise plain sensor default values are used. | ||
37 | |||
38 | Proximity side is little bit simpler. There is no need for complex conversions. | ||
39 | It produces directly usable values. | ||
40 | |||
41 | Driver controls chip operational state using pm_runtime framework. | ||
42 | Voltage regulators are controlled based on chip operational state. | ||
43 | |||
44 | SYSFS | ||
45 | ----- | ||
46 | |||
47 | |||
48 | chip_id | ||
49 | RO - shows detected chip type and version | ||
50 | |||
51 | power_state | ||
52 | RW - enable / disable chip. Uses counting logic | ||
53 | 1 enables the chip | ||
54 | 0 disables the chip | ||
55 | lux0_input | ||
56 | RO - measured lux value | ||
57 | sysfs_notify called when threshold interrupt occurs | ||
58 | |||
59 | lux0_sensor_range | ||
60 | RO - lux0_input max value. Actually never reaches since sensor tends | ||
61 | to saturate much before that. Real max value varies depending | ||
62 | on the light spectrum etc. | ||
63 | |||
64 | lux0_rate | ||
65 | RW - measurement rate in Hz | ||
66 | |||
67 | lux0_rate_avail | ||
68 | RO - supported measurement rates | ||
69 | |||
70 | lux0_calibscale | ||
71 | RW - calibration value. Set to neutral value by default. | ||
72 | Output results are multiplied with calibscale / calibscale_default | ||
73 | value. | ||
74 | |||
75 | lux0_calibscale_default | ||
76 | RO - neutral calibration value | ||
77 | |||
78 | lux0_thresh_above_value | ||
79 | RW - HI level threshold value. All results above the value | ||
80 | trigs an interrupt. 65535 (i.e. sensor_range) disables the above | ||
81 | interrupt. | ||
82 | |||
83 | lux0_thresh_below_value | ||
84 | RW - LO level threshold value. All results below the value | ||
85 | trigs an interrupt. 0 disables the below interrupt. | ||
86 | |||
87 | prox0_raw | ||
88 | RO - measured proximity value | ||
89 | sysfs_notify called when threshold interrupt occurs | ||
90 | |||
91 | prox0_sensor_range | ||
92 | RO - prox0_raw max value (1023) | ||
93 | |||
94 | prox0_raw_en | ||
95 | RW - enable / disable proximity - uses counting logic | ||
96 | 1 enables the proximity | ||
97 | 0 disables the proximity | ||
98 | |||
99 | prox0_reporting_mode | ||
100 | RW - trigger / periodic. In "trigger" mode the driver tells two possible | ||
101 | values: 0 or prox0_sensor_range value. 0 means no proximity, | ||
102 | 1023 means proximity. This causes minimal number of interrupts. | ||
103 | In "periodic" mode the driver reports all values above | ||
104 | prox0_thresh_above. This causes more interrupts, but it can give | ||
105 | _rough_ estimate about the distance. | ||
106 | |||
107 | prox0_reporting_mode_avail | ||
108 | RO - accepted values to prox0_reporting_mode (trigger, periodic) | ||
109 | |||
110 | prox0_thresh_above_value | ||
111 | RW - threshold level which trigs proximity events. | ||
diff --git a/Documentation/misc-devices/bh1770glc.txt b/Documentation/misc-devices/bh1770glc.txt new file mode 100644 index 000000000000..7d64c014dc70 --- /dev/null +++ b/Documentation/misc-devices/bh1770glc.txt | |||
@@ -0,0 +1,116 @@ | |||
1 | Kernel driver bh1770glc | ||
2 | ======================= | ||
3 | |||
4 | Supported chips: | ||
5 | ROHM BH1770GLC | ||
6 | OSRAM SFH7770 | ||
7 | |||
8 | Data sheet: | ||
9 | Not freely available | ||
10 | |||
11 | Author: | ||
12 | Samu Onkalo <samu.p.onkalo@nokia.com> | ||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | BH1770GLC and SFH7770 are combined ambient light and proximity sensors. | ||
17 | ALS and proximity parts operates on their own, but they shares common I2C | ||
18 | interface and interrupt logic. In principle they can run on their own, | ||
19 | but ALS side results are used to estimate reliability of the proximity sensor. | ||
20 | |||
21 | ALS produces 16 bit lux values. The chip contains interrupt logic to produce | ||
22 | low and high threshold interrupts. | ||
23 | |||
24 | Proximity part contains IR-led driver up to 3 IR leds. The chip measures | ||
25 | amount of reflected IR light and produces proximity result. Resolution is | ||
26 | 8 bit. Driver supports only one channel. Driver uses ALS results to estimate | ||
27 | reliability of the proximity results. Thus ALS is always running while | ||
28 | proximity detection is needed. | ||
29 | |||
30 | Driver uses threshold interrupts to avoid need for polling the values. | ||
31 | Proximity low interrupt doesn't exists in the chip. This is simulated | ||
32 | by using a delayed work. As long as there is proximity threshold above | ||
33 | interrupts the delayed work is pushed forward. So, when proximity level goes | ||
34 | below the threshold value, there is no interrupt and the delayed work will | ||
35 | finally run. This is handled as no proximity indication. | ||
36 | |||
37 | Chip state is controlled via runtime pm framework when enabled in config. | ||
38 | |||
39 | Calibscale factor is used to hide differences between the chips. By default | ||
40 | value set to neutral state meaning factor of 1.00. To get proper values, | ||
41 | calibrated source of light is needed as a reference. Calibscale factor is set | ||
42 | so that measurement produces about the expected lux value. | ||
43 | |||
44 | SYSFS | ||
45 | ----- | ||
46 | |||
47 | chip_id | ||
48 | RO - shows detected chip type and version | ||
49 | |||
50 | power_state | ||
51 | RW - enable / disable chip. Uses counting logic | ||
52 | 1 enables the chip | ||
53 | 0 disables the chip | ||
54 | |||
55 | lux0_input | ||
56 | RO - measured lux value | ||
57 | sysfs_notify called when threshold interrupt occurs | ||
58 | |||
59 | lux0_sensor_range | ||
60 | RO - lux0_input max value | ||
61 | |||
62 | lux0_rate | ||
63 | RW - measurement rate in Hz | ||
64 | |||
65 | lux0_rate_avail | ||
66 | RO - supported measurement rates | ||
67 | |||
68 | lux0_thresh_above_value | ||
69 | RW - HI level threshold value. All results above the value | ||
70 | trigs an interrupt. 65535 (i.e. sensor_range) disables the above | ||
71 | interrupt. | ||
72 | |||
73 | lux0_thresh_below_value | ||
74 | RW - LO level threshold value. All results below the value | ||
75 | trigs an interrupt. 0 disables the below interrupt. | ||
76 | |||
77 | lux0_calibscale | ||
78 | RW - calibration value. Set to neutral value by default. | ||
79 | Output results are multiplied with calibscale / calibscale_default | ||
80 | value. | ||
81 | |||
82 | lux0_calibscale_default | ||
83 | RO - neutral calibration value | ||
84 | |||
85 | prox0_raw | ||
86 | RO - measured proximity value | ||
87 | sysfs_notify called when threshold interrupt occurs | ||
88 | |||
89 | prox0_sensor_range | ||
90 | RO - prox0_raw max value | ||
91 | |||
92 | prox0_raw_en | ||
93 | RW - enable / disable proximity - uses counting logic | ||
94 | 1 enables the proximity | ||
95 | 0 disables the proximity | ||
96 | |||
97 | prox0_thresh_above_count | ||
98 | RW - number of proximity interrupts needed before triggering the event | ||
99 | |||
100 | prox0_rate_above | ||
101 | RW - Measurement rate (in Hz) when the level is above threshold | ||
102 | i.e. when proximity on has been reported. | ||
103 | |||
104 | prox0_rate_below | ||
105 | RW - Measurement rate (in Hz) when the level is below threshold | ||
106 | i.e. when proximity off has been reported. | ||
107 | |||
108 | prox0_rate_avail | ||
109 | RO - Supported proximity measurement rates in Hz | ||
110 | |||
111 | prox0_thresh_above0_value | ||
112 | RW - threshold level which trigs proximity events. | ||
113 | Filtered by persistence filter (prox0_thresh_above_count) | ||
114 | |||
115 | prox0_thresh_above1_value | ||
116 | RW - threshold level which trigs event immediately | ||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 7f4dcebda9c6..d0eb696d32e8 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -300,6 +300,74 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
300 | control correctly. If you have problems regarding this, try | 300 | control correctly. If you have problems regarding this, try |
301 | another ALSA compliant mixer (alsamixer works). | 301 | another ALSA compliant mixer (alsamixer works). |
302 | 302 | ||
303 | Module snd-azt1605 | ||
304 | ------------------ | ||
305 | |||
306 | Module for Aztech Sound Galaxy soundcards based on the Aztech AZT1605 | ||
307 | chipset. | ||
308 | |||
309 | port - port # for BASE (0x220,0x240,0x260,0x280) | ||
310 | wss_port - port # for WSS (0x530,0x604,0xe80,0xf40) | ||
311 | irq - IRQ # for WSS (7,9,10,11) | ||
312 | dma1 - DMA # for WSS playback (0,1,3) | ||
313 | dma2 - DMA # for WSS capture (0,1), -1 = disabled (default) | ||
314 | mpu_port - port # for MPU-401 UART (0x300,0x330), -1 = disabled (default) | ||
315 | mpu_irq - IRQ # for MPU-401 UART (3,5,7,9), -1 = disabled (default) | ||
316 | fm_port - port # for OPL3 (0x388), -1 = disabled (default) | ||
317 | |||
318 | This module supports multiple cards. It does not support autoprobe: port, | ||
319 | wss_port, irq and dma1 have to be specified. The other values are | ||
320 | optional. | ||
321 | |||
322 | "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) | ||
323 | or the value stored in the card's EEPROM for cards that have an EEPROM and | ||
324 | their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can | ||
325 | be choosen freely from the options enumerated above. | ||
326 | |||
327 | If dma2 is specified and different from dma1, the card will operate in | ||
328 | full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to | ||
329 | enable capture since only channels 0 and 1 are available for capture. | ||
330 | |||
331 | Generic settings are "port=0x220 wss_port=0x530 irq=10 dma1=1 dma2=0 | ||
332 | mpu_port=0x330 mpu_irq=9 fm_port=0x388". | ||
333 | |||
334 | Whatever IRQ and DMA channels you pick, be sure to reserve them for | ||
335 | legacy ISA in your BIOS. | ||
336 | |||
337 | Module snd-azt2316 | ||
338 | ------------------ | ||
339 | |||
340 | Module for Aztech Sound Galaxy soundcards based on the Aztech AZT2316 | ||
341 | chipset. | ||
342 | |||
343 | port - port # for BASE (0x220,0x240,0x260,0x280) | ||
344 | wss_port - port # for WSS (0x530,0x604,0xe80,0xf40) | ||
345 | irq - IRQ # for WSS (7,9,10,11) | ||
346 | dma1 - DMA # for WSS playback (0,1,3) | ||
347 | dma2 - DMA # for WSS capture (0,1), -1 = disabled (default) | ||
348 | mpu_port - port # for MPU-401 UART (0x300,0x330), -1 = disabled (default) | ||
349 | mpu_irq - IRQ # for MPU-401 UART (5,7,9,10), -1 = disabled (default) | ||
350 | fm_port - port # for OPL3 (0x388), -1 = disabled (default) | ||
351 | |||
352 | This module supports multiple cards. It does not support autoprobe: port, | ||
353 | wss_port, irq and dma1 have to be specified. The other values are | ||
354 | optional. | ||
355 | |||
356 | "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) | ||
357 | or the value stored in the card's EEPROM for cards that have an EEPROM and | ||
358 | their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can | ||
359 | be choosen freely from the options enumerated above. | ||
360 | |||
361 | If dma2 is specified and different from dma1, the card will operate in | ||
362 | full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to | ||
363 | enable capture since only channels 0 and 1 are available for capture. | ||
364 | |||
365 | Generic settings are "port=0x220 wss_port=0x530 irq=10 dma1=1 dma2=0 | ||
366 | mpu_port=0x330 mpu_irq=9 fm_port=0x388". | ||
367 | |||
368 | Whatever IRQ and DMA channels you pick, be sure to reserve them for | ||
369 | legacy ISA in your BIOS. | ||
370 | |||
303 | Module snd-aw2 | 371 | Module snd-aw2 |
304 | -------------- | 372 | -------------- |
305 | 373 | ||
@@ -1641,20 +1709,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1641 | 1709 | ||
1642 | This card is also known as Audio Excel DSP 16 or Zoltrix AV302. | 1710 | This card is also known as Audio Excel DSP 16 or Zoltrix AV302. |
1643 | 1711 | ||
1644 | Module snd-sgalaxy | ||
1645 | ------------------ | ||
1646 | |||
1647 | Module for Aztech Sound Galaxy sound card. | ||
1648 | |||
1649 | sbport - Port # for SB16 interface (0x220,0x240) | ||
1650 | wssport - Port # for WSS interface (0x530,0xe80,0xf40,0x604) | ||
1651 | irq - IRQ # (7,9,10,11) | ||
1652 | dma1 - DMA # | ||
1653 | |||
1654 | This module supports multiple cards. | ||
1655 | |||
1656 | The power-management is supported. | ||
1657 | |||
1658 | Module snd-sscape | 1712 | Module snd-sscape |
1659 | ----------------- | 1713 | ----------------- |
1660 | 1714 | ||
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index 278cc2122ea0..c82beb007634 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -57,9 +57,11 @@ dead. However, this detection isn't perfect on some devices. In such | |||
57 | a case, you can change the default method via `position_fix` option. | 57 | a case, you can change the default method via `position_fix` option. |
58 | 58 | ||
59 | `position_fix=1` means to use LPIB method explicitly. | 59 | `position_fix=1` means to use LPIB method explicitly. |
60 | `position_fix=2` means to use the position-buffer. 0 is the default | 60 | `position_fix=2` means to use the position-buffer. |
61 | value, the automatic check and fallback to LPIB as described in the | 61 | `position_fix=3` means to use a combination of both methods, needed |
62 | above. If you get a problem of repeated sounds, this option might | 62 | for some VIA and ATI controllers. 0 is the default value for all other |
63 | controllers, the automatic check and fallback to LPIB as described in | ||
64 | the above. If you get a problem of repeated sounds, this option might | ||
63 | help. | 65 | help. |
64 | 66 | ||
65 | In addition to that, every controller is known to be broken regarding | 67 | In addition to that, every controller is known to be broken regarding |
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 5c17196c8fe9..312e3754e8c5 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -75,7 +75,7 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
75 | 75 | ||
76 | 'f' - Will call oom_kill to kill a memory hog process. | 76 | 'f' - Will call oom_kill to kill a memory hog process. |
77 | 77 | ||
78 | 'g' - Used by kgdb on ppc and sh platforms. | 78 | 'g' - Used by kgdb (kernel debugger) |
79 | 79 | ||
80 | 'h' - Will display help (actually any other key than those listed | 80 | 'h' - Will display help (actually any other key than those listed |
81 | here will display help. but 'h' is easy to remember :-) | 81 | here will display help. but 'h' is easy to remember :-) |
@@ -110,12 +110,15 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
110 | 110 | ||
111 | 'u' - Will attempt to remount all mounted filesystems read-only. | 111 | 'u' - Will attempt to remount all mounted filesystems read-only. |
112 | 112 | ||
113 | 'v' - Dumps Voyager SMP processor info to your console. | 113 | 'v' - Forcefully restores framebuffer console |
114 | 'v' - Causes ETM buffer dump [ARM-specific] | ||
114 | 115 | ||
115 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. | 116 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. |
116 | 117 | ||
117 | 'x' - Used by xmon interface on ppc/powerpc platforms. | 118 | 'x' - Used by xmon interface on ppc/powerpc platforms. |
118 | 119 | ||
120 | 'y' - Show global CPU Registers [SPARC-64 specific] | ||
121 | |||
119 | 'z' - Dump the ftrace buffer | 122 | 'z' - Dump the ftrace buffer |
120 | 123 | ||
121 | '0'-'9' - Sets the console log level, controlling which kernel messages | 124 | '0'-'9' - Sets the console log level, controlling which kernel messages |
diff --git a/Documentation/timers/hpet_example.c b/Documentation/timers/hpet_example.c index 4bfafb7bc4c5..9a3e7012c190 100644 --- a/Documentation/timers/hpet_example.c +++ b/Documentation/timers/hpet_example.c | |||
@@ -97,6 +97,33 @@ hpet_open_close(int argc, const char **argv) | |||
97 | void | 97 | void |
98 | hpet_info(int argc, const char **argv) | 98 | hpet_info(int argc, const char **argv) |
99 | { | 99 | { |
100 | struct hpet_info info; | ||
101 | int fd; | ||
102 | |||
103 | if (argc != 1) { | ||
104 | fprintf(stderr, "hpet_info: device-name\n"); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | fd = open(argv[0], O_RDONLY); | ||
109 | if (fd < 0) { | ||
110 | fprintf(stderr, "hpet_info: open of %s failed\n", argv[0]); | ||
111 | return; | ||
112 | } | ||
113 | |||
114 | if (ioctl(fd, HPET_INFO, &info) < 0) { | ||
115 | fprintf(stderr, "hpet_info: failed to get info\n"); | ||
116 | goto out; | ||
117 | } | ||
118 | |||
119 | fprintf(stderr, "hpet_info: hi_irqfreq 0x%lx hi_flags 0x%lx ", | ||
120 | info.hi_ireqfreq, info.hi_flags); | ||
121 | fprintf(stderr, "hi_hpet %d hi_timer %d\n", | ||
122 | info.hi_hpet, info.hi_timer); | ||
123 | |||
124 | out: | ||
125 | close(fd); | ||
126 | return; | ||
100 | } | 127 | } |
101 | 128 | ||
102 | void | 129 | void |
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl index 1b55146d1c8d..b3e73ddb1567 100644 --- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl +++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl | |||
@@ -46,7 +46,7 @@ use constant HIGH_KSWAPD_LATENCY => 20; | |||
46 | use constant HIGH_KSWAPD_REWAKEUP => 21; | 46 | use constant HIGH_KSWAPD_REWAKEUP => 21; |
47 | use constant HIGH_NR_SCANNED => 22; | 47 | use constant HIGH_NR_SCANNED => 22; |
48 | use constant HIGH_NR_TAKEN => 23; | 48 | use constant HIGH_NR_TAKEN => 23; |
49 | use constant HIGH_NR_RECLAIM => 24; | 49 | use constant HIGH_NR_RECLAIMED => 24; |
50 | use constant HIGH_NR_CONTIG_DIRTY => 25; | 50 | use constant HIGH_NR_CONTIG_DIRTY => 25; |
51 | 51 | ||
52 | my %perprocesspid; | 52 | my %perprocesspid; |
@@ -58,11 +58,13 @@ my $opt_read_procstat; | |||
58 | my $total_wakeup_kswapd; | 58 | my $total_wakeup_kswapd; |
59 | my ($total_direct_reclaim, $total_direct_nr_scanned); | 59 | my ($total_direct_reclaim, $total_direct_nr_scanned); |
60 | my ($total_direct_latency, $total_kswapd_latency); | 60 | my ($total_direct_latency, $total_kswapd_latency); |
61 | my ($total_direct_nr_reclaimed); | ||
61 | my ($total_direct_writepage_file_sync, $total_direct_writepage_file_async); | 62 | my ($total_direct_writepage_file_sync, $total_direct_writepage_file_async); |
62 | my ($total_direct_writepage_anon_sync, $total_direct_writepage_anon_async); | 63 | my ($total_direct_writepage_anon_sync, $total_direct_writepage_anon_async); |
63 | my ($total_kswapd_nr_scanned, $total_kswapd_wake); | 64 | my ($total_kswapd_nr_scanned, $total_kswapd_wake); |
64 | my ($total_kswapd_writepage_file_sync, $total_kswapd_writepage_file_async); | 65 | my ($total_kswapd_writepage_file_sync, $total_kswapd_writepage_file_async); |
65 | my ($total_kswapd_writepage_anon_sync, $total_kswapd_writepage_anon_async); | 66 | my ($total_kswapd_writepage_anon_sync, $total_kswapd_writepage_anon_async); |
67 | my ($total_kswapd_nr_reclaimed); | ||
66 | 68 | ||
67 | # Catch sigint and exit on request | 69 | # Catch sigint and exit on request |
68 | my $sigint_report = 0; | 70 | my $sigint_report = 0; |
@@ -104,7 +106,7 @@ my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)'; | |||
104 | my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; | 106 | my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; |
105 | my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)'; | 107 | my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)'; |
106 | my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_taken=([0-9]*) contig_taken=([0-9]*) contig_dirty=([0-9]*) contig_failed=([0-9]*)'; | 108 | my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_taken=([0-9]*) contig_taken=([0-9]*) contig_dirty=([0-9]*) contig_failed=([0-9]*)'; |
107 | my $regex_lru_shrink_inactive_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*)'; | 109 | my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) zid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)'; |
108 | my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)'; | 110 | my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)'; |
109 | my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; | 111 | my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; |
110 | 112 | ||
@@ -203,8 +205,8 @@ $regex_lru_shrink_inactive = generate_traceevent_regex( | |||
203 | "vmscan/mm_vmscan_lru_shrink_inactive", | 205 | "vmscan/mm_vmscan_lru_shrink_inactive", |
204 | $regex_lru_shrink_inactive_default, | 206 | $regex_lru_shrink_inactive_default, |
205 | "nid", "zid", | 207 | "nid", "zid", |
206 | "lru", | 208 | "nr_scanned", "nr_reclaimed", "priority", |
207 | "nr_scanned", "nr_reclaimed", "priority"); | 209 | "flags"); |
208 | $regex_lru_shrink_active = generate_traceevent_regex( | 210 | $regex_lru_shrink_active = generate_traceevent_regex( |
209 | "vmscan/mm_vmscan_lru_shrink_active", | 211 | "vmscan/mm_vmscan_lru_shrink_active", |
210 | $regex_lru_shrink_active_default, | 212 | $regex_lru_shrink_active_default, |
@@ -375,6 +377,16 @@ EVENT_PROCESS: | |||
375 | my $nr_contig_dirty = $7; | 377 | my $nr_contig_dirty = $7; |
376 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; | 378 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; |
377 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; | 379 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; |
380 | } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { | ||
381 | $details = $5; | ||
382 | if ($details !~ /$regex_lru_shrink_inactive/o) { | ||
383 | print "WARNING: Failed to parse mm_vmscan_lru_shrink_inactive as expected\n"; | ||
384 | print " $details\n"; | ||
385 | print " $regex_lru_shrink_inactive/o\n"; | ||
386 | next; | ||
387 | } | ||
388 | my $nr_reclaimed = $4; | ||
389 | $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed; | ||
378 | } elsif ($tracepoint eq "mm_vmscan_writepage") { | 390 | } elsif ($tracepoint eq "mm_vmscan_writepage") { |
379 | $details = $5; | 391 | $details = $5; |
380 | if ($details !~ /$regex_writepage/o) { | 392 | if ($details !~ /$regex_writepage/o) { |
@@ -464,8 +476,8 @@ sub dump_stats { | |||
464 | 476 | ||
465 | # Print out process activity | 477 | # Print out process activity |
466 | printf("\n"); | 478 | printf("\n"); |
467 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s\n", "Process", "Direct", "Wokeup", "Pages", "Pages", "Pages", "Time"); | 479 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s %8s\n", "Process", "Direct", "Wokeup", "Pages", "Pages", "Pages", "Pages", "Time"); |
468 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s\n", "details", "Rclms", "Kswapd", "Scanned", "Sync-IO", "ASync-IO", "Stalled"); | 480 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s %8s\n", "details", "Rclms", "Kswapd", "Scanned", "Rclmed", "Sync-IO", "ASync-IO", "Stalled"); |
469 | foreach $process_pid (keys %stats) { | 481 | foreach $process_pid (keys %stats) { |
470 | 482 | ||
471 | if (!$stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) { | 483 | if (!$stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) { |
@@ -475,6 +487,7 @@ sub dump_stats { | |||
475 | $total_direct_reclaim += $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}; | 487 | $total_direct_reclaim += $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}; |
476 | $total_wakeup_kswapd += $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; | 488 | $total_wakeup_kswapd += $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; |
477 | $total_direct_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; | 489 | $total_direct_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; |
490 | $total_direct_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED}; | ||
478 | $total_direct_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; | 491 | $total_direct_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; |
479 | $total_direct_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; | 492 | $total_direct_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; |
480 | $total_direct_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; | 493 | $total_direct_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; |
@@ -489,11 +502,12 @@ sub dump_stats { | |||
489 | $index++; | 502 | $index++; |
490 | } | 503 | } |
491 | 504 | ||
492 | printf("%-" . $max_strlen . "s %8d %10d %8u %8u %8u %8.3f", | 505 | printf("%-" . $max_strlen . "s %8d %10d %8u %8u %8u %8u %8.3f", |
493 | $process_pid, | 506 | $process_pid, |
494 | $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}, | 507 | $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}, |
495 | $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}, | 508 | $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}, |
496 | $stats{$process_pid}->{HIGH_NR_SCANNED}, | 509 | $stats{$process_pid}->{HIGH_NR_SCANNED}, |
510 | $stats{$process_pid}->{HIGH_NR_RECLAIMED}, | ||
497 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, | 511 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, |
498 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}, | 512 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}, |
499 | $this_reclaim_delay / 1000); | 513 | $this_reclaim_delay / 1000); |
@@ -529,8 +543,8 @@ sub dump_stats { | |||
529 | 543 | ||
530 | # Print out kswapd activity | 544 | # Print out kswapd activity |
531 | printf("\n"); | 545 | printf("\n"); |
532 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Kswapd", "Kswapd", "Order", "Pages", "Pages", "Pages"); | 546 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Kswapd", "Kswapd", "Order", "Pages", "Pages", "Pages", "Pages"); |
533 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Instance", "Wakeups", "Re-wakeup", "Scanned", "Sync-IO", "ASync-IO"); | 547 | printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Instance", "Wakeups", "Re-wakeup", "Scanned", "Rclmed", "Sync-IO", "ASync-IO"); |
534 | foreach $process_pid (keys %stats) { | 548 | foreach $process_pid (keys %stats) { |
535 | 549 | ||
536 | if (!$stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) { | 550 | if (!$stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) { |
@@ -539,16 +553,18 @@ sub dump_stats { | |||
539 | 553 | ||
540 | $total_kswapd_wake += $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}; | 554 | $total_kswapd_wake += $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}; |
541 | $total_kswapd_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; | 555 | $total_kswapd_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; |
556 | $total_kswapd_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED}; | ||
542 | $total_kswapd_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; | 557 | $total_kswapd_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; |
543 | $total_kswapd_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; | 558 | $total_kswapd_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; |
544 | $total_kswapd_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; | 559 | $total_kswapd_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; |
545 | $total_kswapd_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}; | 560 | $total_kswapd_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}; |
546 | 561 | ||
547 | printf("%-" . $max_strlen . "s %8d %10d %8u %8i %8u", | 562 | printf("%-" . $max_strlen . "s %8d %10d %8u %8u %8i %8u", |
548 | $process_pid, | 563 | $process_pid, |
549 | $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}, | 564 | $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}, |
550 | $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP}, | 565 | $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP}, |
551 | $stats{$process_pid}->{HIGH_NR_SCANNED}, | 566 | $stats{$process_pid}->{HIGH_NR_SCANNED}, |
567 | $stats{$process_pid}->{HIGH_NR_RECLAIMED}, | ||
552 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, | 568 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, |
553 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}); | 569 | $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}); |
554 | 570 | ||
@@ -579,6 +595,7 @@ sub dump_stats { | |||
579 | print "\nSummary\n"; | 595 | print "\nSummary\n"; |
580 | print "Direct reclaims: $total_direct_reclaim\n"; | 596 | print "Direct reclaims: $total_direct_reclaim\n"; |
581 | print "Direct reclaim pages scanned: $total_direct_nr_scanned\n"; | 597 | print "Direct reclaim pages scanned: $total_direct_nr_scanned\n"; |
598 | print "Direct reclaim pages reclaimed: $total_direct_nr_reclaimed\n"; | ||
582 | print "Direct reclaim write file sync I/O: $total_direct_writepage_file_sync\n"; | 599 | print "Direct reclaim write file sync I/O: $total_direct_writepage_file_sync\n"; |
583 | print "Direct reclaim write anon sync I/O: $total_direct_writepage_anon_sync\n"; | 600 | print "Direct reclaim write anon sync I/O: $total_direct_writepage_anon_sync\n"; |
584 | print "Direct reclaim write file async I/O: $total_direct_writepage_file_async\n"; | 601 | print "Direct reclaim write file async I/O: $total_direct_writepage_file_async\n"; |
@@ -588,6 +605,7 @@ sub dump_stats { | |||
588 | print "\n"; | 605 | print "\n"; |
589 | print "Kswapd wakeups: $total_kswapd_wake\n"; | 606 | print "Kswapd wakeups: $total_kswapd_wake\n"; |
590 | print "Kswapd pages scanned: $total_kswapd_nr_scanned\n"; | 607 | print "Kswapd pages scanned: $total_kswapd_nr_scanned\n"; |
608 | print "Kswapd pages reclaimed: $total_kswapd_nr_reclaimed\n"; | ||
591 | print "Kswapd reclaim write file sync I/O: $total_kswapd_writepage_file_sync\n"; | 609 | print "Kswapd reclaim write file sync I/O: $total_kswapd_writepage_file_sync\n"; |
592 | print "Kswapd reclaim write anon sync I/O: $total_kswapd_writepage_anon_sync\n"; | 610 | print "Kswapd reclaim write anon sync I/O: $total_kswapd_writepage_anon_sync\n"; |
593 | print "Kswapd reclaim write file async I/O: $total_kswapd_writepage_file_async\n"; | 611 | print "Kswapd reclaim write file async I/O: $total_kswapd_writepage_file_async\n"; |
@@ -612,6 +630,7 @@ sub aggregate_perprocesspid() { | |||
612 | $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD} += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; | 630 | $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD} += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; |
613 | $perprocess{$process}->{HIGH_KSWAPD_REWAKEUP} += $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP}; | 631 | $perprocess{$process}->{HIGH_KSWAPD_REWAKEUP} += $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP}; |
614 | $perprocess{$process}->{HIGH_NR_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_SCANNED}; | 632 | $perprocess{$process}->{HIGH_NR_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_SCANNED}; |
633 | $perprocess{$process}->{HIGH_NR_RECLAIMED} += $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED}; | ||
615 | $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; | 634 | $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; |
616 | $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; | 635 | $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; |
617 | $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; | 636 | $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; |
diff --git a/Documentation/vm/highmem.txt b/Documentation/vm/highmem.txt new file mode 100644 index 000000000000..4324d24ffacd --- /dev/null +++ b/Documentation/vm/highmem.txt | |||
@@ -0,0 +1,162 @@ | |||
1 | |||
2 | ==================== | ||
3 | HIGH MEMORY HANDLING | ||
4 | ==================== | ||
5 | |||
6 | By: Peter Zijlstra <a.p.zijlstra@chello.nl> | ||
7 | |||
8 | Contents: | ||
9 | |||
10 | (*) What is high memory? | ||
11 | |||
12 | (*) Temporary virtual mappings. | ||
13 | |||
14 | (*) Using kmap_atomic. | ||
15 | |||
16 | (*) Cost of temporary mappings. | ||
17 | |||
18 | (*) i386 PAE. | ||
19 | |||
20 | |||
21 | ==================== | ||
22 | WHAT IS HIGH MEMORY? | ||
23 | ==================== | ||
24 | |||
25 | High memory (highmem) is used when the size of physical memory approaches or | ||
26 | exceeds the maximum size of virtual memory. At that point it becomes | ||
27 | impossible for the kernel to keep all of the available physical memory mapped | ||
28 | at all times. This means the kernel needs to start using temporary mappings of | ||
29 | the pieces of physical memory that it wants to access. | ||
30 | |||
31 | The part of (physical) memory not covered by a permanent mapping is what we | ||
32 | refer to as 'highmem'. There are various architecture dependent constraints on | ||
33 | where exactly that border lies. | ||
34 | |||
35 | In the i386 arch, for example, we choose to map the kernel into every process's | ||
36 | VM space so that we don't have to pay the full TLB invalidation costs for | ||
37 | kernel entry/exit. This means the available virtual memory space (4GiB on | ||
38 | i386) has to be divided between user and kernel space. | ||
39 | |||
40 | The traditional split for architectures using this approach is 3:1, 3GiB for | ||
41 | userspace and the top 1GiB for kernel space: | ||
42 | |||
43 | +--------+ 0xffffffff | ||
44 | | Kernel | | ||
45 | +--------+ 0xc0000000 | ||
46 | | | | ||
47 | | User | | ||
48 | | | | ||
49 | +--------+ 0x00000000 | ||
50 | |||
51 | This means that the kernel can at most map 1GiB of physical memory at any one | ||
52 | time, but because we need virtual address space for other things - including | ||
53 | temporary maps to access the rest of the physical memory - the actual direct | ||
54 | map will typically be less (usually around ~896MiB). | ||
55 | |||
56 | Other architectures that have mm context tagged TLBs can have separate kernel | ||
57 | and user maps. Some hardware (like some ARMs), however, have limited virtual | ||
58 | space when they use mm context tags. | ||
59 | |||
60 | |||
61 | ========================== | ||
62 | TEMPORARY VIRTUAL MAPPINGS | ||
63 | ========================== | ||
64 | |||
65 | The kernel contains several ways of creating temporary mappings: | ||
66 | |||
67 | (*) vmap(). This can be used to make a long duration mapping of multiple | ||
68 | physical pages into a contiguous virtual space. It needs global | ||
69 | synchronization to unmap. | ||
70 | |||
71 | (*) kmap(). This permits a short duration mapping of a single page. It needs | ||
72 | global synchronization, but is amortized somewhat. It is also prone to | ||
73 | deadlocks when using in a nested fashion, and so it is not recommended for | ||
74 | new code. | ||
75 | |||
76 | (*) kmap_atomic(). This permits a very short duration mapping of a single | ||
77 | page. Since the mapping is restricted to the CPU that issued it, it | ||
78 | performs well, but the issuing task is therefore required to stay on that | ||
79 | CPU until it has finished, lest some other task displace its mappings. | ||
80 | |||
81 | kmap_atomic() may also be used by interrupt contexts, since it is does not | ||
82 | sleep and the caller may not sleep until after kunmap_atomic() is called. | ||
83 | |||
84 | It may be assumed that k[un]map_atomic() won't fail. | ||
85 | |||
86 | |||
87 | ================= | ||
88 | USING KMAP_ATOMIC | ||
89 | ================= | ||
90 | |||
91 | When and where to use kmap_atomic() is straightforward. It is used when code | ||
92 | wants to access the contents of a page that might be allocated from high memory | ||
93 | (see __GFP_HIGHMEM), for example a page in the pagecache. The API has two | ||
94 | functions, and they can be used in a manner similar to the following: | ||
95 | |||
96 | /* Find the page of interest. */ | ||
97 | struct page *page = find_get_page(mapping, offset); | ||
98 | |||
99 | /* Gain access to the contents of that page. */ | ||
100 | void *vaddr = kmap_atomic(page); | ||
101 | |||
102 | /* Do something to the contents of that page. */ | ||
103 | memset(vaddr, 0, PAGE_SIZE); | ||
104 | |||
105 | /* Unmap that page. */ | ||
106 | kunmap_atomic(vaddr); | ||
107 | |||
108 | Note that the kunmap_atomic() call takes the result of the kmap_atomic() call | ||
109 | not the argument. | ||
110 | |||
111 | If you need to map two pages because you want to copy from one page to | ||
112 | another you need to keep the kmap_atomic calls strictly nested, like: | ||
113 | |||
114 | vaddr1 = kmap_atomic(page1); | ||
115 | vaddr2 = kmap_atomic(page2); | ||
116 | |||
117 | memcpy(vaddr1, vaddr2, PAGE_SIZE); | ||
118 | |||
119 | kunmap_atomic(vaddr2); | ||
120 | kunmap_atomic(vaddr1); | ||
121 | |||
122 | |||
123 | ========================== | ||
124 | COST OF TEMPORARY MAPPINGS | ||
125 | ========================== | ||
126 | |||
127 | The cost of creating temporary mappings can be quite high. The arch has to | ||
128 | manipulate the kernel's page tables, the data TLB and/or the MMU's registers. | ||
129 | |||
130 | If CONFIG_HIGHMEM is not set, then the kernel will try and create a mapping | ||
131 | simply with a bit of arithmetic that will convert the page struct address into | ||
132 | a pointer to the page contents rather than juggling mappings about. In such a | ||
133 | case, the unmap operation may be a null operation. | ||
134 | |||
135 | If CONFIG_MMU is not set, then there can be no temporary mappings and no | ||
136 | highmem. In such a case, the arithmetic approach will also be used. | ||
137 | |||
138 | |||
139 | ======== | ||
140 | i386 PAE | ||
141 | ======== | ||
142 | |||
143 | The i386 arch, under some circumstances, will permit you to stick up to 64GiB | ||
144 | of RAM into your 32-bit machine. This has a number of consequences: | ||
145 | |||
146 | (*) Linux needs a page-frame structure for each page in the system and the | ||
147 | pageframes need to live in the permanent mapping, which means: | ||
148 | |||
149 | (*) you can have 896M/sizeof(struct page) page-frames at most; with struct | ||
150 | page being 32-bytes that would end up being something in the order of 112G | ||
151 | worth of pages; the kernel, however, needs to store more than just | ||
152 | page-frames in that memory... | ||
153 | |||
154 | (*) PAE makes your page tables larger - which slows the system down as more | ||
155 | data has to be accessed to traverse in TLB fills and the like. One | ||
156 | advantage is that PAE has more PTE bits and can provide advanced features | ||
157 | like NX and PAT. | ||
158 | |||
159 | The general recommendation is that you don't use more than 8GiB on a 32-bit | ||
160 | machine - although more might work for you and your workload, you're pretty | ||
161 | much on your own - don't expect kernel developers to really care much if things | ||
162 | come apart. | ||