forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,097 changed files
with
18,528 additions
and
10,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,63 @@ | ||
Linux Kernel patch sumbittal checklist | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Here are some basic things that developers should do if they | ||
want to see their kernel patch submittals accepted quicker. | ||
Here are some basic things that developers should do if they want to see their | ||
kernel patch submissions accepted more quickly. | ||
|
||
These are all above and beyond the documentation that is provided | ||
in Documentation/SubmittingPatches and elsewhere about submitting | ||
Linux kernel patches. | ||
These are all above and beyond the documentation that is provided in | ||
Documentation/SubmittingPatches and elsewhere regarding submitting Linux | ||
kernel patches. | ||
|
||
|
||
|
||
- Builds cleanly with applicable or modified CONFIG options =y, =m, and =n. | ||
No gcc warnings/errors, no linker warnings/errors. | ||
1: Builds cleanly with applicable or modified CONFIG options =y, =m, and | ||
=n. No gcc warnings/errors, no linker warnings/errors. | ||
|
||
- Passes allnoconfig, allmodconfig | ||
2: Passes allnoconfig, allmodconfig | ||
|
||
- Builds on multiple CPU arch-es by using local cross-compile tools | ||
or something like PLM at OSDL. | ||
3: Builds on multiple CPU architectures by using local cross-compile tools | ||
or something like PLM at OSDL. | ||
|
||
- ppc64 is a good architecture for cross-compilation checking because it | ||
tends to use `unsigned long' for 64-bit quantities. | ||
4: ppc64 is a good architecture for cross-compilation checking because it | ||
tends to use `unsigned long' for 64-bit quantities. | ||
|
||
- Matches kernel coding style(!) | ||
5: Matches kernel coding style(!) | ||
|
||
- Any new or modified CONFIG options don't muck up the config menu. | ||
6: Any new or modified CONFIG options don't muck up the config menu. | ||
|
||
- All new Kconfig options have help text. | ||
7: All new Kconfig options have help text. | ||
|
||
- Has been carefully reviewed with respect to relevant Kconfig | ||
combinations. This is very hard to get right with testing -- | ||
brainpower pays off here. | ||
8: Has been carefully reviewed with respect to relevant Kconfig | ||
combinations. This is very hard to get right with testing -- brainpower | ||
pays off here. | ||
|
||
- Check cleanly with sparse. | ||
9: Check cleanly with sparse. | ||
|
||
- Use 'make checkstack' and 'make namespacecheck' and fix any | ||
problems that they find. Note: checkstack does not point out | ||
problems explicitly, but any one function that uses more than | ||
512 bytes on the stack is a candidate for change. | ||
10: Use 'make checkstack' and 'make namespacecheck' and fix any problems | ||
that they find. Note: checkstack does not point out problems explicitly, | ||
but any one function that uses more than 512 bytes on the stack is a | ||
candidate for change. | ||
|
||
- Include kernel-doc to document global kernel APIs. (Not required | ||
for static functions, but OK there also.) Use 'make htmldocs' | ||
or 'make mandocs' to check the kernel-doc and fix any issues. | ||
11: Include kernel-doc to document global kernel APIs. (Not required for | ||
static functions, but OK there also.) Use 'make htmldocs' or 'make | ||
mandocs' to check the kernel-doc and fix any issues. | ||
|
||
- Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, | ||
CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, | ||
CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously | ||
enabled. | ||
12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, | ||
CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, | ||
CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously | ||
enabled. | ||
|
||
- Has been build- and runtime tested with and without CONFIG_SMP and | ||
CONFIG_PREEMPT. | ||
13: Has been build- and runtime tested with and without CONFIG_SMP and | ||
CONFIG_PREEMPT. | ||
|
||
- If the patch affects IO/Disk, etc: has been tested with and without | ||
CONFIG_LBD. | ||
14: If the patch affects IO/Disk, etc: has been tested with and without | ||
CONFIG_LBD. | ||
|
||
15: All codepaths have been exercised with all lockdep features enabled. | ||
|
||
2006-APR-27 | ||
16: All new /proc entries are documented under Documentation/ | ||
|
||
17: All new kernel boot parameters are documented in | ||
Documentation/kernel-parameters.txt. | ||
|
||
18: All new module parameters are documented with MODULE_PARM_DESC() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
Delay accounting | ||
---------------- | ||
|
||
Tasks encounter delays in execution when they wait | ||
for some kernel resource to become available e.g. a | ||
runnable task may wait for a free CPU to run on. | ||
|
||
The per-task delay accounting functionality measures | ||
the delays experienced by a task while | ||
|
||
a) waiting for a CPU (while being runnable) | ||
b) completion of synchronous block I/O initiated by the task | ||
c) swapping in pages | ||
|
||
and makes these statistics available to userspace through | ||
the taskstats interface. | ||
|
||
Such delays provide feedback for setting a task's cpu priority, | ||
io priority and rss limit values appropriately. Long delays for | ||
important tasks could be a trigger for raising its corresponding priority. | ||
|
||
The functionality, through its use of the taskstats interface, also provides | ||
delay statistics aggregated for all tasks (or threads) belonging to a | ||
thread group (corresponding to a traditional Unix process). This is a commonly | ||
needed aggregation that is more efficiently done by the kernel. | ||
|
||
Userspace utilities, particularly resource management applications, can also | ||
aggregate delay statistics into arbitrary groups. To enable this, delay | ||
statistics of a task are available both during its lifetime as well as on its | ||
exit, ensuring continuous and complete monitoring can be done. | ||
|
||
|
||
Interface | ||
--------- | ||
|
||
Delay accounting uses the taskstats interface which is described | ||
in detail in a separate document in this directory. Taskstats returns a | ||
generic data structure to userspace corresponding to per-pid and per-tgid | ||
statistics. The delay accounting functionality populates specific fields of | ||
this structure. See | ||
include/linux/taskstats.h | ||
for a description of the fields pertaining to delay accounting. | ||
It will generally be in the form of counters returning the cumulative | ||
delay seen for cpu, sync block I/O, swapin etc. | ||
|
||
Taking the difference of two successive readings of a given | ||
counter (say cpu_delay_total) for a task will give the delay | ||
experienced by the task waiting for the corresponding resource | ||
in that interval. | ||
|
||
When a task exits, records containing the per-task statistics | ||
are sent to userspace without requiring a command. If it is the last exiting | ||
task of a thread group, the per-tgid statistics are also sent. More details | ||
are given in the taskstats interface description. | ||
|
||
The getdelays.c userspace utility in this directory allows simple commands to | ||
be run and the corresponding delay statistics to be displayed. It also serves | ||
as an example of using the taskstats interface. | ||
|
||
Usage | ||
----- | ||
|
||
Compile the kernel with | ||
CONFIG_TASK_DELAY_ACCT=y | ||
CONFIG_TASKSTATS=y | ||
|
||
Enable the accounting at boot time by adding | ||
the following to the kernel boot options | ||
delayacct | ||
|
||
and after the system has booted up, use a utility | ||
similar to getdelays.c to access the delays | ||
seen by a given task or a task group (tgid). | ||
The utility also allows a given command to be | ||
executed and the corresponding delays to be | ||
seen. | ||
|
||
General format of the getdelays command | ||
|
||
getdelays [-t tgid] [-p pid] [-c cmd...] | ||
|
||
|
||
Get delays, since system boot, for pid 10 | ||
# ./getdelays -p 10 | ||
(output similar to next case) | ||
|
||
Get sum of delays, since system boot, for all pids with tgid 5 | ||
# ./getdelays -t 5 | ||
|
||
|
||
CPU count real total virtual total delay total | ||
7876 92005750 100000000 24001500 | ||
IO count delay total | ||
0 0 | ||
MEM count delay total | ||
0 0 | ||
|
||
Get delays seen in executing a given simple command | ||
# ./getdelays -c ls / | ||
|
||
bin data1 data3 data5 dev home media opt root srv sys usr | ||
boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var | ||
|
||
|
||
CPU count real total virtual total delay total | ||
6 4000250 4000000 0 | ||
IO count delay total | ||
0 0 | ||
MEM count delay total | ||
0 0 |
Oops, something went wrong.