aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-27 22:03:52 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-27 22:03:52 -0400
commit716b43303df605510399d6da0d0dd4e2ea376e7c (patch)
tree57412aaf516b7a10b4b81064aeda318514fec168 /Documentation
parent5696c1944a33b4434a9a1ebb6383b906afd43a10 (diff)
parentc7b645f934e52a54af58142d91fb51f881f8ce26 (diff)
Merge upstream ieee80211.h with us (us == branch 'ieee80211' of netdev-2.6)
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/block/ioprio.txt176
-rw-r--r--Documentation/cciss.txt1
-rw-r--r--Documentation/kernel-parameters.txt2
3 files changed, 178 insertions, 1 deletions
diff --git a/Documentation/block/ioprio.txt b/Documentation/block/ioprio.txt
new file mode 100644
index 000000000000..96ccf681075e
--- /dev/null
+++ b/Documentation/block/ioprio.txt
@@ -0,0 +1,176 @@
1Block io priorities
2===================
3
4
5Intro
6-----
7
8With the introduction of cfq v3 (aka cfq-ts or time sliced cfq), basic io
9priorities is supported for reads on files. This enables users to io nice
10processes or process groups, similar to what has been possible to cpu
11scheduling for ages. This document mainly details the current possibilites
12with cfq, other io schedulers do not support io priorities so far.
13
14Scheduling classes
15------------------
16
17CFQ implements three generic scheduling classes that determine how io is
18served for a process.
19
20IOPRIO_CLASS_RT: This is the realtime io class. This scheduling class is given
21higher priority than any other in the system, processes from this class are
22given first access to the disk every time. Thus it needs to be used with some
23care, one io RT process can starve the entire system. Within the RT class,
24there are 8 levels of class data that determine exactly how much time this
25process needs the disk for on each service. In the future this might change
26to be more directly mappable to performance, by passing in a wanted data
27rate instead.
28
29IOPRIO_CLASS_BE: This is the best-effort scheduling class, which is the default
30for any process that hasn't set a specific io priority. The class data
31determines how much io bandwidth the process will get, it's directly mappable
32to the cpu nice levels just more coarsely implemented. 0 is the highest
33BE prio level, 7 is the lowest. The mapping between cpu nice level and io
34nice level is determined as: io_nice = (cpu_nice + 20) / 5.
35
36IOPRIO_CLASS_IDLE: This is the idle scheduling class, processes running at this
37level only get io time when no one else needs the disk. The idle class has no
38class data, since it doesn't really apply here.
39
40Tools
41-----
42
43See below for a sample ionice tool. Usage:
44
45# ionice -c<class> -n<level> -p<pid>
46
47If pid isn't given, the current process is assumed. IO priority settings
48are inherited on fork, so you can use ionice to start the process at a given
49level:
50
51# ionice -c2 -n0 /bin/ls
52
53will run ls at the best-effort scheduling class at the highest priority.
54For a running process, you can give the pid instead:
55
56# ionice -c1 -n2 -p100
57
58will change pid 100 to run at the realtime scheduling class, at priority 2.
59
60---> snip ionice.c tool <---
61
62#include <stdio.h>
63#include <stdlib.h>
64#include <errno.h>
65#include <getopt.h>
66#include <unistd.h>
67#include <sys/ptrace.h>
68#include <asm/unistd.h>
69
70extern int sys_ioprio_set(int, int, int);
71extern int sys_ioprio_get(int, int);
72
73#if defined(__i386__)
74#define __NR_ioprio_set 289
75#define __NR_ioprio_get 290
76#elif defined(__ppc__)
77#define __NR_ioprio_set 273
78#define __NR_ioprio_get 274
79#elif defined(__x86_64__)
80#define __NR_ioprio_set 251
81#define __NR_ioprio_get 252
82#elif defined(__ia64__)
83#define __NR_ioprio_set 1274
84#define __NR_ioprio_get 1275
85#else
86#error "Unsupported arch"
87#endif
88
89_syscall3(int, ioprio_set, int, which, int, who, int, ioprio);
90_syscall2(int, ioprio_get, int, which, int, who);
91
92enum {
93 IOPRIO_CLASS_NONE,
94 IOPRIO_CLASS_RT,
95 IOPRIO_CLASS_BE,
96 IOPRIO_CLASS_IDLE,
97};
98
99enum {
100 IOPRIO_WHO_PROCESS = 1,
101 IOPRIO_WHO_PGRP,
102 IOPRIO_WHO_USER,
103};
104
105#define IOPRIO_CLASS_SHIFT 13
106
107const char *to_prio[] = { "none", "realtime", "best-effort", "idle", };
108
109int main(int argc, char *argv[])
110{
111 int ioprio = 4, set = 0, ioprio_class = IOPRIO_CLASS_BE;
112 int c, pid = 0;
113
114 while ((c = getopt(argc, argv, "+n:c:p:")) != EOF) {
115 switch (c) {
116 case 'n':
117 ioprio = strtol(optarg, NULL, 10);
118 set = 1;
119 break;
120 case 'c':
121 ioprio_class = strtol(optarg, NULL, 10);
122 set = 1;
123 break;
124 case 'p':
125 pid = strtol(optarg, NULL, 10);
126 break;
127 }
128 }
129
130 switch (ioprio_class) {
131 case IOPRIO_CLASS_NONE:
132 ioprio_class = IOPRIO_CLASS_BE;
133 break;
134 case IOPRIO_CLASS_RT:
135 case IOPRIO_CLASS_BE:
136 break;
137 case IOPRIO_CLASS_IDLE:
138 ioprio = 7;
139 break;
140 default:
141 printf("bad prio class %d\n", ioprio_class);
142 return 1;
143 }
144
145 if (!set) {
146 if (!pid && argv[optind])
147 pid = strtol(argv[optind], NULL, 10);
148
149 ioprio = ioprio_get(IOPRIO_WHO_PROCESS, pid);
150
151 printf("pid=%d, %d\n", pid, ioprio);
152
153 if (ioprio == -1)
154 perror("ioprio_get");
155 else {
156 ioprio_class = ioprio >> IOPRIO_CLASS_SHIFT;
157 ioprio = ioprio & 0xff;
158 printf("%s: prio %d\n", to_prio[ioprio_class], ioprio);
159 }
160 } else {
161 if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) {
162 perror("ioprio_set");
163 return 1;
164 }
165
166 if (argv[optind])
167 execvp(argv[optind], &argv[optind]);
168 }
169
170 return 0;
171}
172
173---> snip ionice.c tool <---
174
175
176March 11 2005, Jens Axboe <axboe@suse.de>
diff --git a/Documentation/cciss.txt b/Documentation/cciss.txt
index d599beb9df8a..c8f9a73111da 100644
--- a/Documentation/cciss.txt
+++ b/Documentation/cciss.txt
@@ -17,6 +17,7 @@ This driver is known to work with the following cards:
17 * SA P600 17 * SA P600
18 * SA P800 18 * SA P800
19 * SA E400 19 * SA E400
20 * SA E300
20 21
21If nodes are not already created in the /dev/cciss directory, run as root: 22If nodes are not already created in the /dev/cciss directory, run as root:
22 23
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index f44bb5567c5b..89cd417651e0 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1115,7 +1115,7 @@ running once the system is up.
1115 See Documentation/ramdisk.txt. 1115 See Documentation/ramdisk.txt.
1116 1116
1117 psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to 1117 psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to
1118 probe for (bare|imps|exps). 1118 probe for (bare|imps|exps|lifebook|any).
1119 psmouse.rate= [HW,MOUSE] Set desired mouse report rate, in reports 1119 psmouse.rate= [HW,MOUSE] Set desired mouse report rate, in reports
1120 per second. 1120 per second.
1121 psmouse.resetafter= 1121 psmouse.resetafter=