diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2010-07-07 09:34:03 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-07-14 08:29:30 -0400 |
commit | 2197f9a16df9de94655992941d80953ba47042c2 (patch) | |
tree | 5b65b1495da03c395253a6661f3a834579aa28a3 | |
parent | 5f1a8c1bc724498ff32acbd59ed5263275676b9d (diff) |
padata: update documentation
This patch updates the padata documentation to the changed
API of padata_start/padata_stop and padata_do parallel.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | Documentation/padata.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Documentation/padata.txt b/Documentation/padata.txt index 269d7d0d8335..93dd4e6db975 100644 --- a/Documentation/padata.txt +++ b/Documentation/padata.txt | |||
@@ -22,12 +22,15 @@ actually be done; it should be a multithreaded queue, naturally. | |||
22 | 22 | ||
23 | There are functions for enabling and disabling the instance: | 23 | There are functions for enabling and disabling the instance: |
24 | 24 | ||
25 | void padata_start(struct padata_instance *pinst); | 25 | int padata_start(struct padata_instance *pinst); |
26 | void padata_stop(struct padata_instance *pinst); | 26 | void padata_stop(struct padata_instance *pinst); |
27 | 27 | ||
28 | These functions literally do nothing beyond setting or clearing the | 28 | These functions are setting or clearing the "PADATA_INIT" flag; |
29 | "padata_start() was called" flag; if that flag is not set, other functions | 29 | if that flag is not set, other functions will refuse to work. |
30 | will refuse to work. | 30 | padata_start returns zero on success (flag set) or -EINVAL if the |
31 | padata cpumask contains no active cpu (flag not set). | ||
32 | padata_stop clears the flag and blocks until the padata instance | ||
33 | is unused. | ||
31 | 34 | ||
32 | The list of CPUs to be used can be adjusted with these functions: | 35 | The list of CPUs to be used can be adjusted with these functions: |
33 | 36 | ||
@@ -63,12 +66,10 @@ The submission of work is done with: | |||
63 | The pinst and padata structures must be set up as described above; cb_cpu | 66 | The pinst and padata structures must be set up as described above; cb_cpu |
64 | specifies which CPU will be used for the final callback when the work is | 67 | specifies which CPU will be used for the final callback when the work is |
65 | done; it must be in the current instance's CPU mask. The return value from | 68 | done; it must be in the current instance's CPU mask. The return value from |
66 | padata_do_parallel() is a little strange; zero is an error return | 69 | padata_do_parallel() is zero on success, indicating that the work is in |
67 | indicating that the caller forgot the padata_start() formalities. -EBUSY | 70 | progress. -EBUSY means that somebody, somewhere else is messing with the |
68 | means that somebody, somewhere else is messing with the instance's CPU | 71 | instance's CPU mask, while -EINVAL is a complaint about cb_cpu not being |
69 | mask, while -EINVAL is a complaint about cb_cpu not being in that CPU mask. | 72 | in that CPU mask or about a not running instance. |
70 | If all goes well, this function will return -EINPROGRESS, indicating that | ||
71 | the work is in progress. | ||
72 | 73 | ||
73 | Each task submitted to padata_do_parallel() will, in turn, be passed to | 74 | Each task submitted to padata_do_parallel() will, in turn, be passed to |
74 | exactly one call to the above-mentioned parallel() function, on one CPU, so | 75 | exactly one call to the above-mentioned parallel() function, on one CPU, so |