diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cpusets.txt | 50 |
1 files changed, 4 insertions, 46 deletions
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index ef83b2dd0cb3..9e49b1c35729 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -16,9 +16,8 @@ CONTENTS: | |||
16 | 1.3 How are cpusets implemented ? | 16 | 1.3 How are cpusets implemented ? |
17 | 1.4 What are exclusive cpusets ? | 17 | 1.4 What are exclusive cpusets ? |
18 | 1.5 What does notify_on_release do ? | 18 | 1.5 What does notify_on_release do ? |
19 | 1.6 What is a marker_pid ? | 19 | 1.6 What is memory_pressure ? |
20 | 1.7 What is memory_pressure ? | 20 | 1.7 How do I use cpusets ? |
21 | 1.8 How do I use cpusets ? | ||
22 | 2. Usage Examples and Syntax | 21 | 2. Usage Examples and Syntax |
23 | 2.1 Basic Usage | 22 | 2.1 Basic Usage |
24 | 2.2 Adding/removing cpus | 23 | 2.2 Adding/removing cpus |
@@ -178,7 +177,6 @@ containing the following files describing that cpuset: | |||
178 | - mem_exclusive flag: is memory placement exclusive? | 177 | - mem_exclusive flag: is memory placement exclusive? |
179 | - tasks: list of tasks (by pid) attached to that cpuset | 178 | - tasks: list of tasks (by pid) attached to that cpuset |
180 | - notify_on_release flag: run /sbin/cpuset_release_agent on exit? | 179 | - notify_on_release flag: run /sbin/cpuset_release_agent on exit? |
181 | - marker_pid: pid of user task in co-ordinated operation sequence | ||
182 | - memory_pressure: measure of how much paging pressure in cpuset | 180 | - memory_pressure: measure of how much paging pressure in cpuset |
183 | 181 | ||
184 | In addition, the root cpuset only has the following file: | 182 | In addition, the root cpuset only has the following file: |
@@ -260,47 +258,7 @@ boot is disabled (0). The default value of other cpusets at creation | |||
260 | is the current value of their parents notify_on_release setting. | 258 | is the current value of their parents notify_on_release setting. |
261 | 259 | ||
262 | 260 | ||
263 | 1.6 What is a marker_pid ? | 261 | 1.6 What is memory_pressure ? |
264 | -------------------------- | ||
265 | |||
266 | The marker_pid helps manage cpuset changes safely from user space. | ||
267 | |||
268 | The interface presented to user space for cpusets uses system wide | ||
269 | numbering of CPUs and Memory Nodes. It is the responsibility of | ||
270 | user level code, presumably in a library, to present cpuset-relative | ||
271 | numbering to applications when that would be more useful to them. | ||
272 | |||
273 | However if a task is moved to a different cpuset, or if the 'cpus' or | ||
274 | 'mems' of a cpuset are changed, then we need a way for such library | ||
275 | code to detect that its cpuset-relative numbering has changed, when | ||
276 | expressed using system wide numbering. | ||
277 | |||
278 | The kernel cannot safely allow user code to lock kernel resources. | ||
279 | The kernel could deliver out-of-band notice of cpuset changes by | ||
280 | such mechanisms as signals or usermodehelper callbacks, however | ||
281 | this can't be synchronously delivered to library code linked in | ||
282 | applications without intruding on the IPC mechanisms available to | ||
283 | the app. The kernel could require user level code to do all the work, | ||
284 | tracking the cpuset state before and during changes, to verify no | ||
285 | unexpected change occurred, but this becomes an onerous task. | ||
286 | |||
287 | The "marker_pid" cpuset field provides a simple way to make this task | ||
288 | less onerous on user library code. A task writes its pid to a cpusets | ||
289 | "marker_pid" at the start of a sequence of queries and updates, | ||
290 | and check as it goes that the cpusets marker_pid doesn't change. | ||
291 | The pread(2) system call does a seek and read in a single call. | ||
292 | If the marker_pid changes, the user code should retry the required | ||
293 | sequence of operations. | ||
294 | |||
295 | Anytime that a task modifies the "cpus" or "mems" of a cpuset, | ||
296 | unless it's pid is in the cpusets marker_pid field, the kernel zeros | ||
297 | this field. | ||
298 | |||
299 | The above was inspired by the load linked and store conditional | ||
300 | (ll/sc) instructions in the MIPS II instruction set. | ||
301 | |||
302 | |||
303 | 1.7 What is memory_pressure ? | ||
304 | ----------------------------- | 262 | ----------------------------- |
305 | The memory_pressure of a cpuset provides a simple per-cpuset metric | 263 | The memory_pressure of a cpuset provides a simple per-cpuset metric |
306 | of the rate that the tasks in a cpuset are attempting to free up in | 264 | of the rate that the tasks in a cpuset are attempting to free up in |
@@ -357,7 +315,7 @@ the tasks in the cpuset, in units of reclaims attempted per second, | |||
357 | times 1000. | 315 | times 1000. |
358 | 316 | ||
359 | 317 | ||
360 | 1.8 How do I use cpusets ? | 318 | 1.7 How do I use cpusets ? |
361 | -------------------------- | 319 | -------------------------- |
362 | 320 | ||
363 | In order to minimize the impact of cpusets on critical kernel | 321 | In order to minimize the impact of cpusets on critical kernel |