diff options
-rw-r--r-- | Documentation/padata.txt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Documentation/padata.txt b/Documentation/padata.txt index 473ebf22cd69..7ddfe216a0aa 100644 --- a/Documentation/padata.txt +++ b/Documentation/padata.txt | |||
@@ -19,7 +19,7 @@ overall control of how tasks are to be run: | |||
19 | 19 | ||
20 | The pcpumask describes which processors will be used to execute work | 20 | The pcpumask describes which processors will be used to execute work |
21 | submitted to this instance in parallel. The cbcpumask defines which | 21 | submitted to this instance in parallel. The cbcpumask defines which |
22 | processors are allowed to use as the serialization callback processor. | 22 | processors are allowed to be used as the serialization callback processor. |
23 | The workqueue wq is where the work will actually be done; it should be | 23 | The workqueue wq is where the work will actually be done; it should be |
24 | a multithreaded queue, naturally. | 24 | a multithreaded queue, naturally. |
25 | 25 | ||
@@ -30,10 +30,10 @@ cpumasks this helper function can be used: | |||
30 | 30 | ||
31 | Note: Padata maintains two kinds of cpumasks internally. The user supplied | 31 | Note: Padata maintains two kinds of cpumasks internally. The user supplied |
32 | cpumasks, submitted by padata_alloc/padata_alloc_possible and the 'usable' | 32 | cpumasks, submitted by padata_alloc/padata_alloc_possible and the 'usable' |
33 | cpumasks. The usable cpumasks are always the subset of active cpus in the | 33 | cpumasks. The usable cpumasks are always a subset of active CPUs in the |
34 | user supplied cpumasks, these are the cpumasks padata actually use. So | 34 | user supplied cpumasks; these are the cpumasks padata actually uses. So |
35 | it is legal to supply a cpumask to padata that contains offline cpus. | 35 | it is legal to supply a cpumask to padata that contains offline CPUs. |
36 | Once a offline cpu in the user supplied cpumask comes online, padata | 36 | Once an offline CPU in the user supplied cpumask comes online, padata |
37 | is going to use it. | 37 | is going to use it. |
38 | 38 | ||
39 | There are functions for enabling and disabling the instance: | 39 | There are functions for enabling and disabling the instance: |
@@ -44,7 +44,7 @@ There are functions for enabling and disabling the instance: | |||
44 | These functions are setting or clearing the "PADATA_INIT" flag; | 44 | These functions are setting or clearing the "PADATA_INIT" flag; |
45 | if that flag is not set, other functions will refuse to work. | 45 | if that flag is not set, other functions will refuse to work. |
46 | padata_start returns zero on success (flag set) or -EINVAL if the | 46 | padata_start returns zero on success (flag set) or -EINVAL if the |
47 | padata cpumask contains no active cpu (flag not set). | 47 | padata cpumask contains no active CPU (flag not set). |
48 | padata_stop clears the flag and blocks until the padata instance | 48 | padata_stop clears the flag and blocks until the padata instance |
49 | is unused. | 49 | is unused. |
50 | 50 | ||
@@ -63,11 +63,11 @@ done with great frequency. | |||
63 | 63 | ||
64 | It's possible to change both cpumasks of a padata instance with | 64 | It's possible to change both cpumasks of a padata instance with |
65 | padata_set_cpumasks by specifying the cpumasks for parallel execution (pcpumask) | 65 | padata_set_cpumasks by specifying the cpumasks for parallel execution (pcpumask) |
66 | and for the serial callback function (cbcpumask). padata_set_cpumask is to | 66 | and for the serial callback function (cbcpumask). padata_set_cpumask is used to |
67 | change just one of the cpumasks. Here cpumask_type is one of PADATA_CPU_SERIAL, | 67 | change just one of the cpumasks. Here cpumask_type is one of PADATA_CPU_SERIAL, |
68 | PADATA_CPU_PARALLEL and cpumask specifies the new cpumask to use. | 68 | PADATA_CPU_PARALLEL and cpumask specifies the new cpumask to use. |
69 | To simply add or remove one cpu from a certain cpumask the functions | 69 | To simply add or remove one CPU from a certain cpumask the functions |
70 | padata_add_cpu/padata_remove_cpu are used. cpu specifies the cpu to add or | 70 | padata_add_cpu/padata_remove_cpu are used. cpu specifies the CPU to add or |
71 | remove and mask is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL. | 71 | remove and mask is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL. |
72 | 72 | ||
73 | If a user is interested in padata cpumask changes, he can register to | 73 | If a user is interested in padata cpumask changes, he can register to |
@@ -82,7 +82,7 @@ To unregister from that notifier: | |||
82 | struct notifier_block *nblock); | 82 | struct notifier_block *nblock); |
83 | 83 | ||
84 | The padata cpumask change notifier notifies about changes of the usable | 84 | The padata cpumask change notifier notifies about changes of the usable |
85 | cpumasks, i.e. the subset of active cpus in the user supplied cpumask. | 85 | cpumasks, i.e. the subset of active CPUs in the user supplied cpumask. |
86 | 86 | ||
87 | Padata calls the notifier chain with: | 87 | Padata calls the notifier chain with: |
88 | 88 | ||
@@ -92,7 +92,7 @@ Padata calls the notifier chain with: | |||
92 | 92 | ||
93 | Here cpumask_change_notifier is registered notifier, notification_mask | 93 | Here cpumask_change_notifier is registered notifier, notification_mask |
94 | is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL and cpumask is a pointer | 94 | is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL and cpumask is a pointer |
95 | to a struct padata_cpumask that contains the new cpumask informations. | 95 | to a struct padata_cpumask that contains the new cpumask information. |
96 | 96 | ||
97 | Actually submitting work to the padata instance requires the creation of a | 97 | Actually submitting work to the padata instance requires the creation of a |
98 | padata_priv structure: | 98 | padata_priv structure: |
@@ -104,7 +104,7 @@ padata_priv structure: | |||
104 | }; | 104 | }; |
105 | 105 | ||
106 | This structure will almost certainly be embedded within some larger | 106 | This structure will almost certainly be embedded within some larger |
107 | structure specific to the work to be done. Most its fields are private to | 107 | structure specific to the work to be done. Most of its fields are private to |
108 | padata, but the structure should be zeroed at initialisation time, and the | 108 | padata, but the structure should be zeroed at initialisation time, and the |
109 | parallel() and serial() functions should be provided. Those functions will | 109 | parallel() and serial() functions should be provided. Those functions will |
110 | be called in the process of getting the work done as we will see | 110 | be called in the process of getting the work done as we will see |