diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
commit | 220d0b1dbf78c6417a658c96e571415552d3abac (patch) | |
tree | 70cd3862540c38ea490e7a27c3c7acc35b680234 /Documentation | |
parent | 474b18ccc264c472abeec50f48469b6477202699 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge branch 'master' into for-2.6.33
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/fb/framebuffer.txt | 6 | ||||
-rw-r--r-- | Documentation/filesystems/caching/fscache.txt | 110 | ||||
-rw-r--r-- | Documentation/filesystems/caching/netfs-api.txt | 21 | ||||
-rw-r--r-- | Documentation/filesystems/ext4.txt | 8 | ||||
-rw-r--r-- | Documentation/filesystems/ocfs2.txt | 6 | ||||
-rw-r--r-- | Documentation/i2c/busses/i2c-piix4 | 2 | ||||
-rw-r--r-- | Documentation/slow-work.txt | 160 | ||||
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 2 | ||||
-rw-r--r-- | Documentation/thermal/sysfs-api.txt | 389 | ||||
-rw-r--r-- | Documentation/trace/ftrace.txt | 2 | ||||
-rw-r--r-- | Documentation/vm/page-types.c | 2 |
11 files changed, 502 insertions, 206 deletions
diff --git a/Documentation/fb/framebuffer.txt b/Documentation/fb/framebuffer.txt index b3e3a0356839..fe79e3c8847d 100644 --- a/Documentation/fb/framebuffer.txt +++ b/Documentation/fb/framebuffer.txt | |||
@@ -312,10 +312,8 @@ and to the following documentation: | |||
312 | 8. Mailing list | 312 | 8. Mailing list |
313 | --------------- | 313 | --------------- |
314 | 314 | ||
315 | There are several frame buffer device related mailing lists at SourceForge: | 315 | There is a frame buffer device related mailing list at kernel.org: |
316 | - linux-fbdev-announce@lists.sourceforge.net, for announcements, | 316 | linux-fbdev@vger.kernel.org. |
317 | - linux-fbdev-user@lists.sourceforge.net, for generic user support, | ||
318 | - linux-fbdev-devel@lists.sourceforge.net, for project developers. | ||
319 | 317 | ||
320 | Point your web browser to http://sourceforge.net/projects/linux-fbdev/ for | 318 | Point your web browser to http://sourceforge.net/projects/linux-fbdev/ for |
321 | subscription information and archive browsing. | 319 | subscription information and archive browsing. |
diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt index 9e94b9491d89..a91e2e2095b0 100644 --- a/Documentation/filesystems/caching/fscache.txt +++ b/Documentation/filesystems/caching/fscache.txt | |||
@@ -235,6 +235,7 @@ proc files. | |||
235 | neg=N Number of negative lookups made | 235 | neg=N Number of negative lookups made |
236 | pos=N Number of positive lookups made | 236 | pos=N Number of positive lookups made |
237 | crt=N Number of objects created by lookup | 237 | crt=N Number of objects created by lookup |
238 | tmo=N Number of lookups timed out and requeued | ||
238 | Updates n=N Number of update cookie requests seen | 239 | Updates n=N Number of update cookie requests seen |
239 | nul=N Number of upd reqs given a NULL parent | 240 | nul=N Number of upd reqs given a NULL parent |
240 | run=N Number of upd reqs granted CPU time | 241 | run=N Number of upd reqs granted CPU time |
@@ -250,8 +251,10 @@ proc files. | |||
250 | ok=N Number of successful alloc reqs | 251 | ok=N Number of successful alloc reqs |
251 | wt=N Number of alloc reqs that waited on lookup completion | 252 | wt=N Number of alloc reqs that waited on lookup completion |
252 | nbf=N Number of alloc reqs rejected -ENOBUFS | 253 | nbf=N Number of alloc reqs rejected -ENOBUFS |
254 | int=N Number of alloc reqs aborted -ERESTARTSYS | ||
253 | ops=N Number of alloc reqs submitted | 255 | ops=N Number of alloc reqs submitted |
254 | owt=N Number of alloc reqs waited for CPU time | 256 | owt=N Number of alloc reqs waited for CPU time |
257 | abt=N Number of alloc reqs aborted due to object death | ||
255 | Retrvls n=N Number of retrieval (read) requests seen | 258 | Retrvls n=N Number of retrieval (read) requests seen |
256 | ok=N Number of successful retr reqs | 259 | ok=N Number of successful retr reqs |
257 | wt=N Number of retr reqs that waited on lookup completion | 260 | wt=N Number of retr reqs that waited on lookup completion |
@@ -261,6 +264,7 @@ proc files. | |||
261 | oom=N Number of retr reqs failed -ENOMEM | 264 | oom=N Number of retr reqs failed -ENOMEM |
262 | ops=N Number of retr reqs submitted | 265 | ops=N Number of retr reqs submitted |
263 | owt=N Number of retr reqs waited for CPU time | 266 | owt=N Number of retr reqs waited for CPU time |
267 | abt=N Number of retr reqs aborted due to object death | ||
264 | Stores n=N Number of storage (write) requests seen | 268 | Stores n=N Number of storage (write) requests seen |
265 | ok=N Number of successful store reqs | 269 | ok=N Number of successful store reqs |
266 | agn=N Number of store reqs on a page already pending storage | 270 | agn=N Number of store reqs on a page already pending storage |
@@ -268,12 +272,37 @@ proc files. | |||
268 | oom=N Number of store reqs failed -ENOMEM | 272 | oom=N Number of store reqs failed -ENOMEM |
269 | ops=N Number of store reqs submitted | 273 | ops=N Number of store reqs submitted |
270 | run=N Number of store reqs granted CPU time | 274 | run=N Number of store reqs granted CPU time |
275 | pgs=N Number of pages given store req processing time | ||
276 | rxd=N Number of store reqs deleted from tracking tree | ||
277 | olm=N Number of store reqs over store limit | ||
278 | VmScan nos=N Number of release reqs against pages with no pending store | ||
279 | gon=N Number of release reqs against pages stored by time lock granted | ||
280 | bsy=N Number of release reqs ignored due to in-progress store | ||
281 | can=N Number of page stores cancelled due to release req | ||
271 | Ops pend=N Number of times async ops added to pending queues | 282 | Ops pend=N Number of times async ops added to pending queues |
272 | run=N Number of times async ops given CPU time | 283 | run=N Number of times async ops given CPU time |
273 | enq=N Number of times async ops queued for processing | 284 | enq=N Number of times async ops queued for processing |
285 | can=N Number of async ops cancelled | ||
286 | rej=N Number of async ops rejected due to object lookup/create failure | ||
274 | dfr=N Number of async ops queued for deferred release | 287 | dfr=N Number of async ops queued for deferred release |
275 | rel=N Number of async ops released | 288 | rel=N Number of async ops released |
276 | gc=N Number of deferred-release async ops garbage collected | 289 | gc=N Number of deferred-release async ops garbage collected |
290 | CacheOp alo=N Number of in-progress alloc_object() cache ops | ||
291 | luo=N Number of in-progress lookup_object() cache ops | ||
292 | luc=N Number of in-progress lookup_complete() cache ops | ||
293 | gro=N Number of in-progress grab_object() cache ops | ||
294 | upo=N Number of in-progress update_object() cache ops | ||
295 | dro=N Number of in-progress drop_object() cache ops | ||
296 | pto=N Number of in-progress put_object() cache ops | ||
297 | syn=N Number of in-progress sync_cache() cache ops | ||
298 | atc=N Number of in-progress attr_changed() cache ops | ||
299 | rap=N Number of in-progress read_or_alloc_page() cache ops | ||
300 | ras=N Number of in-progress read_or_alloc_pages() cache ops | ||
301 | alp=N Number of in-progress allocate_page() cache ops | ||
302 | als=N Number of in-progress allocate_pages() cache ops | ||
303 | wrp=N Number of in-progress write_page() cache ops | ||
304 | ucp=N Number of in-progress uncache_page() cache ops | ||
305 | dsp=N Number of in-progress dissociate_pages() cache ops | ||
277 | 306 | ||
278 | 307 | ||
279 | (*) /proc/fs/fscache/histogram | 308 | (*) /proc/fs/fscache/histogram |
@@ -299,6 +328,87 @@ proc files. | |||
299 | jiffy range covered, and the SECS field the equivalent number of seconds. | 328 | jiffy range covered, and the SECS field the equivalent number of seconds. |
300 | 329 | ||
301 | 330 | ||
331 | =========== | ||
332 | OBJECT LIST | ||
333 | =========== | ||
334 | |||
335 | If CONFIG_FSCACHE_OBJECT_LIST is enabled, the FS-Cache facility will maintain a | ||
336 | list of all the objects currently allocated and allow them to be viewed | ||
337 | through: | ||
338 | |||
339 | /proc/fs/fscache/objects | ||
340 | |||
341 | This will look something like: | ||
342 | |||
343 | [root@andromeda ~]# head /proc/fs/fscache/objects | ||
344 | OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA | ||
345 | ======== ======== ==== ===== === === === == ===== == == = = | ================ == == ================ ================ | ||
346 | 17e4b 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88001dd82820 010006017edcf8bbc93b43298fdfbe71e50b57b13a172c0117f38472, e567634700000000000000000000000063f2404a000000000000000000000000c9030000000000000000000063f2404a | ||
347 | 1693a 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88002db23380 010006017edcf8bbc93b43298fdfbe71e50b57b1e0162c01a2df0ea6, 420ebc4a000000000000000000000000420ebc4a0000000000000000000000000e1801000000000000000000420ebc4a | ||
348 | |||
349 | where the first set of columns before the '|' describe the object: | ||
350 | |||
351 | COLUMN DESCRIPTION | ||
352 | ======= =============================================================== | ||
353 | OBJECT Object debugging ID (appears as OBJ%x in some debug messages) | ||
354 | PARENT Debugging ID of parent object | ||
355 | STAT Object state | ||
356 | CHLDN Number of child objects of this object | ||
357 | OPS Number of outstanding operations on this object | ||
358 | OOP Number of outstanding child object management operations | ||
359 | IPR | ||
360 | EX Number of outstanding exclusive operations | ||
361 | READS Number of outstanding read operations | ||
362 | EM Object's event mask | ||
363 | EV Events raised on this object | ||
364 | F Object flags | ||
365 | S Object slow-work work item flags | ||
366 | |||
367 | and the second set of columns describe the object's cookie, if present: | ||
368 | |||
369 | COLUMN DESCRIPTION | ||
370 | =============== ======================================================= | ||
371 | NETFS_COOKIE_DEF Name of netfs cookie definition | ||
372 | TY Cookie type (IX - index, DT - data, hex - special) | ||
373 | FL Cookie flags | ||
374 | NETFS_DATA Netfs private data stored in the cookie | ||
375 | OBJECT_KEY Object key } 1 column, with separating comma | ||
376 | AUX_DATA Object aux data } presence may be configured | ||
377 | |||
378 | The data shown may be filtered by attaching the a key to an appropriate keyring | ||
379 | before viewing the file. Something like: | ||
380 | |||
381 | keyctl add user fscache:objlist <restrictions> @s | ||
382 | |||
383 | where <restrictions> are a selection of the following letters: | ||
384 | |||
385 | K Show hexdump of object key (don't show if not given) | ||
386 | A Show hexdump of object aux data (don't show if not given) | ||
387 | |||
388 | and the following paired letters: | ||
389 | |||
390 | C Show objects that have a cookie | ||
391 | c Show objects that don't have a cookie | ||
392 | B Show objects that are busy | ||
393 | b Show objects that aren't busy | ||
394 | W Show objects that have pending writes | ||
395 | w Show objects that don't have pending writes | ||
396 | R Show objects that have outstanding reads | ||
397 | r Show objects that don't have outstanding reads | ||
398 | S Show objects that have slow work queued | ||
399 | s Show objects that don't have slow work queued | ||
400 | |||
401 | If neither side of a letter pair is given, then both are implied. For example: | ||
402 | |||
403 | keyctl add user fscache:objlist KB @s | ||
404 | |||
405 | shows objects that are busy, and lists their object keys, but does not dump | ||
406 | their auxiliary data. It also implies "CcWwRrSs", but as 'B' is given, 'b' is | ||
407 | not implied. | ||
408 | |||
409 | By default all objects and all fields will be shown. | ||
410 | |||
411 | |||
302 | ========= | 412 | ========= |
303 | DEBUGGING | 413 | DEBUGGING |
304 | ========= | 414 | ========= |
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt index 2666b1ed5e9e..1902c57b72ef 100644 --- a/Documentation/filesystems/caching/netfs-api.txt +++ b/Documentation/filesystems/caching/netfs-api.txt | |||
@@ -641,7 +641,7 @@ data file must be retired (see the relinquish cookie function below). | |||
641 | 641 | ||
642 | Furthermore, note that this does not cancel the asynchronous read or write | 642 | Furthermore, note that this does not cancel the asynchronous read or write |
643 | operation started by the read/alloc and write functions, so the page | 643 | operation started by the read/alloc and write functions, so the page |
644 | invalidation and release functions must use: | 644 | invalidation functions must use: |
645 | 645 | ||
646 | bool fscache_check_page_write(struct fscache_cookie *cookie, | 646 | bool fscache_check_page_write(struct fscache_cookie *cookie, |
647 | struct page *page); | 647 | struct page *page); |
@@ -654,6 +654,25 @@ to see if a page is being written to the cache, and: | |||
654 | to wait for it to finish if it is. | 654 | to wait for it to finish if it is. |
655 | 655 | ||
656 | 656 | ||
657 | When releasepage() is being implemented, a special FS-Cache function exists to | ||
658 | manage the heuristics of coping with vmscan trying to eject pages, which may | ||
659 | conflict with the cache trying to write pages to the cache (which may itself | ||
660 | need to allocate memory): | ||
661 | |||
662 | bool fscache_maybe_release_page(struct fscache_cookie *cookie, | ||
663 | struct page *page, | ||
664 | gfp_t gfp); | ||
665 | |||
666 | This takes the netfs cookie, and the page and gfp arguments as supplied to | ||
667 | releasepage(). It will return false if the page cannot be released yet for | ||
668 | some reason and if it returns true, the page has been uncached and can now be | ||
669 | released. | ||
670 | |||
671 | To make a page available for release, this function may wait for an outstanding | ||
672 | storage request to complete, or it may attempt to cancel the storage request - | ||
673 | in which case the page will not be stored in the cache this time. | ||
674 | |||
675 | |||
657 | ========================== | 676 | ========================== |
658 | INDEX AND DATA FILE UPDATE | 677 | INDEX AND DATA FILE UPDATE |
659 | ========================== | 678 | ========================== |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index bf4f4b7e11b3..6d94e0696f8c 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -134,9 +134,15 @@ ro Mount filesystem read only. Note that ext4 will | |||
134 | mount options "ro,noload" can be used to prevent | 134 | mount options "ro,noload" can be used to prevent |
135 | writes to the filesystem. | 135 | writes to the filesystem. |
136 | 136 | ||
137 | journal_checksum Enable checksumming of the journal transactions. | ||
138 | This will allow the recovery code in e2fsck and the | ||
139 | kernel to detect corruption in the kernel. It is a | ||
140 | compatible change and will be ignored by older kernels. | ||
141 | |||
137 | journal_async_commit Commit block can be written to disk without waiting | 142 | journal_async_commit Commit block can be written to disk without waiting |
138 | for descriptor blocks. If enabled older kernels cannot | 143 | for descriptor blocks. If enabled older kernels cannot |
139 | mount the device. | 144 | mount the device. This will enable 'journal_checksum' |
145 | internally. | ||
140 | 146 | ||
141 | journal=update Update the ext4 file system's journal to the current | 147 | journal=update Update the ext4 file system's journal to the current |
142 | format. | 148 | format. |
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt index c2a0871280a0..c58b9f5ba002 100644 --- a/Documentation/filesystems/ocfs2.txt +++ b/Documentation/filesystems/ocfs2.txt | |||
@@ -20,15 +20,16 @@ Lots of code taken from ext3 and other projects. | |||
20 | Authors in alphabetical order: | 20 | Authors in alphabetical order: |
21 | Joel Becker <joel.becker@oracle.com> | 21 | Joel Becker <joel.becker@oracle.com> |
22 | Zach Brown <zach.brown@oracle.com> | 22 | Zach Brown <zach.brown@oracle.com> |
23 | Mark Fasheh <mark.fasheh@oracle.com> | 23 | Mark Fasheh <mfasheh@suse.com> |
24 | Kurt Hackel <kurt.hackel@oracle.com> | 24 | Kurt Hackel <kurt.hackel@oracle.com> |
25 | Tao Ma <tao.ma@oracle.com> | ||
25 | Sunil Mushran <sunil.mushran@oracle.com> | 26 | Sunil Mushran <sunil.mushran@oracle.com> |
26 | Manish Singh <manish.singh@oracle.com> | 27 | Manish Singh <manish.singh@oracle.com> |
28 | Tiger Yang <tiger.yang@oracle.com> | ||
27 | 29 | ||
28 | Caveats | 30 | Caveats |
29 | ======= | 31 | ======= |
30 | Features which OCFS2 does not support yet: | 32 | Features which OCFS2 does not support yet: |
31 | - quotas | ||
32 | - Directory change notification (F_NOTIFY) | 33 | - Directory change notification (F_NOTIFY) |
33 | - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) | 34 | - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) |
34 | 35 | ||
@@ -70,7 +71,6 @@ commit=nrsec (*) Ocfs2 can be told to sync all its data and metadata | |||
70 | performance. | 71 | performance. |
71 | localalloc=8(*) Allows custom localalloc size in MB. If the value is too | 72 | localalloc=8(*) Allows custom localalloc size in MB. If the value is too |
72 | large, the fs will silently revert it to the default. | 73 | large, the fs will silently revert it to the default. |
73 | Localalloc is not enabled for local mounts. | ||
74 | localflocks This disables cluster aware flock. | 74 | localflocks This disables cluster aware flock. |
75 | inode64 Indicates that Ocfs2 is allowed to create inodes at | 75 | inode64 Indicates that Ocfs2 is allowed to create inodes at |
76 | any location in the filesystem, including those which | 76 | any location in the filesystem, including those which |
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4 index c5b37c570554..ac540c71c7eb 100644 --- a/Documentation/i2c/busses/i2c-piix4 +++ b/Documentation/i2c/busses/i2c-piix4 | |||
@@ -8,7 +8,7 @@ Supported adapters: | |||
8 | Datasheet: Only available via NDA from ServerWorks | 8 | Datasheet: Only available via NDA from ServerWorks |
9 | * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges | 9 | * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges |
10 | Datasheet: Not publicly available | 10 | Datasheet: Not publicly available |
11 | * AMD SB900 | 11 | * AMD Hudson-2 |
12 | Datasheet: Not publicly available | 12 | Datasheet: Not publicly available |
13 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge | 13 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge |
14 | Datasheet: Publicly available at the SMSC website http://www.smsc.com | 14 | Datasheet: Publicly available at the SMSC website http://www.smsc.com |
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt index ebc50f808ea4..9dbf4470c7e1 100644 --- a/Documentation/slow-work.txt +++ b/Documentation/slow-work.txt | |||
@@ -41,6 +41,13 @@ expand files, provided the time taken to do so isn't too long. | |||
41 | Operations of both types may sleep during execution, thus tying up the thread | 41 | Operations of both types may sleep during execution, thus tying up the thread |
42 | loaned to it. | 42 | loaned to it. |
43 | 43 | ||
44 | A further class of work item is available, based on the slow work item class: | ||
45 | |||
46 | (*) Delayed slow work items. | ||
47 | |||
48 | These are slow work items that have a timer to defer queueing of the item for | ||
49 | a while. | ||
50 | |||
44 | 51 | ||
45 | THREAD-TO-CLASS ALLOCATION | 52 | THREAD-TO-CLASS ALLOCATION |
46 | -------------------------- | 53 | -------------------------- |
@@ -64,9 +71,11 @@ USING SLOW WORK ITEMS | |||
64 | Firstly, a module or subsystem wanting to make use of slow work items must | 71 | Firstly, a module or subsystem wanting to make use of slow work items must |
65 | register its interest: | 72 | register its interest: |
66 | 73 | ||
67 | int ret = slow_work_register_user(); | 74 | int ret = slow_work_register_user(struct module *module); |
68 | 75 | ||
69 | This will return 0 if successful, or a -ve error upon failure. | 76 | This will return 0 if successful, or a -ve error upon failure. The module |
77 | pointer should be the module interested in using this facility (almost | ||
78 | certainly THIS_MODULE). | ||
70 | 79 | ||
71 | 80 | ||
72 | Slow work items may then be set up by: | 81 | Slow work items may then be set up by: |
@@ -93,6 +102,10 @@ Slow work items may then be set up by: | |||
93 | 102 | ||
94 | or: | 103 | or: |
95 | 104 | ||
105 | delayed_slow_work_init(&myitem, &myitem_ops); | ||
106 | |||
107 | or: | ||
108 | |||
96 | vslow_work_init(&myitem, &myitem_ops); | 109 | vslow_work_init(&myitem, &myitem_ops); |
97 | 110 | ||
98 | depending on its class. | 111 | depending on its class. |
@@ -102,15 +115,92 @@ A suitably set up work item can then be enqueued for processing: | |||
102 | int ret = slow_work_enqueue(&myitem); | 115 | int ret = slow_work_enqueue(&myitem); |
103 | 116 | ||
104 | This will return a -ve error if the thread pool is unable to gain a reference | 117 | This will return a -ve error if the thread pool is unable to gain a reference |
105 | on the item, 0 otherwise. | 118 | on the item, 0 otherwise, or (for delayed work): |
119 | |||
120 | int ret = delayed_slow_work_enqueue(&myitem, my_jiffy_delay); | ||
106 | 121 | ||
107 | 122 | ||
108 | The items are reference counted, so there ought to be no need for a flush | 123 | The items are reference counted, so there ought to be no need for a flush |
109 | operation. When all a module's slow work items have been processed, and the | 124 | operation. But as the reference counting is optional, means to cancel |
125 | existing work items are also included: | ||
126 | |||
127 | cancel_slow_work(&myitem); | ||
128 | cancel_delayed_slow_work(&myitem); | ||
129 | |||
130 | can be used to cancel pending work. The above cancel function waits for | ||
131 | existing work to have been executed (or prevent execution of them, depending | ||
132 | on timing). | ||
133 | |||
134 | |||
135 | When all a module's slow work items have been processed, and the | ||
110 | module has no further interest in the facility, it should unregister its | 136 | module has no further interest in the facility, it should unregister its |
111 | interest: | 137 | interest: |
112 | 138 | ||
113 | slow_work_unregister_user(); | 139 | slow_work_unregister_user(struct module *module); |
140 | |||
141 | The module pointer is used to wait for all outstanding work items for that | ||
142 | module before completing the unregistration. This prevents the put_ref() code | ||
143 | from being taken away before it completes. module should almost certainly be | ||
144 | THIS_MODULE. | ||
145 | |||
146 | |||
147 | ================ | ||
148 | HELPER FUNCTIONS | ||
149 | ================ | ||
150 | |||
151 | The slow-work facility provides a function by which it can be determined | ||
152 | whether or not an item is queued for later execution: | ||
153 | |||
154 | bool queued = slow_work_is_queued(struct slow_work *work); | ||
155 | |||
156 | If it returns false, then the item is not on the queue (it may be executing | ||
157 | with a requeue pending). This can be used to work out whether an item on which | ||
158 | another depends is on the queue, thus allowing a dependent item to be queued | ||
159 | after it. | ||
160 | |||
161 | If the above shows an item on which another depends not to be queued, then the | ||
162 | owner of the dependent item might need to wait. However, to avoid locking up | ||
163 | the threads unnecessarily be sleeping in them, it can make sense under some | ||
164 | circumstances to return the work item to the queue, thus deferring it until | ||
165 | some other items have had a chance to make use of the yielded thread. | ||
166 | |||
167 | To yield a thread and defer an item, the work function should simply enqueue | ||
168 | the work item again and return. However, this doesn't work if there's nothing | ||
169 | actually on the queue, as the thread just vacated will jump straight back into | ||
170 | the item's work function, thus busy waiting on a CPU. | ||
171 | |||
172 | Instead, the item should use the thread to wait for the dependency to go away, | ||
173 | but rather than using schedule() or schedule_timeout() to sleep, it should use | ||
174 | the following function: | ||
175 | |||
176 | bool requeue = slow_work_sleep_till_thread_needed( | ||
177 | struct slow_work *work, | ||
178 | signed long *_timeout); | ||
179 | |||
180 | This will add a second wait and then sleep, such that it will be woken up if | ||
181 | either something appears on the queue that could usefully make use of the | ||
182 | thread - and behind which this item can be queued, or if the event the caller | ||
183 | set up to wait for happens. True will be returned if something else appeared | ||
184 | on the queue and this work function should perhaps return, of false if | ||
185 | something else woke it up. The timeout is as for schedule_timeout(). | ||
186 | |||
187 | For example: | ||
188 | |||
189 | wq = bit_waitqueue(&my_flags, MY_BIT); | ||
190 | init_wait(&wait); | ||
191 | requeue = false; | ||
192 | do { | ||
193 | prepare_to_wait(wq, &wait, TASK_UNINTERRUPTIBLE); | ||
194 | if (!test_bit(MY_BIT, &my_flags)) | ||
195 | break; | ||
196 | requeue = slow_work_sleep_till_thread_needed(&my_work, | ||
197 | &timeout); | ||
198 | } while (timeout > 0 && !requeue); | ||
199 | finish_wait(wq, &wait); | ||
200 | if (!test_bit(MY_BIT, &my_flags) | ||
201 | goto do_my_thing; | ||
202 | if (requeue) | ||
203 | return; // to slow_work | ||
114 | 204 | ||
115 | 205 | ||
116 | =============== | 206 | =============== |
@@ -118,7 +208,8 @@ ITEM OPERATIONS | |||
118 | =============== | 208 | =============== |
119 | 209 | ||
120 | Each work item requires a table of operations of type struct slow_work_ops. | 210 | Each work item requires a table of operations of type struct slow_work_ops. |
121 | All members are required: | 211 | Only ->execute() is required; the getting and putting of a reference and the |
212 | describing of an item are all optional. | ||
122 | 213 | ||
123 | (*) Get a reference on an item: | 214 | (*) Get a reference on an item: |
124 | 215 | ||
@@ -148,6 +239,16 @@ All members are required: | |||
148 | This should perform the work required of the item. It may sleep, it may | 239 | This should perform the work required of the item. It may sleep, it may |
149 | perform disk I/O and it may wait for locks. | 240 | perform disk I/O and it may wait for locks. |
150 | 241 | ||
242 | (*) View an item through /proc: | ||
243 | |||
244 | void (*desc)(struct slow_work *work, struct seq_file *m); | ||
245 | |||
246 | If supplied, this should print to 'm' a small string describing the work | ||
247 | the item is to do. This should be no more than about 40 characters, and | ||
248 | shouldn't include a newline character. | ||
249 | |||
250 | See the 'Viewing executing and queued items' section below. | ||
251 | |||
151 | 252 | ||
152 | ================== | 253 | ================== |
153 | POOL CONFIGURATION | 254 | POOL CONFIGURATION |
@@ -172,3 +273,50 @@ The slow-work thread pool has a number of configurables: | |||
172 | is bounded to between 1 and one fewer than the number of active threads. | 273 | is bounded to between 1 and one fewer than the number of active threads. |
173 | This ensures there is always at least one thread that can process very | 274 | This ensures there is always at least one thread that can process very |
174 | slow work items, and always at least one thread that won't. | 275 | slow work items, and always at least one thread that won't. |
276 | |||
277 | |||
278 | ================================== | ||
279 | VIEWING EXECUTING AND QUEUED ITEMS | ||
280 | ================================== | ||
281 | |||
282 | If CONFIG_SLOW_WORK_DEBUG is enabled, a debugfs file is made available: | ||
283 | |||
284 | /sys/kernel/debug/slow_work/runqueue | ||
285 | |||
286 | through which the list of work items being executed and the queues of items to | ||
287 | be executed may be viewed. The owner of a work item is given the chance to | ||
288 | add some information of its own. | ||
289 | |||
290 | The contents look something like the following: | ||
291 | |||
292 | THR PID ITEM ADDR FL MARK DESC | ||
293 | === ===== ================ == ===== ========== | ||
294 | 0 3005 ffff880023f52348 a 952ms FSC: OBJ17d3: LOOK | ||
295 | 1 3006 ffff880024e33668 2 160ms FSC: OBJ17e5 OP60d3b: Write1/Store fl=2 | ||
296 | 2 3165 ffff8800296dd180 a 424ms FSC: OBJ17e4: LOOK | ||
297 | 3 4089 ffff8800262c8d78 a 212ms FSC: OBJ17ea: CRTN | ||
298 | 4 4090 ffff88002792bed8 2 388ms FSC: OBJ17e8 OP60d36: Write1/Store fl=2 | ||
299 | 5 4092 ffff88002a0ef308 2 388ms FSC: OBJ17e7 OP60d2e: Write1/Store fl=2 | ||
300 | 6 4094 ffff88002abaf4b8 2 132ms FSC: OBJ17e2 OP60d4e: Write1/Store fl=2 | ||
301 | 7 4095 ffff88002bb188e0 a 388ms FSC: OBJ17e9: CRTN | ||
302 | vsq - ffff880023d99668 1 308ms FSC: OBJ17e0 OP60f91: Write1/EnQ fl=2 | ||
303 | vsq - ffff8800295d1740 1 212ms FSC: OBJ16be OP4d4b6: Write1/EnQ fl=2 | ||
304 | vsq - ffff880025ba3308 1 160ms FSC: OBJ179a OP58dec: Write1/EnQ fl=2 | ||
305 | vsq - ffff880024ec83e0 1 160ms FSC: OBJ17ae OP599f2: Write1/EnQ fl=2 | ||
306 | vsq - ffff880026618e00 1 160ms FSC: OBJ17e6 OP60d33: Write1/EnQ fl=2 | ||
307 | vsq - ffff880025a2a4b8 1 132ms FSC: OBJ16a2 OP4d583: Write1/EnQ fl=2 | ||
308 | vsq - ffff880023cbe6d8 9 212ms FSC: OBJ17eb: LOOK | ||
309 | vsq - ffff880024d37590 9 212ms FSC: OBJ17ec: LOOK | ||
310 | vsq - ffff880027746cb0 9 212ms FSC: OBJ17ed: LOOK | ||
311 | vsq - ffff880024d37ae8 9 212ms FSC: OBJ17ee: LOOK | ||
312 | vsq - ffff880024d37cb0 9 212ms FSC: OBJ17ef: LOOK | ||
313 | vsq - ffff880025036550 9 212ms FSC: OBJ17f0: LOOK | ||
314 | vsq - ffff8800250368e0 9 212ms FSC: OBJ17f1: LOOK | ||
315 | vsq - ffff880025036aa8 9 212ms FSC: OBJ17f2: LOOK | ||
316 | |||
317 | In the 'THR' column, executing items show the thread they're occupying and | ||
318 | queued threads indicate which queue they're on. 'PID' shows the process ID of | ||
319 | a slow-work thread that's executing something. 'FL' shows the work item flags. | ||
320 | 'MARK' indicates how long since an item was queued or began executing. Lastly, | ||
321 | the 'DESC' column permits the owner of an item to give some information. | ||
322 | |||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 1c8eb4518ce0..fd9a2f67edf2 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -522,7 +522,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
522 | pcm_devs - Number of PCM devices assigned to each card | 522 | pcm_devs - Number of PCM devices assigned to each card |
523 | (default = 1, up to 4) | 523 | (default = 1, up to 4) |
524 | pcm_substreams - Number of PCM substreams assigned to each PCM | 524 | pcm_substreams - Number of PCM substreams assigned to each PCM |
525 | (default = 8, up to 16) | 525 | (default = 8, up to 128) |
526 | hrtimer - Use hrtimer (=1, default) or system timer (=0) | 526 | hrtimer - Use hrtimer (=1, default) or system timer (=0) |
527 | fake_buffer - Fake buffer allocations (default = 1) | 527 | fake_buffer - Fake buffer allocations (default = 1) |
528 | 528 | ||
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index 70d68ce8640a..a87dc277a5ca 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | Generic Thermal Sysfs driver How To | 1 | Generic Thermal Sysfs driver How To |
2 | ========================= | 2 | =================================== |
3 | 3 | ||
4 | Written by Sujith Thomas <sujith.thomas@intel.com>, Zhang Rui <rui.zhang@intel.com> | 4 | Written by Sujith Thomas <sujith.thomas@intel.com>, Zhang Rui <rui.zhang@intel.com> |
5 | 5 | ||
@@ -10,20 +10,20 @@ Copyright (c) 2008 Intel Corporation | |||
10 | 10 | ||
11 | 0. Introduction | 11 | 0. Introduction |
12 | 12 | ||
13 | The generic thermal sysfs provides a set of interfaces for thermal zone devices (sensors) | 13 | The generic thermal sysfs provides a set of interfaces for thermal zone |
14 | and thermal cooling devices (fan, processor...) to register with the thermal management | 14 | devices (sensors) and thermal cooling devices (fan, processor...) to register |
15 | solution and to be a part of it. | 15 | with the thermal management solution and to be a part of it. |
16 | 16 | ||
17 | This how-to focuses on enabling new thermal zone and cooling devices to participate | 17 | This how-to focuses on enabling new thermal zone and cooling devices to |
18 | in thermal management. | 18 | participate in thermal management. |
19 | This solution is platform independent and any type of thermal zone devices and | 19 | This solution is platform independent and any type of thermal zone devices |
20 | cooling devices should be able to make use of the infrastructure. | 20 | and cooling devices should be able to make use of the infrastructure. |
21 | 21 | ||
22 | The main task of the thermal sysfs driver is to expose thermal zone attributes as well | 22 | The main task of the thermal sysfs driver is to expose thermal zone attributes |
23 | as cooling device attributes to the user space. | 23 | as well as cooling device attributes to the user space. |
24 | An intelligent thermal management application can make decisions based on inputs | 24 | An intelligent thermal management application can make decisions based on |
25 | from thermal zone attributes (the current temperature and trip point temperature) | 25 | inputs from thermal zone attributes (the current temperature and trip point |
26 | and throttle appropriate devices. | 26 | temperature) and throttle appropriate devices. |
27 | 27 | ||
28 | [0-*] denotes any positive number starting from 0 | 28 | [0-*] denotes any positive number starting from 0 |
29 | [1-*] denotes any positive number starting from 1 | 29 | [1-*] denotes any positive number starting from 1 |
@@ -31,77 +31,77 @@ and throttle appropriate devices. | |||
31 | 1. thermal sysfs driver interface functions | 31 | 1. thermal sysfs driver interface functions |
32 | 32 | ||
33 | 1.1 thermal zone device interface | 33 | 1.1 thermal zone device interface |
34 | 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, int trips, | 34 | 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, |
35 | void *devdata, struct thermal_zone_device_ops *ops) | 35 | int trips, void *devdata, struct thermal_zone_device_ops *ops) |
36 | 36 | ||
37 | This interface function adds a new thermal zone device (sensor) to | 37 | This interface function adds a new thermal zone device (sensor) to |
38 | /sys/class/thermal folder as thermal_zone[0-*]. | 38 | /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the |
39 | It tries to bind all the thermal cooling devices registered at the same time. | 39 | thermal cooling devices registered at the same time. |
40 | 40 | ||
41 | name: the thermal zone name. | 41 | name: the thermal zone name. |
42 | trips: the total number of trip points this thermal zone supports. | 42 | trips: the total number of trip points this thermal zone supports. |
43 | devdata: device private data | 43 | devdata: device private data |
44 | ops: thermal zone device call-backs. | 44 | ops: thermal zone device call-backs. |
45 | .bind: bind the thermal zone device with a thermal cooling device. | 45 | .bind: bind the thermal zone device with a thermal cooling device. |
46 | .unbind: unbind the thermal zone device with a thermal cooling device. | 46 | .unbind: unbind the thermal zone device with a thermal cooling device. |
47 | .get_temp: get the current temperature of the thermal zone. | 47 | .get_temp: get the current temperature of the thermal zone. |
48 | .get_mode: get the current mode (user/kernel) of the thermal zone. | 48 | .get_mode: get the current mode (user/kernel) of the thermal zone. |
49 | "kernel" means thermal management is done in kernel. | 49 | - "kernel" means thermal management is done in kernel. |
50 | "user" will prevent kernel thermal driver actions upon trip points | 50 | - "user" will prevent kernel thermal driver actions upon trip points |
51 | so that user applications can take charge of thermal management. | 51 | so that user applications can take charge of thermal management. |
52 | .set_mode: set the mode (user/kernel) of the thermal zone. | 52 | .set_mode: set the mode (user/kernel) of the thermal zone. |
53 | .get_trip_type: get the type of certain trip point. | 53 | .get_trip_type: get the type of certain trip point. |
54 | .get_trip_temp: get the temperature above which the certain trip point | 54 | .get_trip_temp: get the temperature above which the certain trip point |
55 | will be fired. | 55 | will be fired. |
56 | 56 | ||
57 | 1.1.2 void thermal_zone_device_unregister(struct thermal_zone_device *tz) | 57 | 1.1.2 void thermal_zone_device_unregister(struct thermal_zone_device *tz) |
58 | 58 | ||
59 | This interface function removes the thermal zone device. | 59 | This interface function removes the thermal zone device. |
60 | It deletes the corresponding entry form /sys/class/thermal folder and unbind all | 60 | It deletes the corresponding entry form /sys/class/thermal folder and |
61 | the thermal cooling devices it uses. | 61 | unbind all the thermal cooling devices it uses. |
62 | 62 | ||
63 | 1.2 thermal cooling device interface | 63 | 1.2 thermal cooling device interface |
64 | 1.2.1 struct thermal_cooling_device *thermal_cooling_device_register(char *name, | 64 | 1.2.1 struct thermal_cooling_device *thermal_cooling_device_register(char *name, |
65 | void *devdata, struct thermal_cooling_device_ops *) | 65 | void *devdata, struct thermal_cooling_device_ops *) |
66 | 66 | ||
67 | This interface function adds a new thermal cooling device (fan/processor/...) to | 67 | This interface function adds a new thermal cooling device (fan/processor/...) |
68 | /sys/class/thermal/ folder as cooling_device[0-*]. | 68 | to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself |
69 | It tries to bind itself to all the thermal zone devices register at the same time. | 69 | to all the thermal zone devices register at the same time. |
70 | name: the cooling device name. | 70 | name: the cooling device name. |
71 | devdata: device private data. | 71 | devdata: device private data. |
72 | ops: thermal cooling devices call-backs. | 72 | ops: thermal cooling devices call-backs. |
73 | .get_max_state: get the Maximum throttle state of the cooling device. | 73 | .get_max_state: get the Maximum throttle state of the cooling device. |
74 | .get_cur_state: get the Current throttle state of the cooling device. | 74 | .get_cur_state: get the Current throttle state of the cooling device. |
75 | .set_cur_state: set the Current throttle state of the cooling device. | 75 | .set_cur_state: set the Current throttle state of the cooling device. |
76 | 76 | ||
77 | 1.2.2 void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) | 77 | 1.2.2 void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) |
78 | 78 | ||
79 | This interface function remove the thermal cooling device. | 79 | This interface function remove the thermal cooling device. |
80 | It deletes the corresponding entry form /sys/class/thermal folder and unbind | 80 | It deletes the corresponding entry form /sys/class/thermal folder and |
81 | itself from all the thermal zone devices using it. | 81 | unbind itself from all the thermal zone devices using it. |
82 | 82 | ||
83 | 1.3 interface for binding a thermal zone device with a thermal cooling device | 83 | 1.3 interface for binding a thermal zone device with a thermal cooling device |
84 | 1.3.1 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, | 84 | 1.3.1 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, |
85 | int trip, struct thermal_cooling_device *cdev); | 85 | int trip, struct thermal_cooling_device *cdev); |
86 | 86 | ||
87 | This interface function bind a thermal cooling device to the certain trip point | 87 | This interface function bind a thermal cooling device to the certain trip |
88 | of a thermal zone device. | 88 | point of a thermal zone device. |
89 | This function is usually called in the thermal zone device .bind callback. | 89 | This function is usually called in the thermal zone device .bind callback. |
90 | tz: the thermal zone device | 90 | tz: the thermal zone device |
91 | cdev: thermal cooling device | 91 | cdev: thermal cooling device |
92 | trip: indicates which trip point the cooling devices is associated with | 92 | trip: indicates which trip point the cooling devices is associated with |
93 | in this thermal zone. | 93 | in this thermal zone. |
94 | 94 | ||
95 | 1.3.2 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, | 95 | 1.3.2 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, |
96 | int trip, struct thermal_cooling_device *cdev); | 96 | int trip, struct thermal_cooling_device *cdev); |
97 | 97 | ||
98 | This interface function unbind a thermal cooling device from the certain trip point | 98 | This interface function unbind a thermal cooling device from the certain |
99 | of a thermal zone device. | 99 | trip point of a thermal zone device. This function is usually called in |
100 | This function is usually called in the thermal zone device .unbind callback. | 100 | the thermal zone device .unbind callback. |
101 | tz: the thermal zone device | 101 | tz: the thermal zone device |
102 | cdev: thermal cooling device | 102 | cdev: thermal cooling device |
103 | trip: indicates which trip point the cooling devices is associated with | 103 | trip: indicates which trip point the cooling devices is associated with |
104 | in this thermal zone. | 104 | in this thermal zone. |
105 | 105 | ||
106 | 2. sysfs attributes structure | 106 | 2. sysfs attributes structure |
107 | 107 | ||
@@ -114,153 +114,166 @@ if hwmon is compiled in or built as a module. | |||
114 | 114 | ||
115 | Thermal zone device sys I/F, created once it's registered: | 115 | Thermal zone device sys I/F, created once it's registered: |
116 | /sys/class/thermal/thermal_zone[0-*]: | 116 | /sys/class/thermal/thermal_zone[0-*]: |
117 | |-----type: Type of the thermal zone | 117 | |---type: Type of the thermal zone |
118 | |-----temp: Current temperature | 118 | |---temp: Current temperature |
119 | |-----mode: Working mode of the thermal zone | 119 | |---mode: Working mode of the thermal zone |
120 | |-----trip_point_[0-*]_temp: Trip point temperature | 120 | |---trip_point_[0-*]_temp: Trip point temperature |
121 | |-----trip_point_[0-*]_type: Trip point type | 121 | |---trip_point_[0-*]_type: Trip point type |
122 | 122 | ||
123 | Thermal cooling device sys I/F, created once it's registered: | 123 | Thermal cooling device sys I/F, created once it's registered: |
124 | /sys/class/thermal/cooling_device[0-*]: | 124 | /sys/class/thermal/cooling_device[0-*]: |
125 | |-----type : Type of the cooling device(processor/fan/...) | 125 | |---type: Type of the cooling device(processor/fan/...) |
126 | |-----max_state: Maximum cooling state of the cooling device | 126 | |---max_state: Maximum cooling state of the cooling device |
127 | |-----cur_state: Current cooling state of the cooling device | 127 | |---cur_state: Current cooling state of the cooling device |
128 | 128 | ||
129 | 129 | ||
130 | These two dynamic attributes are created/removed in pairs. | 130 | Then next two dynamic attributes are created/removed in pairs. They represent |
131 | They represent the relationship between a thermal zone and its associated cooling device. | 131 | the relationship between a thermal zone and its associated cooling device. |
132 | They are created/removed for each | 132 | They are created/removed for each successful execution of |
133 | thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful execution. | 133 | thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device. |
134 | 134 | ||
135 | /sys/class/thermal/thermal_zone[0-*] | 135 | /sys/class/thermal/thermal_zone[0-*]: |
136 | |-----cdev[0-*]: The [0-*]th cooling device in the current thermal zone | 136 | |---cdev[0-*]: [0-*]th cooling device in current thermal zone |
137 | |-----cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with | 137 | |---cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with |
138 | 138 | ||
139 | Besides the thermal zone device sysfs I/F and cooling device sysfs I/F, | 139 | Besides the thermal zone device sysfs I/F and cooling device sysfs I/F, |
140 | the generic thermal driver also creates a hwmon sysfs I/F for each _type_ of | 140 | the generic thermal driver also creates a hwmon sysfs I/F for each _type_ |
141 | thermal zone device. E.g. the generic thermal driver registers one hwmon class device | 141 | of thermal zone device. E.g. the generic thermal driver registers one hwmon |
142 | and build the associated hwmon sysfs I/F for all the registered ACPI thermal zones. | 142 | class device and build the associated hwmon sysfs I/F for all the registered |
143 | ACPI thermal zones. | ||
144 | |||
143 | /sys/class/hwmon/hwmon[0-*]: | 145 | /sys/class/hwmon/hwmon[0-*]: |
144 | |-----name: The type of the thermal zone devices. | 146 | |---name: The type of the thermal zone devices |
145 | |-----temp[1-*]_input: The current temperature of thermal zone [1-*]. | 147 | |---temp[1-*]_input: The current temperature of thermal zone [1-*] |
146 | |-----temp[1-*]_critical: The critical trip point of thermal zone [1-*]. | 148 | |---temp[1-*]_critical: The critical trip point of thermal zone [1-*] |
149 | |||
147 | Please read Documentation/hwmon/sysfs-interface for additional information. | 150 | Please read Documentation/hwmon/sysfs-interface for additional information. |
148 | 151 | ||
149 | *************************** | 152 | *************************** |
150 | * Thermal zone attributes * | 153 | * Thermal zone attributes * |
151 | *************************** | 154 | *************************** |
152 | 155 | ||
153 | type Strings which represent the thermal zone type. | 156 | type |
154 | This is given by thermal zone driver as part of registration. | 157 | Strings which represent the thermal zone type. |
155 | Eg: "acpitz" indicates it's an ACPI thermal device. | 158 | This is given by thermal zone driver as part of registration. |
156 | In order to keep it consistent with hwmon sys attribute, | 159 | E.g: "acpitz" indicates it's an ACPI thermal device. |
157 | this should be a short, lowercase string, | 160 | In order to keep it consistent with hwmon sys attribute; this should |
158 | not containing spaces nor dashes. | 161 | be a short, lowercase string, not containing spaces nor dashes. |
159 | RO | 162 | RO, Required |
160 | Required | 163 | |
161 | 164 | temp | |
162 | temp Current temperature as reported by thermal zone (sensor) | 165 | Current temperature as reported by thermal zone (sensor). |
163 | Unit: millidegree Celsius | 166 | Unit: millidegree Celsius |
164 | RO | 167 | RO, Required |
165 | Required | 168 | |
166 | 169 | mode | |
167 | mode One of the predefined values in [kernel, user] | 170 | One of the predefined values in [kernel, user]. |
168 | This file gives information about the algorithm | 171 | This file gives information about the algorithm that is currently |
169 | that is currently managing the thermal zone. | 172 | managing the thermal zone. It can be either default kernel based |
170 | It can be either default kernel based algorithm | 173 | algorithm or user space application. |
171 | or user space application. | 174 | kernel = Thermal management in kernel thermal zone driver. |
172 | RW | 175 | user = Preventing kernel thermal zone driver actions upon |
173 | Optional | 176 | trip points so that user application can take full |
174 | kernel = Thermal management in kernel thermal zone driver. | 177 | charge of the thermal management. |
175 | user = Preventing kernel thermal zone driver actions upon | 178 | RW, Optional |
176 | trip points so that user application can take full | 179 | |
177 | charge of the thermal management. | 180 | trip_point_[0-*]_temp |
178 | 181 | The temperature above which trip point will be fired. | |
179 | trip_point_[0-*]_temp The temperature above which trip point will be fired | 182 | Unit: millidegree Celsius |
180 | Unit: millidegree Celsius | 183 | RO, Optional |
181 | RO | 184 | |
182 | Optional | 185 | trip_point_[0-*]_type |
183 | 186 | Strings which indicate the type of the trip point. | |
184 | trip_point_[0-*]_type Strings which indicate the type of the trip point | 187 | E.g. it can be one of critical, hot, passive, active[0-*] for ACPI |
185 | E.g. it can be one of critical, hot, passive, | 188 | thermal zone. |
186 | active[0-*] for ACPI thermal zone. | 189 | RO, Optional |
187 | RO | 190 | |
188 | Optional | 191 | cdev[0-*] |
189 | 192 | Sysfs link to the thermal cooling device node where the sys I/F | |
190 | cdev[0-*] Sysfs link to the thermal cooling device node where the sys I/F | 193 | for cooling device throttling control represents. |
191 | for cooling device throttling control represents. | 194 | RO, Optional |
192 | RO | 195 | |
193 | Optional | 196 | cdev[0-*]_trip_point |
194 | 197 | The trip point with which cdev[0-*] is associated in this thermal | |
195 | cdev[0-*]_trip_point The trip point with which cdev[0-*] is associated in this thermal zone | 198 | zone; -1 means the cooling device is not associated with any trip |
196 | -1 means the cooling device is not associated with any trip point. | 199 | point. |
197 | RO | 200 | RO, Optional |
198 | Optional | 201 | |
199 | 202 | passive | |
200 | ****************************** | 203 | Attribute is only present for zones in which the passive cooling |
201 | * Cooling device attributes * | 204 | policy is not supported by native thermal driver. Default is zero |
202 | ****************************** | 205 | and can be set to a temperature (in millidegrees) to enable a |
203 | 206 | passive trip point for the zone. Activation is done by polling with | |
204 | type String which represents the type of device | 207 | an interval of 1 second. |
205 | eg: For generic ACPI: this should be "Fan", | 208 | Unit: millidegrees Celsius |
206 | "Processor" or "LCD" | 209 | RW, Optional |
207 | eg. For memory controller device on intel_menlow platform: | 210 | |
208 | this should be "Memory controller" | 211 | ***************************** |
209 | RO | 212 | * Cooling device attributes * |
210 | Required | 213 | ***************************** |
211 | 214 | ||
212 | max_state The maximum permissible cooling state of this cooling device. | 215 | type |
213 | RO | 216 | String which represents the type of device, e.g: |
214 | Required | 217 | - for generic ACPI: should be "Fan", "Processor" or "LCD" |
215 | 218 | - for memory controller device on intel_menlow platform: | |
216 | cur_state The current cooling state of this cooling device. | 219 | should be "Memory controller". |
217 | the value can any integer numbers between 0 and max_state, | 220 | RO, Required |
218 | cur_state == 0 means no cooling | 221 | |
219 | cur_state == max_state means the maximum cooling. | 222 | max_state |
220 | RW | 223 | The maximum permissible cooling state of this cooling device. |
221 | Required | 224 | RO, Required |
225 | |||
226 | cur_state | ||
227 | The current cooling state of this cooling device. | ||
228 | The value can any integer numbers between 0 and max_state: | ||
229 | - cur_state == 0 means no cooling | ||
230 | - cur_state == max_state means the maximum cooling. | ||
231 | RW, Required | ||
222 | 232 | ||
223 | 3. A simple implementation | 233 | 3. A simple implementation |
224 | 234 | ||
225 | ACPI thermal zone may support multiple trip points like critical/hot/passive/active. | 235 | ACPI thermal zone may support multiple trip points like critical, hot, |
226 | If an ACPI thermal zone supports critical, passive, active[0] and active[1] at the same time, | 236 | passive, active. If an ACPI thermal zone supports critical, passive, |
227 | it may register itself as a thermal_zone_device (thermal_zone1) with 4 trip points in all. | 237 | active[0] and active[1] at the same time, it may register itself as a |
228 | It has one processor and one fan, which are both registered as thermal_cooling_device. | 238 | thermal_zone_device (thermal_zone1) with 4 trip points in all. |
229 | If the processor is listed in _PSL method, and the fan is listed in _AL0 method, | 239 | It has one processor and one fan, which are both registered as |
230 | the sys I/F structure will be built like this: | 240 | thermal_cooling_device. |
241 | |||
242 | If the processor is listed in _PSL method, and the fan is listed in _AL0 | ||
243 | method, the sys I/F structure will be built like this: | ||
231 | 244 | ||
232 | /sys/class/thermal: | 245 | /sys/class/thermal: |
233 | 246 | ||
234 | |thermal_zone1: | 247 | |thermal_zone1: |
235 | |-----type: acpitz | 248 | |---type: acpitz |
236 | |-----temp: 37000 | 249 | |---temp: 37000 |
237 | |-----mode: kernel | 250 | |---mode: kernel |
238 | |-----trip_point_0_temp: 100000 | 251 | |---trip_point_0_temp: 100000 |
239 | |-----trip_point_0_type: critical | 252 | |---trip_point_0_type: critical |
240 | |-----trip_point_1_temp: 80000 | 253 | |---trip_point_1_temp: 80000 |
241 | |-----trip_point_1_type: passive | 254 | |---trip_point_1_type: passive |
242 | |-----trip_point_2_temp: 70000 | 255 | |---trip_point_2_temp: 70000 |
243 | |-----trip_point_2_type: active0 | 256 | |---trip_point_2_type: active0 |
244 | |-----trip_point_3_temp: 60000 | 257 | |---trip_point_3_temp: 60000 |
245 | |-----trip_point_3_type: active1 | 258 | |---trip_point_3_type: active1 |
246 | |-----cdev0: --->/sys/class/thermal/cooling_device0 | 259 | |---cdev0: --->/sys/class/thermal/cooling_device0 |
247 | |-----cdev0_trip_point: 1 /* cdev0 can be used for passive */ | 260 | |---cdev0_trip_point: 1 /* cdev0 can be used for passive */ |
248 | |-----cdev1: --->/sys/class/thermal/cooling_device3 | 261 | |---cdev1: --->/sys/class/thermal/cooling_device3 |
249 | |-----cdev1_trip_point: 2 /* cdev1 can be used for active[0]*/ | 262 | |---cdev1_trip_point: 2 /* cdev1 can be used for active[0]*/ |
250 | 263 | ||
251 | |cooling_device0: | 264 | |cooling_device0: |
252 | |-----type: Processor | 265 | |---type: Processor |
253 | |-----max_state: 8 | 266 | |---max_state: 8 |
254 | |-----cur_state: 0 | 267 | |---cur_state: 0 |
255 | 268 | ||
256 | |cooling_device3: | 269 | |cooling_device3: |
257 | |-----type: Fan | 270 | |---type: Fan |
258 | |-----max_state: 2 | 271 | |---max_state: 2 |
259 | |-----cur_state: 0 | 272 | |---cur_state: 0 |
260 | 273 | ||
261 | /sys/class/hwmon: | 274 | /sys/class/hwmon: |
262 | 275 | ||
263 | |hwmon0: | 276 | |hwmon0: |
264 | |-----name: acpitz | 277 | |---name: acpitz |
265 | |-----temp1_input: 37000 | 278 | |---temp1_input: 37000 |
266 | |-----temp1_crit: 100000 | 279 | |---temp1_crit: 100000 |
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index 957b22fde2df..8179692fbb90 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
@@ -1231,6 +1231,7 @@ something like this simple program: | |||
1231 | #include <sys/stat.h> | 1231 | #include <sys/stat.h> |
1232 | #include <fcntl.h> | 1232 | #include <fcntl.h> |
1233 | #include <unistd.h> | 1233 | #include <unistd.h> |
1234 | #include <string.h> | ||
1234 | 1235 | ||
1235 | #define _STR(x) #x | 1236 | #define _STR(x) #x |
1236 | #define STR(x) _STR(x) | 1237 | #define STR(x) _STR(x) |
@@ -1265,6 +1266,7 @@ const char *find_debugfs(void) | |||
1265 | return NULL; | 1266 | return NULL; |
1266 | } | 1267 | } |
1267 | 1268 | ||
1269 | strcat(debugfs, "/tracing/"); | ||
1268 | debugfs_found = 1; | 1270 | debugfs_found = 1; |
1269 | 1271 | ||
1270 | return debugfs; | 1272 | return debugfs; |
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c index 3ec4f2a22585..4793c6aac733 100644 --- a/Documentation/vm/page-types.c +++ b/Documentation/vm/page-types.c | |||
@@ -218,7 +218,7 @@ static void fatal(const char *x, ...) | |||
218 | exit(EXIT_FAILURE); | 218 | exit(EXIT_FAILURE); |
219 | } | 219 | } |
220 | 220 | ||
221 | int checked_open(const char *pathname, int flags) | 221 | static int checked_open(const char *pathname, int flags) |
222 | { | 222 | { |
223 | int fd = open(pathname, flags); | 223 | int fd = open(pathname, flags); |
224 | 224 | ||