Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204350
b: refs/heads/master
c: 2197f9a
h: refs/heads/master
v: v3
  • Loading branch information
Steffen Klassert authored and Herbert Xu committed Jul 14, 2010
1 parent df77725 commit 7922a39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f1a8c1bc724498ff32acbd59ed5263275676b9d
refs/heads/master: 2197f9a16df9de94655992941d80953ba47042c2
21 changes: 11 additions & 10 deletions trunk/Documentation/padata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ actually be done; it should be a multithreaded queue, naturally.

There are functions for enabling and disabling the instance:

void padata_start(struct padata_instance *pinst);
int padata_start(struct padata_instance *pinst);
void padata_stop(struct padata_instance *pinst);

These functions literally do nothing beyond setting or clearing the
"padata_start() was called" flag; if that flag is not set, other functions
will refuse to work.
These functions are setting or clearing the "PADATA_INIT" flag;
if that flag is not set, other functions will refuse to work.
padata_start returns zero on success (flag set) or -EINVAL if the
padata cpumask contains no active cpu (flag not set).
padata_stop clears the flag and blocks until the padata instance
is unused.

The list of CPUs to be used can be adjusted with these functions:

Expand Down Expand Up @@ -63,12 +66,10 @@ The submission of work is done with:
The pinst and padata structures must be set up as described above; cb_cpu
specifies which CPU will be used for the final callback when the work is
done; it must be in the current instance's CPU mask. The return value from
padata_do_parallel() is a little strange; zero is an error return
indicating that the caller forgot the padata_start() formalities. -EBUSY
means that somebody, somewhere else is messing with the instance's CPU
mask, while -EINVAL is a complaint about cb_cpu not being in that CPU mask.
If all goes well, this function will return -EINPROGRESS, indicating that
the work is in progress.
padata_do_parallel() is zero on success, indicating that the work is in
progress. -EBUSY means that somebody, somewhere else is messing with the
instance's CPU mask, while -EINVAL is a complaint about cb_cpu not being
in that CPU mask or about a not running instance.

Each task submitted to padata_do_parallel() will, in turn, be passed to
exactly one call to the above-mentioned parallel() function, on one CPU, so
Expand Down

0 comments on commit 7922a39

Please sign in to comment.