Home
last modified time | relevance | path

Searched refs:worker (Results 1 – 55 of 55) sorted by relevance

/linux-4.1.27/include/linux/
Dkthread.h76 struct kthread_worker *worker; member
79 #define KTHREAD_WORKER_INIT(worker) { \ argument
80 .lock = __SPIN_LOCK_UNLOCKED((worker).lock), \
81 .work_list = LIST_HEAD_INIT((worker).work_list), \
89 #define DEFINE_KTHREAD_WORKER(worker) \ argument
90 struct kthread_worker worker = KTHREAD_WORKER_INIT(worker)
100 # define KTHREAD_WORKER_INIT_ONSTACK(worker) \ argument
101 ({ init_kthread_worker(&worker); worker; })
102 # define DEFINE_KTHREAD_WORKER_ONSTACK(worker) \ argument
103 struct kthread_worker worker = KTHREAD_WORKER_INIT_ONSTACK(worker)
[all …]
/linux-4.1.27/tools/perf/bench/
Dfutex-hash.c37 struct worker { struct
62 struct worker *w = (struct worker *) arg; in workerfn() argument
117 struct worker *worker = NULL; in bench_futex_hash() local
134 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_hash()
135 if (!worker) in bench_futex_hash()
153 worker[i].tid = i; in bench_futex_hash()
154 worker[i].futex = calloc(nfutexes, sizeof(*worker[i].futex)); in bench_futex_hash()
155 if (!worker[i].futex) in bench_futex_hash()
165 ret = pthread_create(&worker[i].thread, &thread_attr, workerfn, in bench_futex_hash()
166 (void *)(struct worker *) &worker[i]); in bench_futex_hash()
[all …]
Dfutex-wake.c33 pthread_t *worker; variable
131 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_wake()
132 if (!worker) in bench_futex_wake()
154 block_threads(worker, thread_attr); in bench_futex_wake()
181 ret = pthread_join(worker[i], NULL); in bench_futex_wake()
196 free(worker); in bench_futex_wake()
Dfutex-requeue.c32 static pthread_t *worker; variable
128 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_requeue()
129 if (!worker) in bench_futex_requeue()
154 block_threads(worker, thread_attr); in bench_futex_requeue()
193 ret = pthread_join(worker[i], NULL); in bench_futex_requeue()
207 free(worker); in bench_futex_requeue()
/linux-4.1.27/kernel/
Dkthread.c520 void __init_kthread_worker(struct kthread_worker *worker, in __init_kthread_worker() argument
524 spin_lock_init(&worker->lock); in __init_kthread_worker()
525 lockdep_set_class_and_name(&worker->lock, key, name); in __init_kthread_worker()
526 INIT_LIST_HEAD(&worker->work_list); in __init_kthread_worker()
527 worker->task = NULL; in __init_kthread_worker()
548 struct kthread_worker *worker = worker_ptr; in kthread_worker_fn() local
551 WARN_ON(worker->task); in kthread_worker_fn()
552 worker->task = current; in kthread_worker_fn()
558 spin_lock_irq(&worker->lock); in kthread_worker_fn()
559 worker->task = NULL; in kthread_worker_fn()
[all …]
Dworkqueue.c167 struct worker *manager; /* L: purely informational */
250 struct worker *rescuer; /* I: rescue worker */
393 #define for_each_pool_worker(worker, pool) \ argument
394 list_for_each_entry((worker), &(pool)->workers, node) \
828 static struct worker *first_idle_worker(struct worker_pool *pool) in first_idle_worker()
833 return list_first_entry(&pool->idle_list, struct worker, entry); in first_idle_worker()
847 struct worker *worker = first_idle_worker(pool); in wake_up_worker() local
849 if (likely(worker)) in wake_up_worker()
850 wake_up_process(worker->task); in wake_up_worker()
866 struct worker *worker = kthread_data(task); in wq_worker_waking_up() local
[all …]
Dworkqueue_internal.h22 struct worker { struct
60 static inline struct worker *current_wq_worker(void) in current_wq_worker()
Dasync.c325 struct worker *worker = current_wq_worker(); in current_is_async() local
327 return worker && worker->current_func == async_run_entry_fn; in current_is_async()
/linux-4.1.27/drivers/infiniband/hw/qib/
Dqib_cq.c108 struct kthread_worker *worker; in qib_cq_enter() local
114 worker = cq->dd->worker; in qib_cq_enter()
115 if (likely(worker)) { in qib_cq_enter()
118 queue_kthread_work(worker, &cq->comptask); in qib_cq_enter()
502 if (dd->worker) in qib_cq_init()
504 dd->worker = kzalloc(sizeof(*dd->worker), GFP_KERNEL); in qib_cq_init()
505 if (!dd->worker) in qib_cq_init()
507 init_kthread_worker(dd->worker); in qib_cq_init()
510 dd->worker, in qib_cq_init()
522 kfree(dd->worker); in qib_cq_init()
[all …]
Dqib.h1100 struct kthread_worker *worker; member
/linux-4.1.27/Documentation/
Dworkqueue.txt27 queue is called workqueue and the thread is called worker.
29 While there are work items on the workqueue the worker executes the
31 there is no work item left on the workqueue the worker becomes idle.
32 When a new work item gets queued, the worker begins executing again.
38 worker thread per CPU and a single threaded (ST) wq had one worker
48 worker pool. A MT wq could provide only one execution context per CPU
66 * Use per-CPU unified worker pools shared by all wq to provide
70 * Automatically regulate worker pool and level of concurrency so that
85 Special purpose threads, called worker threads, execute the functions
87 worker threads become idle. These worker threads are managed in so
[all …]
/linux-4.1.27/drivers/gpu/drm/
Ddrm_flip_work.c107 queue_work(wq, &work->worker); in drm_flip_work_commit()
113 struct drm_flip_work *work = container_of(w, struct drm_flip_work, worker); in flip_worker()
153 INIT_WORK(&work->worker, flip_worker); in drm_flip_work_init()
/linux-4.1.27/drivers/platform/olpc/
Dolpc-ec.c34 struct work_struct worker; member
68 struct olpc_ec_priv *ec = container_of(w, struct olpc_ec_priv, worker); in olpc_ec_worker()
94 schedule_work(&ec->worker); in olpc_ec_worker()
112 schedule_work(&ec->worker); in queue_ec_descriptor()
272 INIT_WORK(&ec->worker, olpc_ec_worker); in olpc_ec_probe()
/linux-4.1.27/drivers/macintosh/ams/
Dams-core.c78 schedule_work(&ams_info.worker); in ams_handle_irq()
198 INIT_WORK(&ams_info.worker, ams_worker); in ams_init()
229 flush_work(&ams_info.worker); in ams_sensor_detach()
Dams.h33 struct work_struct worker; member
/linux-4.1.27/arch/s390/oprofile/
Dhwsampler.c193 queue_work(hws_wq, &cb->worker); in hws_ext_handler()
196 static void worker(struct work_struct *work);
569 queue_work_on(cpu, hws_wq, &cb->worker); in hwsampler_deactivate()
744 &cb->worker); in worker_on_finish()
854 static void worker(struct work_struct *work) in worker() function
860 cb = container_of(work, struct hws_cpu_buffer, worker); in worker()
1008 INIT_WORK(&cb->worker, worker); in hwsampler_setup()
Dhwsampler.h39 struct work_struct worker; member
/linux-4.1.27/drivers/vhost/
Dvhost.c164 wake_up_process(dev->worker); in vhost_work_queue()
309 dev->worker = NULL; in vhost_dev_init()
369 struct task_struct *worker; in vhost_dev_set_owner() local
380 worker = kthread_create(vhost_worker, dev, "vhost-%d", current->pid); in vhost_dev_set_owner()
381 if (IS_ERR(worker)) { in vhost_dev_set_owner()
382 err = PTR_ERR(worker); in vhost_dev_set_owner()
386 dev->worker = worker; in vhost_dev_set_owner()
387 wake_up_process(worker); /* avoid contributing to loadavg */ in vhost_dev_set_owner()
399 kthread_stop(worker); in vhost_dev_set_owner()
400 dev->worker = NULL; in vhost_dev_set_owner()
[all …]
Dvhost.h121 struct task_struct *worker; member
/linux-4.1.27/include/drm/
Ddrm_flip_work.h76 struct work_struct worker; member
/linux-4.1.27/arch/x86/kvm/
Di8254.h48 struct kthread_worker worker; member
Di8254.c251 queue_kthread_work(&ps->pit->worker, &ps->pit->expired); in kvm_pit_ack_irq()
324 queue_kthread_work(&pt->worker, &pt->expired); in pit_timer_fn()
705 init_kthread_worker(&pit->worker); in kvm_create_pit()
706 pit->worker_task = kthread_run(kthread_worker_fn, &pit->worker, in kvm_create_pit()
/linux-4.1.27/drivers/media/usb/hdpvr/
Dhdpvr.h112 struct work_struct worker; member
Dhdpvr-video.c254 worker); in hdpvr_transmit_buffers()
318 INIT_WORK(&dev->worker, hdpvr_transmit_buffers); in hdpvr_start_streaming()
319 queue_work(dev->workqueue, &dev->worker); in hdpvr_start_streaming()
/linux-4.1.27/drivers/s390/net/
Dqeth_l2_main.c1452 struct work_struct worker; member
1460 container_of(work, struct qeth_bridge_state_data, worker); in qeth_bridge_state_change_worker()
1515 INIT_WORK(&data->worker, qeth_bridge_state_change_worker); in qeth_bridge_state_change()
1519 queue_work(qeth_wq, &data->worker); in qeth_bridge_state_change()
1523 struct work_struct worker; member
1531 container_of(work, struct qeth_bridge_host_data, worker); in qeth_bridge_host_event_worker()
1587 INIT_WORK(&data->worker, qeth_bridge_host_event_worker); in qeth_bridge_host_event()
1591 queue_work(qeth_wq, &data->worker); in qeth_bridge_host_event()
/linux-4.1.27/drivers/s390/block/
Ddasd_alias.c153 INIT_WORK(&lcu->suc_data.worker, summary_unit_check_handling_work); in _allocate_lcu()
265 cancel_work_sync(&lcu->suc_data.worker); in dasd_alias_disconnect_device_from_lcu()
917 worker); in summary_unit_check_handling_work()
999 if (!schedule_work(&lcu->suc_data.worker)) in dasd_alias_handle_summary_unit_check()
Ddasd_eckd.h462 struct work_struct worker; member
Ddasd_eckd.c106 struct work_struct worker; member
118 struct work_struct worker; member
1254 data = container_of(work, struct path_verification_work_data, worker); in do_path_verification_work()
1428 INIT_WORK(&data->worker, do_path_verification_work); in dasd_eckd_verify_path()
1432 schedule_work(&data->worker); in dasd_eckd_verify_path()
4801 data = container_of(work, struct check_attention_work_data, worker); in dasd_eckd_check_attention_work()
4832 INIT_WORK(&data->worker, dasd_eckd_check_attention_work); in dasd_eckd_check_attention()
4836 schedule_work(&data->worker); in dasd_eckd_check_attention()
/linux-4.1.27/drivers/staging/speakup/
DTODO21 in these cases. Pushing work to some worker thread would probably help,
/linux-4.1.27/drivers/block/
Dnvme-core.c87 struct kthread_worker *worker; member
335 queue_kthread_work(cmdinfo->worker, &cmdinfo->work); in async_completion()
2428 struct kthread_worker *worker; member
2453 flush_kthread_worker(dq->worker); in nvme_wait_dq()
2536 DEFINE_KTHREAD_WORKER_ONSTACK(worker); in nvme_disable_io_queues()
2539 &worker, "nvme%d", dev->instance); in nvme_disable_io_queues()
2551 dq.worker = &worker; in nvme_disable_io_queues()
2558 nvmeq->cmdinfo.worker = dq.worker; in nvme_disable_io_queues()
2560 queue_kthread_work(dq.worker, &nvmeq->cmdinfo.work); in nvme_disable_io_queues()
/linux-4.1.27/Documentation/nfc/
Dnfc-hci.txt189 - SHDLC State Machine worker (SMW)
193 - HCI Tx Cmd worker (MSGTXWQ)
197 - HCI Rx worker (MSGRXWQ)
250 queued to HCI rx_queue and will be dispatched from HCI rx worker
/linux-4.1.27/Documentation/filesystems/caching/
Doperations.txt191 This can be used to allow other things to have use of the worker thread
199 When used in asynchronous mode, the worker thread pool will invoke the
Dobject.txt121 which it is interested (object->event_mask) and relinquish the worker thread.
147 Because only one worker thread may be operating on any particular object's
/linux-4.1.27/drivers/md/
Ddm-era-target.c1153 struct work_struct worker; member
1207 queue_work(era->wq, &era->worker); in wake_worker()
1311 struct era *era = container_of(ws, struct era, worker); in do_work()
1506 INIT_WORK(&era->worker, do_work); in era_ctr()
Ddm-thin.c236 struct work_struct worker; member
322 queue_work(pool->wq, &pool->worker); in wake_worker()
1993 struct pool *pool = container_of(ws, struct pool, worker); in do_worker()
2034 struct work_struct worker; member
2040 return container_of(ws, struct pool_work, worker); in to_pool_work()
2051 INIT_WORK_ONSTACK(&pw->worker, fn); in pool_work_wait()
2053 queue_work(pool->wq, &pw->worker); in pool_work_wait()
2582 INIT_WORK(&pool->worker, do_worker); in pool_create()
Draid5.c5726 struct r5worker *worker, in handle_active_stripes() argument
5770 struct r5worker *worker = container_of(work, struct r5worker, work); in raid5_do_work() local
5771 struct r5worker_group *group = worker->group; in raid5_do_work()
5785 released = release_stripe_list(conf, worker->temp_inactive_list); in raid5_do_work()
5787 batch_size = handle_active_stripes(conf, group_id, worker, in raid5_do_work()
5788 worker->temp_inactive_list); in raid5_do_work()
5789 worker->working = false; in raid5_do_work()
6229 struct r5worker *worker = group->workers + j; in alloc_thread_groups() local
6230 worker->group = group; in alloc_thread_groups()
6231 INIT_WORK(&worker->work, raid5_do_work); in alloc_thread_groups()
[all …]
Ddm-cache-target.c259 struct work_struct worker; member
343 queue_work(cache->wq, &cache->worker); in wake_worker()
1838 struct cache *cache = container_of(ws, struct cache, worker); in do_worker()
2496 INIT_WORK(&cache->worker, do_worker); in cache_create()
/linux-4.1.27/drivers/block/drbd/
Ddrbd_main.c2217 struct work_struct worker; member
2225 struct retry_worker *retry = container_of(ws, struct retry_worker, worker); in do_retry()
2289 queue_work(retry.wq, &retry.worker); in drbd_restart_request()
2567 connection->worker.reset_cpu_mask = 1; in set_resource_options()
2653 drbd_thread_init(resource, &connection->worker, drbd_worker, "worker"); in conn_create()
2654 connection->worker.connection = connection; in conn_create()
2710 INIT_WORK(&device->submit.worker, do_submit); in init_submitter()
2952 INIT_WORK(&retry.worker, do_retry); in drbd_init()
3566 D_ASSERT(device, current == first_peer_device(device)->connection->worker.task); in drbd_queue_bitmap_io()
3604 D_ASSERT(device, current != first_peer_device(device)->connection->worker.task); in drbd_bitmap_io()
Ddrbd_req.c1171 queue_work(device->submit.wq, &device->submit.worker); in drbd_queue_write()
1397 struct drbd_device *device = container_of(ws, struct drbd_device, submit.worker); in do_submit()
Ddrbd_nl.c338 if (current == connection->worker.task) in drbd_khelper()
365 if (current == connection->worker.task) in drbd_khelper()
1231 drbd_thread_start(&connection->worker); in conn_reconfig_start()
1247 drbd_thread_stop(&connection->worker); in conn_reconfig_done()
3548 drbd_thread_stop(&connection->worker); in adm_del_resource()
Ddrbd_int.h756 struct drbd_thread worker; member
803 struct work_struct worker; member
Ddrbd_worker.c1698 if (current == connection->worker.task) { in drbd_start_resync()
2060 if (get_t_state(&connection->worker) != RUNNING) in wait_for_work()
Ddrbd_state.c392 D_ASSERT(device, current != first_peer_device(device)->connection->worker.task); in drbd_req_state()
1234 D_ASSERT(device, current == first_peer_device(device)->connection->worker.task); in drbd_bitmap_io_from_worker()
/linux-4.1.27/drivers/hid/
Dhid-wiimote.h110 struct work_struct worker; member
Dhid-wiimote-core.c47 worker); in wiimote_queue_worker()
104 schedule_work(&wdata->queue.worker); in wiimote_queue()
1734 INIT_WORK(&wdata->queue.worker, wiimote_queue_worker); in wiimote_create()
1768 cancel_work_sync(&wdata->queue.worker); in wiimote_destroy()
Dhid-sony.c1946 void (*worker)(struct work_struct *)) in sony_init_work()
1949 INIT_WORK(&sc->state_worker, worker); in sony_init_work()
/linux-4.1.27/Documentation/filesystems/pohmelfs/
Dinfo.txt98 Number of worker threads specifies how many workers will be created for each client.
/linux-4.1.27/Documentation/scsi/
DChangeLog.lpfc107 mod_timer the els_tmofunc. This prevents the worker thread from
139 premise is that the worker thread is signal-immune.
159 * Added code to prevent waking up worker thread after the exit of
160 worker thread. Fixes panic seen with insmod/rmmod testing with
196 * Following timeout handlers moved to the lpfc worker thread:
216 * Moved discovery timeout handler to worker thread. There are
238 worker thread. Link Attention, Mbox Attention, and Error
240 worker thread via worker thread copy of Host Attention
244 the lpfc_sli_inter() to a worker thread.
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
Dmsgbuf.c763 static void brcmf_msgbuf_txflow_worker(struct work_struct *worker) in brcmf_msgbuf_txflow_worker() argument
768 msgbuf = container_of(worker, struct brcmf_msgbuf, txflow_work); in brcmf_msgbuf_txflow_worker()
Dfwsignal.c1982 static void brcmf_fws_dequeue_worker(struct work_struct *worker) in brcmf_fws_dequeue_worker() argument
1992 fws = container_of(worker, struct brcmf_fws_info, fws_dequeue_work); in brcmf_fws_dequeue_worker()
/linux-4.1.27/Documentation/filesystems/
Dbtrfs.txt221 The number of worker threads to allocate. The default number is equal
Dcoda.txt1387 DDeessccrriippttiioonn Venus worker.cc has support for this call, although it is
/linux-4.1.27/Documentation/networking/
Drds.txt311 send worker awoken
/linux-4.1.27/Documentation/hid/
Dhid-transport.txt85 its own worker threads.
/linux-4.1.27/init/
DKconfig678 int "Real-time priority to use for RCU worker threads"