aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/slow-work.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/slow-work.txt')
-rw-r--r--Documentation/slow-work.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt
index 2e384bd4dead..a9d1b0ffdded 100644
--- a/Documentation/slow-work.txt
+++ b/Documentation/slow-work.txt
@@ -41,6 +41,13 @@ expand files, provided the time taken to do so isn't too long.
41Operations of both types may sleep during execution, thus tying up the thread 41Operations of both types may sleep during execution, thus tying up the thread
42loaned to it. 42loaned to it.
43 43
44A further class of work item is available, based on the slow work item class:
45
46 (*) Delayed slow work items.
47
48These are slow work items that have a timer to defer queueing of the item for
49a while.
50
44 51
45THREAD-TO-CLASS ALLOCATION 52THREAD-TO-CLASS ALLOCATION
46-------------------------- 53--------------------------
@@ -95,6 +102,10 @@ Slow work items may then be set up by:
95 102
96 or: 103 or:
97 104
105 delayed_slow_work_init(&myitem, &myitem_ops);
106
107 or:
108
98 vslow_work_init(&myitem, &myitem_ops); 109 vslow_work_init(&myitem, &myitem_ops);
99 110
100 depending on its class. 111 depending on its class.
@@ -104,7 +115,9 @@ A suitably set up work item can then be enqueued for processing:
104 int ret = slow_work_enqueue(&myitem); 115 int ret = slow_work_enqueue(&myitem);
105 116
106This will return a -ve error if the thread pool is unable to gain a reference 117This will return a -ve error if the thread pool is unable to gain a reference
107on the item, 0 otherwise. 118on the item, 0 otherwise, or (for delayed work):
119
120 int ret = delayed_slow_work_enqueue(&myitem, my_jiffy_delay);
108 121
109 122
110The items are reference counted, so there ought to be no need for a flush 123The items are reference counted, so there ought to be no need for a flush
@@ -112,6 +125,7 @@ operation. But as the reference counting is optional, means to cancel
112existing work items are also included: 125existing work items are also included:
113 126
114 cancel_slow_work(&myitem); 127 cancel_slow_work(&myitem);
128 cancel_delayed_slow_work(&myitem);
115 129
116can be used to cancel pending work. The above cancel function waits for 130can be used to cancel pending work. The above cancel function waits for
117existing work to have been executed (or prevent execution of them, depending 131existing work to have been executed (or prevent execution of them, depending