Home
last modified time | relevance | path

Searched refs:completion (Results 1 – 25 of 1132) sorted by relevance

12345678910>>...46

/linux/drivers/md/dm-vdo/
H A Dcompletion.h19 static inline void vdo_run_completion(struct vdo_completion *completion) in vdo_run_completion() argument
21 if ((completion->result != VDO_SUCCESS) && (completion->error_handler != NULL)) { in vdo_run_completion()
22 completion->error_handler(completion); in vdo_run_completion()
26 completion->callback(completion); in vdo_run_completion()
29 void vdo_set_completion_result(struct vdo_completion *completion, int result);
31 void vdo_initialize_completion(struct vdo_completion *completion, struct vdo *vdo,
38 static inline void vdo_reset_completion(struct vdo_completion *completion) in vdo_reset_completion() argument
40 completion->result = VDO_SUCCESS; in vdo_reset_completion()
41 completion->complete = false; in vdo_reset_completion()
44 void vdo_launch_completion_with_priority(struct vdo_completion *completion,
[all …]
H A Dcompletion.c51 void vdo_initialize_completion(struct vdo_completion *completion, in vdo_initialize_completion() argument
55 memset(completion, 0, sizeof(*completion)); in vdo_initialize_completion()
56 completion->vdo = vdo; in vdo_initialize_completion()
57 completion->type = type; in vdo_initialize_completion()
58 vdo_reset_completion(completion); in vdo_initialize_completion()
61 static inline void assert_incomplete(struct vdo_completion *completion) in assert_incomplete() argument
63 VDO_ASSERT_LOG_ONLY(!completion->complete, "completion is not complete"); in assert_incomplete()
73 void vdo_set_completion_result(struct vdo_completion *completion, int result) in vdo_set_completion_result() argument
75 assert_incomplete(completion); in vdo_set_completion_result()
76 if (completion->result == VDO_SUCCESS) in vdo_set_completion_result()
[all …]
H A Drepair.c58 struct vdo_completion completion; member
197 as_repair_completion(struct vdo_completion *completion) in as_repair_completion() argument
199 vdo_assert_completion_type(completion, VDO_REPAIR_COMPLETION); in as_repair_completion()
200 return container_of(completion, struct repair_completion, completion); in as_repair_completion()
206 struct vdo_completion *completion = &repair->completion; in prepare_repair_completion() local
207 const struct thread_config *thread_config = &completion->vdo->thread_config; in prepare_repair_completion()
214 vdo_reset_completion(completion); in prepare_repair_completion()
215 vdo_set_completion_callback(completion, callback, thread_id); in prepare_repair_completion()
222 vdo_launch_completion(&repair->completion); in launch_repair_completion()
242 repair->completion.vdo->block_map->zones[0].page_cache.rebuilding = false; in free_repair_completion()
[all …]
H A Dflush.c24 struct vdo_completion completion; member
72 static struct flusher *as_flusher(struct vdo_completion *completion) in as_flusher() argument
74 vdo_assert_completion_type(completion, VDO_FLUSH_NOTIFICATION_COMPLETION); in as_flusher()
75 return container_of(completion, struct flusher, completion); in as_flusher()
84 static inline struct vdo_flush *completion_as_vdo_flush(struct vdo_completion *completion) in completion_as_vdo_flush() argument
86 vdo_assert_completion_type(completion, VDO_FLUSH_COMPLETION); in completion_as_vdo_flush()
87 return container_of(completion, struct vdo_flush, completion); in completion_as_vdo_flush()
117 vdo_initialize_completion(&flush->completion, flusher->vdo, in allocate_flush()
145 vdo_initialize_completion(&vdo->flusher->completion, vdo, in vdo_make_flusher()
192 static void finish_notification(struct vdo_completion *completion) in finish_notification() argument
[all …]
H A Ddata-vio.c161 struct vdo_completion completion; member
216 as_data_vio_pool(struct vdo_completion *completion) in as_data_vio_pool() argument
218 vdo_assert_completion_type(completion, VDO_DATA_VIO_POOL_COMPLETION); in as_data_vio_pool()
219 return container_of(completion, struct data_vio_pool, completion); in as_data_vio_pool()
277 int error = vdo_status_to_errno(data_vio->vio.completion.result); in acknowledge_data_vio()
422 static void attempt_logical_block_lock(struct vdo_completion *completion) in attempt_logical_block_lock() argument
424 struct data_vio *data_vio = as_data_vio(completion); in attempt_logical_block_lock()
467 complete_data_vio(completion); in attempt_logical_block_lock()
493 struct vdo_completion *completion = &data_vio->vio.completion; in launch_data_vio() local
511 vdo_reset_completion(completion); in launch_data_vio()
[all …]
H A Daction-manager.c54 struct vdo_completion completion; member
66 static inline struct action_manager *as_action_manager(struct vdo_completion *completion) in as_action_manager() argument
68 vdo_assert_completion_type(completion, VDO_ACTION_COMPLETION); in as_action_manager()
69 return container_of(completion, struct action_manager, completion); in as_action_manager()
79 static void no_preamble(void *context __always_unused, struct vdo_completion *completion) in no_preamble() argument
81 vdo_finish_completion(completion); in no_preamble()
128 vdo_initialize_completion(&manager->completion, vdo, VDO_ACTION_COMPLETION); in vdo_make_action_manager()
143 static void finish_action_callback(struct vdo_completion *completion);
144 static void apply_to_zone(struct vdo_completion *completion);
151 static void preserve_error(struct vdo_completion *completion) in preserve_error() argument
[all …]
H A Dfunnel-workqueue.c64 struct completion *started;
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()
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()
[all …]
H A Ddm-vdo-target.c1176 struct vdo_completion *completion = &vdo->admin.completion; in prepare_admin_completion() local
1182 completion->callback = callback; in prepare_admin_completion()
1183 completion->error_handler = error_handler; in prepare_admin_completion()
1184 completion->callback_thread_id = get_thread_id_for_phase(vdo); in prepare_admin_completion()
1185 completion->requeue = true; in prepare_admin_completion()
1186 return completion; in prepare_admin_completion()
1200 vdo->admin.completion.callback_thread_id = get_thread_id_for_phase(vdo); in advance_phase()
1201 vdo->admin.completion.requeue = true; in advance_phase()
1224 vdo_reset_completion(&admin->completion); in perform_admin_operation()
1236 result = admin->completion.result; in perform_admin_operation()
[all …]
H A Dblock-map.c101 struct vdo_completion *completion; member
165 struct vdo_page_completion *completion; in page_completion_from_waiter() local
170 completion = container_of(waiter, struct vdo_page_completion, waiter); in page_completion_from_waiter()
171 vdo_assert_completion_type(&completion->completion, VDO_PAGE_COMPLETION); in page_completion_from_waiter()
172 return completion; in page_completion_from_waiter()
200 info->vio->completion.callback_thread_id = cache->zone->thread_id; in initialize_info()
499 vdo_fail_completion(&vdo_page_comp->completion, VDO_BAD_PAGE); in complete_with_page()
505 vdo_finish_completion(&vdo_page_comp->completion); in complete_with_page()
519 vdo_fail_completion(&page_completion_from_waiter(waiter)->completion, *result); in complete_waiter_with_error()
603 static int __must_check validate_completed_page(struct vdo_page_completion *completion, in validate_completed_page() argument
[all …]
H A Dvdo.c64 struct completion completion; member
475 vdo_initialize_completion(&vdo->admin.completion, vdo, VDO_ADMIN_COMPLETION); in initialize_vdo()
744 static void finish_reading_super_block(struct vdo_completion *completion) in finish_reading_super_block() argument
747 container_of(as_vio(completion), struct vdo_super_block, vio); in finish_reading_super_block()
749 vdo_continue_completion(vdo_forget(completion->parent), in finish_reading_super_block()
759 static void handle_super_block_read_error(struct vdo_completion *completion) in handle_super_block_read_error() argument
761 vio_record_metadata_io_error(as_vio(completion)); in handle_super_block_read_error()
762 finish_reading_super_block(completion); in handle_super_block_read_error()
768 struct vdo_completion *parent = vio->completion.parent; in read_super_block_endio()
789 vdo->super_block.vio.completion.parent = parent; in vdo_load_super_block()
[all …]
H A Dio-submitter.c76 struct atomic_statistics *stats = &vio->completion.vdo->stats; in count_all_bios()
109 struct vdo *vdo = vio->completion.vdo; in send_bio_to_device()
123 void vdo_submit_vio(struct vdo_completion *completion) in vdo_submit_vio() argument
125 struct vio *vio = as_vio(completion); in vdo_submit_vio()
142 struct io_submitter *submitter = vio->completion.vdo->io_submitter; in get_bio_list()
166 static void submit_data_vio(struct vdo_completion *completion) in submit_data_vio() argument
169 struct vio *vio = as_vio(completion); in submit_data_vio()
208 if (vio->completion.priority != vio_merge->completion.priority) in get_mergeable_locked()
275 struct vdo *vdo = vio->completion.vdo; in try_bio_map_merge()
347 struct vdo_completion *completion = &vio->completion; in __submit_metadata_vio() local
[all …]
H A Dslab-depot.c280 static void finish_update(struct vdo_completion *completion) in finish_update() argument
283 container_of(as_vio(completion), struct slab_summary_block, vio); in finish_update()
293 static void handle_write_error(struct vdo_completion *completion) in handle_write_error() argument
296 container_of(as_vio(completion), struct slab_summary_block, vio); in handle_write_error()
298 vio_record_metadata_io_error(as_vio(completion)); in handle_write_error()
299 vdo_enter_read_only_mode(completion->vdo, completion->result); in handle_write_error()
372 if (vdo_is_read_only(block->vio.completion.vdo)) { in update_slab_summary_entry()
415 static void complete_reaping(struct vdo_completion *completion) in complete_reaping() argument
417 struct slab_journal *journal = completion->parent; in complete_reaping()
419 return_vio_to_pool(vio_as_pooled_vio(as_vio(completion))); in complete_reaping()
[all …]
H A Dlogical-zone.c32 static struct logical_zone *as_logical_zone(struct vdo_completion *completion) in as_logical_zone() argument
34 vdo_assert_completion_type(completion, VDO_GENERATION_FLUSHED_COMPLETION); in as_logical_zone()
35 return container_of(completion, struct logical_zone, completion); in as_logical_zone()
65 vdo_initialize_completion(&zone->completion, vdo, in initialize_zone()
265 static void attempt_generation_complete_notification(struct vdo_completion *completion);
273 static void notify_flusher(struct vdo_completion *completion) in notify_flusher() argument
275 struct logical_zone *zone = as_logical_zone(completion); in notify_flusher()
278 vdo_launch_completion_callback(completion, in notify_flusher()
288 static void attempt_generation_complete_notification(struct vdo_completion *completion) in attempt_generation_complete_notification() argument
290 struct logical_zone *zone = as_logical_zone(completion); in attempt_generation_complete_notification()
[all …]
H A Dvio.h43 static inline struct vio *as_vio(struct vdo_completion *completion) in as_vio() argument
45 vdo_assert_completion_type(completion, VIO_COMPLETION); in as_vio()
46 return container_of(completion, struct vio, completion); in as_vio()
58 return vio->completion.vdo->thread_config.bio_threads[vio->bio_zone]; in get_vio_bio_zone_thread_id()
120 vdo_initialize_completion(&vio->completion, vdo, VIO_COMPLETION); in initialize_vio()
164 vdo_set_completion_result(&vio->completion, result); in continue_vio()
166 vdo_enqueue_completion(&vio->completion, VDO_WORK_Q_DEFAULT_PRIORITY); in continue_vio()
182 vdo_set_completion_callback(&vio->completion, callback, thread); in continue_vio_after_io()
H A Dblock-map.h167 struct vdo_completion completion; member
291 struct vdo_completion *completion);
293 static inline struct vdo_page_completion *as_vdo_page_completion(struct vdo_completion *completion) in as_vdo_page_completion() argument
295 vdo_assert_completion_type(completion, VDO_PAGE_COMPLETION); in as_vdo_page_completion()
296 return container_of(completion, struct vdo_page_completion, completion); in as_vdo_page_completion()
299 void vdo_release_page_completion(struct vdo_completion *completion);
306 void vdo_request_page_write(struct vdo_completion *completion);
308 int __must_check vdo_get_cached_page(struct vdo_completion *completion,
331 struct vdo_completion *completion);
H A Ddedupe.c286 struct vdo_completion completion; member
309 static inline struct hash_zone *as_hash_zone(struct vdo_completion *completion) in as_hash_zone() argument
311 vdo_assert_completion_type(completion, VDO_HASH_ZONE_COMPLETION); in as_hash_zone()
312 return container_of(completion, struct hash_zone, completion); in as_hash_zone()
315 static inline struct hash_zones *as_hash_zones(struct vdo_completion *completion) in as_hash_zones() argument
317 vdo_assert_completion_type(completion, VDO_HASH_ZONES_COMPLETION); in as_hash_zones()
318 return container_of(completion, struct hash_zones, completion); in as_hash_zones()
484 static void unlock_duplicate_pbn(struct vdo_completion *completion);
498 data_vio->vio.completion.callback = complete_data_vio; in exit_hash_lock()
629 static void finish_unlocking(struct vdo_completion *completion) in finish_unlocking() argument
[all …]
/linux/include/linux/
H A Dcompletion.h26 struct completion { struct
32 static inline void complete_acquire(struct completion *x) {} in complete_acquire() argument
33 static inline void complete_release(struct completion *x) {} in complete_release()
53 struct completion work = COMPLETION_INITIALIZER(work)
69 struct completion work = COMPLETION_INITIALIZER_ONSTACK(work)
71 struct completion work = COMPLETION_INITIALIZER_ONSTACK_MAP(work, map)
84 static inline void init_completion(struct completion *x) in init_completion()
97 static inline void reinit_completion(struct completion *x) in reinit_completion()
102 extern void wait_for_completion(struct completion *);
103 extern void wait_for_completion_io(struct completion *);
[all …]
/linux/Documentation/translations/zh_CN/scheduler/
H A Dcompletion.rst3 :Original: Documentation/scheduler/completion.rst
26 调用和completion()来代替。
33 事件被简化为 ``struct completion`` 中的一个简单标志,被恰如其名地称为‘done’。
35 由于完成与调度有关,代码可以在kernel/sched/completion.c中找到。
43 - 'struct completion' 同步对象的初始化
51 要使用完成API,你需要#include <linux/completion.h>并创建一个静态或动态的
52 ``struct completion`` 类型的变量,它只有两个字段::
54 struct completion {
134 void wait_for_completion(struct completion *done)
140 struct completion setup_done;
[all …]
/linux/kernel/sched/
H A Dcompletion.c21 static void complete_with_flags(struct completion *x, int wake_flags) in complete_with_flags()
33 void complete_on_current_cpu(struct completion *x) in complete_on_current_cpu()
50 void complete(struct completion *x) in complete()
72 void complete_all(struct completion *x) in complete_all()
86 do_wait_for_common(struct completion *x, in do_wait_for_common()
113 __wait_for_common(struct completion *x, in __wait_for_common()
130 wait_for_common(struct completion *x, long timeout, int state) in wait_for_common()
136 wait_for_common_io(struct completion *x, long timeout, int state) in wait_for_common_io()
151 void __sched wait_for_completion(struct completion *x) in wait_for_completion()
170 wait_for_completion_timeout(struct completion *x, unsigned long timeout) in wait_for_completion_timeout()
[all …]
/linux/Documentation/scheduler/
H A Dcompletion.rst2 Completions - "wait for completion" barrier APIs
27 is reduced to a simple flag in 'struct completion', appropriately called "done".
30 kernel/sched/completion.c.
38 - the initialization of the 'struct completion' synchronization object
45 to have marked a completion as 'done' before another thread checks whether
48 To use completions you need to #include <linux/completion.h> and
49 create a static or dynamic variable of type 'struct completion',
52 struct completion {
58 the ->done completion flag for indicating whether it's completed or not.
67 Good, intuitive naming (as always) helps code readability. Naming a completion
[all …]
/linux/drivers/net/wwan/iosm/
H A Diosm_ipc_task_queue.c28 if (args->completion) in ipc_task_queue_handler()
29 complete(args->completion); in ipc_task_queue_handler()
42 args->completion = NULL; in ipc_task_queue_handler()
64 if (args->completion) in ipc_task_queue_cleanup()
65 complete(args->completion); in ipc_task_queue_cleanup()
85 struct completion completion; in ipc_task_queue_add_task() local
90 init_completion(&completion); in ipc_task_queue_add_task()
111 ipc_task->args[pos].completion = wait ? &completion : NULL; in ipc_task_queue_add_task()
130 wait_for_completion(&completion); in ipc_task_queue_add_task()
/linux/net/wireless/
H A Ddebugfs.c160 struct completion completion; in wiphy_locked_debugfs_read()
169 complete(&w->completion); in wiphy_locked_debugfs_read()
178 complete(&w->completion); in wiphy_locked_debugfs_read()
200 .completion = COMPLETION_INITIALIZER_ONSTACK(work.completion),
214 wait_for_completion(&work.completion); in wiphy_locked_debugfs_write_work()
240 struct completion completion; in wiphy_locked_debugfs_write()
249 complete(&w->completion); in wiphy_locked_debugfs_write()
127 struct completion completion; global() member
207 struct completion completion; global() member
[all...]
/linux/drivers/scsi/aic94xx/
H A Daic94xx_tmf.c67 complete(ascb->completion); in asd_clear_nexus_tasklet_complete()
78 complete(ascb->completion); in asd_clear_nexus_timedout()
85 DECLARE_COMPLETION_ONSTACK(completion); \
94 ascb->completion = &completion; \
106 wait_for_completion(&completion); \
252 complete(ascb->completion); in asd_tmf_timedout()
320 complete(ascb->completion); in asd_tmf_tasklet_complete()
329 DECLARE_COMPLETION_ONSTACK(completion); in asd_clear_nexus()
332 tascb->completion = &completion; in asd_clear_nexus()
339 leftover = wait_for_completion_timeout(&completion, in asd_clear_nexus()
[all …]
/linux/Documentation/driver-api/usb/
H A DURB.rst36 - Each URB has a completion handler, which is called after the action
38 context-pointer for passing information to the completion handler.
42 data to an endpoint while your driver handles completion of another.
60 // (IN) all urbs need completion routines
61 void *context; // context for completion routine
62 usb_complete_t complete; // pointer to completion routine
64 // (OUT) status after each completion
110 returned to you in a completion callback. It will automatically be
122 length, the completion handler, and its context. Take a look at the some
156 never look at that value except in your completion callback.
[all …]
/linux/Documentation/arch/sparc/oradax/
H A Doracle-dax.rst41 pointer to a "completion area", which is a 128 byte memory block that
43 interrupt is generated upon completion; the completion area must be
46 processor until the completion status has been updated by the
52 completion of a request and resumption of execution of the requesting
85 call, and gets results (if any) via read(). The completion areas are
96 requests. The completion area buffer is also allocated, and this is
97 large enough to contain the completion areas for many concurrent
116 requests. Since no interrupt is generated upon the completion of a
142 completion area to use, and may be set via lseek() or using the
157 The mmap() function provides access to the completion area allocated
[all …]

12345678910>>...46