Lines Matching full:completion

10 #include <linux/completion.h>
22 #include "completion.h"
64 struct completion *started;
89 * Dequeue and return the next waiting completion, if any.
92 * condition where a high-priority completion can be enqueued followed by a lower-priority one, and
111 struct vdo_completion *completion) in enqueue_work_queue_completion() argument
113 VDO_ASSERT_LOG_ONLY(completion->my_queue == NULL, in enqueue_work_queue_completion()
114 "completion %px (fn %px) to enqueue (%px) is not already queued (%px)", in enqueue_work_queue_completion()
115 completion, completion->callback, queue, completion->my_queue); in enqueue_work_queue_completion()
116 if (completion->priority == VDO_WORK_Q_DEFAULT_PRIORITY) in enqueue_work_queue_completion()
117 completion->priority = queue->common.type->default_priority; in enqueue_work_queue_completion()
119 if (VDO_ASSERT(completion->priority <= queue->common.type->max_priority, in enqueue_work_queue_completion()
121 completion->priority = 0; in enqueue_work_queue_completion()
123 completion->my_queue = &queue->common; in enqueue_work_queue_completion()
126 vdo_funnel_queue_put(queue->priority_lists[completion->priority], in enqueue_work_queue_completion()
127 &completion->work_queue_entry_link); in enqueue_work_queue_completion()
166 * Wait for the next completion to process, or until kthread_should_stop indicates that it's time
170 * completion.
176 struct vdo_completion *completion; in wait_for_next_completion() local
193 completion = poll_for_completion(queue); in wait_for_next_completion()
194 if (completion != NULL) in wait_for_next_completion()
211 completion = poll_for_completion(queue); in wait_for_next_completion()
212 if (completion != NULL) in wait_for_next_completion()
219 return completion; in wait_for_next_completion()
223 struct vdo_completion *completion) in process_completion() argument
225 if (VDO_ASSERT(completion->my_queue == &queue->common, in process_completion()
226 "completion %px from queue %px marked as being in this queue (%px)", in process_completion()
227 completion, queue, completion->my_queue) == VDO_SUCCESS) in process_completion()
228 completion->my_queue = NULL; in process_completion()
230 vdo_run_completion(completion); in process_completion()
238 struct vdo_completion *completion = poll_for_completion(queue); in service_work_queue() local
240 if (completion == NULL) in service_work_queue()
241 completion = wait_for_next_completion(queue); in service_work_queue()
243 if (completion == NULL) { in service_work_queue()
248 process_completion(queue, completion); in service_work_queue()
495 * Write to the buffer some info about the completion, for logging. Since the common use case is
538 void vdo_dump_completion_to_buffer(struct vdo_completion *completion, char *buffer, in vdo_dump_completion_to_buffer() argument
543 (completion->my_queue == NULL ? "-" : completion->my_queue->name)); in vdo_dump_completion_to_buffer()
546 get_function_name((void *) completion->callback, buffer + current_length, in vdo_dump_completion_to_buffer()
551 /* Completion submission */
553 * If the completion has a timeout that has already passed, the timeout handler function may be
557 struct vdo_completion *completion) in vdo_enqueue_work_queue() argument
583 enqueue_work_queue_completion(simple_queue, completion); in vdo_enqueue_work_queue()
597 * been processing a completion, in which case starting to process another would violate in get_current_thread_work_queue()