diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-11-19 13:10:43 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:10:43 -0500 |
commit | 0160950297c08f8233c89b9f9e7dd59cfb080809 (patch) | |
tree | 4910bfb7ab5b4000a1679fd165d217ff48226268 /Documentation/slow-work.txt | |
parent | 4d8bb2cbccf6dccaada509aafeb01c6205c9d8c4 (diff) |
SLOW_WORK: Add support for cancellation of slow work
Add support for cancellation of queued slow work and delayed slow work items.
The cancellation functions will wait for items that are pending or undergoing
execution to be discarded by the slow work facility.
Attempting to enqueue work that is in the process of being cancelled will
result in ECANCELED.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'Documentation/slow-work.txt')
-rw-r--r-- | Documentation/slow-work.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt index c655c517fc68..2e384bd4dead 100644 --- a/Documentation/slow-work.txt +++ b/Documentation/slow-work.txt | |||
@@ -108,7 +108,17 @@ on the item, 0 otherwise. | |||
108 | 108 | ||
109 | 109 | ||
110 | The items are reference counted, so there ought to be no need for a flush | 110 | The items are reference counted, so there ought to be no need for a flush |
111 | operation. When all a module's slow work items have been processed, and the | 111 | operation. But as the reference counting is optional, means to cancel |
112 | existing work items are also included: | ||
113 | |||
114 | cancel_slow_work(&myitem); | ||
115 | |||
116 | can be used to cancel pending work. The above cancel function waits for | ||
117 | existing work to have been executed (or prevent execution of them, depending | ||
118 | on timing). | ||
119 | |||
120 | |||
121 | When all a module's slow work items have been processed, and the | ||
112 | module has no further interest in the facility, it should unregister its | 122 | module has no further interest in the facility, it should unregister its |
113 | interest: | 123 | interest: |
114 | 124 | ||