diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/SubmittingPatches | 46 | ||||
-rw-r--r-- | Documentation/cpusets.txt | 9 | ||||
-rw-r--r-- | Documentation/kernel-doc-nano-HOWTO.txt | 99 | ||||
-rw-r--r-- | Documentation/kernel-docs.txt | 8 | ||||
-rw-r--r-- | Documentation/networking/arcnet.txt | 2 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.cx88 | 2 | ||||
-rw-r--r-- | Documentation/video4linux/cx18.txt | 4 | ||||
-rw-r--r-- | Documentation/vm/pagemap.txt | 77 |
8 files changed, 237 insertions, 10 deletions
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 9c93a03ea33b..118ca6e9404f 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -327,6 +327,52 @@ Some people also put extra tags at the end. They'll just be ignored for | |||
327 | now, but you can do this to mark internal company procedures or just | 327 | now, but you can do this to mark internal company procedures or just |
328 | point out some special detail about the sign-off. | 328 | point out some special detail about the sign-off. |
329 | 329 | ||
330 | If you are a subsystem or branch maintainer, sometimes you need to slightly | ||
331 | modify patches you receive in order to merge them, because the code is not | ||
332 | exactly the same in your tree and the submitters'. If you stick strictly to | ||
333 | rule (c), you should ask the submitter to rediff, but this is a totally | ||
334 | counter-productive waste of time and energy. Rule (b) allows you to adjust | ||
335 | the code, but then it is very impolite to change one submitter's code and | ||
336 | make him endorse your bugs. To solve this problem, it is recommended that | ||
337 | you add a line between the last Signed-off-by header and yours, indicating | ||
338 | the nature of your changes. While there is nothing mandatory about this, it | ||
339 | seems like prepending the description with your mail and/or name, all | ||
340 | enclosed in square brackets, is noticeable enough to make it obvious that | ||
341 | you are responsible for last-minute changes. Example : | ||
342 | |||
343 | Signed-off-by: Random J Developer <random@developer.example.org> | ||
344 | [lucky@maintainer.example.org: struct foo moved from foo.c to foo.h] | ||
345 | Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org> | ||
346 | |||
347 | This practise is particularly helpful if you maintain a stable branch and | ||
348 | want at the same time to credit the author, track changes, merge the fix, | ||
349 | and protect the submitter from complaints. Note that under no circumstances | ||
350 | can you change the author's identity (the From header), as it is the one | ||
351 | which appears in the changelog. | ||
352 | |||
353 | Special note to back-porters: It seems to be a common and useful practise | ||
354 | to insert an indication of the origin of a patch at the top of the commit | ||
355 | message (just after the subject line) to facilitate tracking. For instance, | ||
356 | here's what we see in 2.6-stable : | ||
357 | |||
358 | Date: Tue May 13 19:10:30 2008 +0000 | ||
359 | |||
360 | SCSI: libiscsi regression in 2.6.25: fix nop timer handling | ||
361 | |||
362 | commit 4cf1043593db6a337f10e006c23c69e5fc93e722 upstream | ||
363 | |||
364 | And here's what appears in 2.4 : | ||
365 | |||
366 | Date: Tue May 13 22:12:27 2008 +0200 | ||
367 | |||
368 | wireless, airo: waitbusy() won't delay | ||
369 | |||
370 | [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a] | ||
371 | |||
372 | Whatever the format, this information provides a valuable help to people | ||
373 | tracking your trees, and to people trying to trouble-shoot bugs in your | ||
374 | tree. | ||
375 | |||
330 | 376 | ||
331 | 13) When to use Acked-by: and Cc: | 377 | 13) When to use Acked-by: and Cc: |
332 | 378 | ||
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index fb7b361e6eea..d803c5c68ab5 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -199,7 +199,7 @@ using the sched_setaffinity, mbind and set_mempolicy system calls. | |||
199 | The following rules apply to each cpuset: | 199 | The following rules apply to each cpuset: |
200 | 200 | ||
201 | - Its CPUs and Memory Nodes must be a subset of its parents. | 201 | - Its CPUs and Memory Nodes must be a subset of its parents. |
202 | - It can only be marked exclusive if its parent is. | 202 | - It can't be marked exclusive unless its parent is. |
203 | - If its cpu or memory is exclusive, they may not overlap any sibling. | 203 | - If its cpu or memory is exclusive, they may not overlap any sibling. |
204 | 204 | ||
205 | These rules, and the natural hierarchy of cpusets, enable efficient | 205 | These rules, and the natural hierarchy of cpusets, enable efficient |
@@ -345,7 +345,7 @@ is modified to perform an inline check for this PF_SPREAD_PAGE task | |||
345 | flag, and if set, a call to a new routine cpuset_mem_spread_node() | 345 | flag, and if set, a call to a new routine cpuset_mem_spread_node() |
346 | returns the node to prefer for the allocation. | 346 | returns the node to prefer for the allocation. |
347 | 347 | ||
348 | Similarly, setting 'memory_spread_cache' turns on the flag | 348 | Similarly, setting 'memory_spread_slab' turns on the flag |
349 | PF_SPREAD_SLAB, and appropriately marked slab caches will allocate | 349 | PF_SPREAD_SLAB, and appropriately marked slab caches will allocate |
350 | pages from the node returned by cpuset_mem_spread_node(). | 350 | pages from the node returned by cpuset_mem_spread_node(). |
351 | 351 | ||
@@ -709,7 +709,10 @@ Now you want to do something with this cpuset. | |||
709 | 709 | ||
710 | In this directory you can find several files: | 710 | In this directory you can find several files: |
711 | # ls | 711 | # ls |
712 | cpus cpu_exclusive mems mem_exclusive mem_hardwall tasks | 712 | cpu_exclusive memory_migrate mems tasks |
713 | cpus memory_pressure notify_on_release | ||
714 | mem_exclusive memory_spread_page sched_load_balance | ||
715 | mem_hardwall memory_spread_slab sched_relax_domain_level | ||
713 | 716 | ||
714 | Reading them will give you information about the state of this cpuset: | 717 | Reading them will give you information about the state of this cpuset: |
715 | the CPUs and Memory Nodes it can use, the processes that are using | 718 | the CPUs and Memory Nodes it can use, the processes that are using |
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt index 2075c0658bf5..0bd32748a467 100644 --- a/Documentation/kernel-doc-nano-HOWTO.txt +++ b/Documentation/kernel-doc-nano-HOWTO.txt | |||
@@ -1,6 +1,105 @@ | |||
1 | kernel-doc nano-HOWTO | 1 | kernel-doc nano-HOWTO |
2 | ===================== | 2 | ===================== |
3 | 3 | ||
4 | How to format kernel-doc comments | ||
5 | --------------------------------- | ||
6 | |||
7 | In order to provide embedded, 'C' friendly, easy to maintain, | ||
8 | but consistent and extractable documentation of the functions and | ||
9 | data structures in the Linux kernel, the Linux kernel has adopted | ||
10 | a consistent style for documenting functions and their parameters, | ||
11 | and structures and their members. | ||
12 | |||
13 | The format for this documentation is called the kernel-doc format. | ||
14 | It is documented in this Documentation/kernel-doc-nano-HOWTO.txt file. | ||
15 | |||
16 | This style embeds the documentation within the source files, using | ||
17 | a few simple conventions. The scripts/kernel-doc perl script, some | ||
18 | SGML templates in Documentation/DocBook, and other tools understand | ||
19 | these conventions, and are used to extract this embedded documentation | ||
20 | into various documents. | ||
21 | |||
22 | In order to provide good documentation of kernel functions and data | ||
23 | structures, please use the following conventions to format your | ||
24 | kernel-doc comments in Linux kernel source. | ||
25 | |||
26 | We definitely need kernel-doc formatted documentation for functions | ||
27 | that are exported to loadable modules using EXPORT_SYMBOL. | ||
28 | |||
29 | We also look to provide kernel-doc formatted documentation for | ||
30 | functions externally visible to other kernel files (not marked | ||
31 | "static"). | ||
32 | |||
33 | We also recommend providing kernel-doc formatted documentation | ||
34 | for private (file "static") routines, for consistency of kernel | ||
35 | source code layout. But this is lower priority and at the | ||
36 | discretion of the MAINTAINER of that kernel source file. | ||
37 | |||
38 | Data structures visible in kernel include files should also be | ||
39 | documented using kernel-doc formatted comments. | ||
40 | |||
41 | The opening comment mark "/**" is reserved for kernel-doc comments. | ||
42 | Only comments so marked will be considered by the kernel-doc scripts, | ||
43 | and any comment so marked must be in kernel-doc format. Do not use | ||
44 | "/**" to be begin a comment block unless the comment block contains | ||
45 | kernel-doc formatted comments. The closing comment marker for | ||
46 | kernel-doc comments can be either "*/" or "**/". | ||
47 | |||
48 | Kernel-doc comments should be placed just before the function | ||
49 | or data structure being described. | ||
50 | |||
51 | Example kernel-doc function comment: | ||
52 | |||
53 | /** | ||
54 | * foobar() - short function description of foobar | ||
55 | * @arg1: Describe the first argument to foobar. | ||
56 | * @arg2: Describe the second argument to foobar. | ||
57 | * One can provide multiple line descriptions | ||
58 | * for arguments. | ||
59 | * | ||
60 | * A longer description, with more discussion of the function foobar() | ||
61 | * that might be useful to those using or modifying it. Begins with | ||
62 | * empty comment line, and may include additional embedded empty | ||
63 | * comment lines. | ||
64 | * | ||
65 | * The longer description can have multiple paragraphs. | ||
66 | **/ | ||
67 | |||
68 | The first line, with the short description, must be on a single line. | ||
69 | |||
70 | The @argument descriptions must begin on the very next line following | ||
71 | this opening short function description line, with no intervening | ||
72 | empty comment lines. | ||
73 | |||
74 | Example kernel-doc data structure comment. | ||
75 | |||
76 | /** | ||
77 | * struct blah - the basic blah structure | ||
78 | * @mem1: describe the first member of struct blah | ||
79 | * @mem2: describe the second member of struct blah, | ||
80 | * perhaps with more lines and words. | ||
81 | * | ||
82 | * Longer description of this structure. | ||
83 | **/ | ||
84 | |||
85 | The kernel-doc function comments describe each parameter to the | ||
86 | function, in order, with the @name lines. | ||
87 | |||
88 | The kernel-doc data structure comments describe each structure member | ||
89 | in the data structure, with the @name lines. | ||
90 | |||
91 | The longer description formatting is "reflowed", losing your line | ||
92 | breaks. So presenting carefully formatted lists within these | ||
93 | descriptions won't work so well; derived documentation will lose | ||
94 | the formatting. | ||
95 | |||
96 | See the section below "How to add extractable documentation to your | ||
97 | source files" for more details and notes on how to format kernel-doc | ||
98 | comments. | ||
99 | |||
100 | Components of the kernel-doc system | ||
101 | ----------------------------------- | ||
102 | |||
4 | Many places in the source tree have extractable documentation in the | 103 | Many places in the source tree have extractable documentation in the |
5 | form of block comments above functions. The components of this system | 104 | form of block comments above functions. The components of this system |
6 | are: | 105 | are: |
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt index 5a4ef48224ae..28cdc2af2131 100644 --- a/Documentation/kernel-docs.txt +++ b/Documentation/kernel-docs.txt | |||
@@ -715,14 +715,14 @@ | |||
715 | 715 | ||
716 | * Name: "Gary's Encyclopedia - The Linux Kernel" | 716 | * Name: "Gary's Encyclopedia - The Linux Kernel" |
717 | Author: Gary (I suppose...). | 717 | Author: Gary (I suppose...). |
718 | URL: http://www.lisoleg.net/cgi-bin/lisoleg.pl?view=kernel.htm | 718 | URL: http://slencyclopedia.berlios.de/index.html |
719 | Keywords: links, not found here?. | 719 | Keywords: linux, community, everything! |
720 | Description: Gary's Encyclopedia exists to allow the rapid finding | 720 | Description: Gary's Encyclopedia exists to allow the rapid finding |
721 | of documentation and other information of interest to GNU/Linux | 721 | of documentation and other information of interest to GNU/Linux |
722 | users. It has about 4000 links to external pages in 150 major | 722 | users. It has about 4000 links to external pages in 150 major |
723 | categories. This link is for kernel-specific links, documents, | 723 | categories. This link is for kernel-specific links, documents, |
724 | sites... Look there if you could not find here what you were | 724 | sites... This list is now hosted by developer.Berlios.de, |
725 | looking for. | 725 | but seems not to have been updated since sometime in 1999. |
726 | 726 | ||
727 | * Name: "The home page of Linux-MM" | 727 | * Name: "The home page of Linux-MM" |
728 | Author: The Linux-MM team. | 728 | Author: The Linux-MM team. |
diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt index 770fc41a78e8..796012540386 100644 --- a/Documentation/networking/arcnet.txt +++ b/Documentation/networking/arcnet.txt | |||
@@ -46,7 +46,7 @@ These are the ARCnet drivers for Linux. | |||
46 | 46 | ||
47 | 47 | ||
48 | This new release (2.91) has been put together by David Woodhouse | 48 | This new release (2.91) has been put together by David Woodhouse |
49 | <dwmw2@cam.ac.uk>, in an attempt to tidy up the driver after adding support | 49 | <dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support |
50 | for yet another chipset. Now the generic support has been separated from the | 50 | for yet another chipset. Now the generic support has been separated from the |
51 | individual chipset drivers, and the source files aren't quite so packed with | 51 | individual chipset drivers, and the source files aren't quite so packed with |
52 | #ifdefs! I've changed this file a bit, but kept it in the first person from | 52 | #ifdefs! I've changed this file a bit, but kept it in the first person from |
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 543957346469..7cf5685d3645 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -60,7 +60,7 @@ | |||
60 | 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] | 60 | 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] |
61 | 60 -> Pinnacle Hybrid PCTV [12ab:1788] | 61 | 60 -> Pinnacle Hybrid PCTV [12ab:1788] |
62 | 61 -> Winfast TV2000 XP Global [107d:6f18] | 62 | 61 -> Winfast TV2000 XP Global [107d:6f18] |
63 | 62 -> PowerColor Real Angel 330 [14f1:ea3d] | 63 | 62 -> PowerColor RA330 [14f1:ea3d] |
64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] | 64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] |
65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] | 65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] |
66 | 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] | 66 | 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] |
diff --git a/Documentation/video4linux/cx18.txt b/Documentation/video4linux/cx18.txt index 077d56ec3f3d..6842c262890f 100644 --- a/Documentation/video4linux/cx18.txt +++ b/Documentation/video4linux/cx18.txt | |||
@@ -1,7 +1,9 @@ | |||
1 | Some notes regarding the cx18 driver for the Conexant CX23418 MPEG | 1 | Some notes regarding the cx18 driver for the Conexant CX23418 MPEG |
2 | encoder chip: | 2 | encoder chip: |
3 | 3 | ||
4 | 1) The only hardware currently supported is the Hauppauge HVR-1600. | 4 | 1) The only hardware currently supported is the Hauppauge HVR-1600 |
5 | card and the Compro VideoMate H900 (note that this card only | ||
6 | supports analog input, it has no digital tuner!). | ||
5 | 7 | ||
6 | 2) Some people have problems getting the i2c bus to work. Cause unknown. | 8 | 2) Some people have problems getting the i2c bus to work. Cause unknown. |
7 | The symptom is that the eeprom cannot be read and the card is | 9 | The symptom is that the eeprom cannot be read and the card is |
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt new file mode 100644 index 000000000000..ce72c0fe6177 --- /dev/null +++ b/Documentation/vm/pagemap.txt | |||
@@ -0,0 +1,77 @@ | |||
1 | pagemap, from the userspace perspective | ||
2 | --------------------------------------- | ||
3 | |||
4 | pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow | ||
5 | userspace programs to examine the page tables and related information by | ||
6 | reading files in /proc. | ||
7 | |||
8 | There are three components to pagemap: | ||
9 | |||
10 | * /proc/pid/pagemap. This file lets a userspace process find out which | ||
11 | physical frame each virtual page is mapped to. It contains one 64-bit | ||
12 | value for each virtual page, containing the following data (from | ||
13 | fs/proc/task_mmu.c, above pagemap_read): | ||
14 | |||
15 | * Bits 0-55 page frame number (PFN) if present | ||
16 | * Bits 0-4 swap type if swapped | ||
17 | * Bits 5-55 swap offset if swapped | ||
18 | * Bits 55-60 page shift (page size = 1<<page shift) | ||
19 | * Bit 61 reserved for future use | ||
20 | * Bit 62 page swapped | ||
21 | * Bit 63 page present | ||
22 | |||
23 | If the page is not present but in swap, then the PFN contains an | ||
24 | encoding of the swap file number and the page's offset into the | ||
25 | swap. Unmapped pages return a null PFN. This allows determining | ||
26 | precisely which pages are mapped (or in swap) and comparing mapped | ||
27 | pages between processes. | ||
28 | |||
29 | Efficient users of this interface will use /proc/pid/maps to | ||
30 | determine which areas of memory are actually mapped and llseek to | ||
31 | skip over unmapped regions. | ||
32 | |||
33 | * /proc/kpagecount. This file contains a 64-bit count of the number of | ||
34 | times each page is mapped, indexed by PFN. | ||
35 | |||
36 | * /proc/kpageflags. This file contains a 64-bit set of flags for each | ||
37 | page, indexed by PFN. | ||
38 | |||
39 | The flags are (from fs/proc/proc_misc, above kpageflags_read): | ||
40 | |||
41 | 0. LOCKED | ||
42 | 1. ERROR | ||
43 | 2. REFERENCED | ||
44 | 3. UPTODATE | ||
45 | 4. DIRTY | ||
46 | 5. LRU | ||
47 | 6. ACTIVE | ||
48 | 7. SLAB | ||
49 | 8. WRITEBACK | ||
50 | 9. RECLAIM | ||
51 | 10. BUDDY | ||
52 | |||
53 | Using pagemap to do something useful: | ||
54 | |||
55 | The general procedure for using pagemap to find out about a process' memory | ||
56 | usage goes like this: | ||
57 | |||
58 | 1. Read /proc/pid/maps to determine which parts of the memory space are | ||
59 | mapped to what. | ||
60 | 2. Select the maps you are interested in -- all of them, or a particular | ||
61 | library, or the stack or the heap, etc. | ||
62 | 3. Open /proc/pid/pagemap and seek to the pages you would like to examine. | ||
63 | 4. Read a u64 for each page from pagemap. | ||
64 | 5. Open /proc/kpagecount and/or /proc/kpageflags. For each PFN you just | ||
65 | read, seek to that entry in the file, and read the data you want. | ||
66 | |||
67 | For example, to find the "unique set size" (USS), which is the amount of | ||
68 | memory that a process is using that is not shared with any other process, | ||
69 | you can go through every map in the process, find the PFNs, look those up | ||
70 | in kpagecount, and tally up the number of pages that are only referenced | ||
71 | once. | ||
72 | |||
73 | Other notes: | ||
74 | |||
75 | Reading from any of the files will return -EINVAL if you are not starting | ||
76 | the read on an 8-byte boundary (e.g., if you seeked an odd number of bytes | ||
77 | into the file), or if the size of the read is not a multiple of 8 bytes. | ||